<> <> <> <> DIRECTORY AIS, Graphics, GraphicsColor, IO, Matrix3d, Rope, SV2d, SVCoordSys2d, SVMatrix2d, SVVector3d; SVArtwork: DEFINITIONS IMPORTS SVMatrix2d = BEGIN Color: TYPE = GraphicsColor.Color; CoordSystem2d: TYPE = SVCoordSys2d.CoordSystem2d; OMap: TYPE = {orthogonal, radial, tubeO}; SMap: TYPE = {unfoldedBox, tubeS}; Artwork: TYPE = REF ArtworkObj; ArtworkObj: TYPE = RECORD [ material: Material, surface: REF ANY, -- an SVMappings. oMap: OMap, -- the simple surface to object mapping sMap: SMap, -- the artwork to simple surface mapping source: Rope.ROPE, color: Color, isColorFile: BOOL, resolution: REAL, halfWidth, halfHeight: REAL,-- in inches halfWidthDots, halfHeightDots: REAL, -- in samples centerWRTLowerLeft: Point2d, -- in screen dots artWRTPad: CoordSystem2d, redfile: AIS.FRef, greenfile: AIS.FRef, bluefile: AIS.FRef, blackfile: AIS.FRef, redWindow: AIS.WRef, greenWindow: AIS.WRef, blueWindow: AIS.WRef, blackWindow: AIS.WRef, open: BOOL]; Material: TYPE = {plastic, chalk}; -- remember to update MaterialToRope and RopeToMaterial if you change this list Matrix3by3: TYPE = SVMatrix2d.Matrix3by3; Point2d: TYPE = SV2d.Point2d; Point3d: TYPE = Matrix3d.Point3d; Vector: TYPE = SVVector3d.Vector; CreateFileArtwork: PROC [material: Material, surface: REF ANY, oMap: OMap, sMap: SMap, filename: Rope.ROPE, isColor: BOOL, background: Color, resolution: REAL _ 72.0, mat: Matrix3by3 _ SVMatrix2d.Identity[]] RETURNS [artwork: Artwork]; <> FileNotFound: ERROR; CreateColorArtwork: PROC [color: Color, material: Material] RETURNS [artwork: Artwork]; Copy: PROC [artwork: Artwork] RETURNS [copy: Artwork]; OpenArtwork: PROC [artwork: Artwork]; CloseArtwork: PROC [artwork: Artwork]; FindImageColorAtPoint: PROC [artwork: Artwork, imagePoint: Point2d] RETURNS [color: Color]; FindColorAtSurfacePoint: PROC [artwork: Artwork, point3d: Point3d, normal: Vector] RETURNS [color: Color]; DrawArtwork: PROC [dc: Graphics.Context, artwork: Artwork, origin: Point2d, scalar: REAL]; <> <> MaterialToRope: PROC [material: Material] RETURNS [materialName: Rope.ROPE]; <> RopeToMaterial: PROC [materialName: Rope.ROPE] RETURNS [material: Material, success: BOOL]; <> OMapToRope: PROC [oMap: OMap] RETURNS [mapName: Rope.ROPE]; RopeToOMap: PROC [mapName: Rope.ROPE] RETURNS [oMap: OMap, success: BOOL]; SMapToRope: PROC [sMap: SMap] RETURNS [mapName: Rope.ROPE]; RopeToSMap: PROC [mapName: Rope.ROPE] RETURNS [sMap: SMap, success: BOOL]; END.