<> <> <> <> <<>> <> <<>> DIRECTORY Rope USING [ROPE], PrintColor USING [ColorCorrection], Imager USING [ScanMode, Context, defaultScanMode], ImagerPixel USING [PixelBuffer, PixelMap]; ConvertToRasters: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; PixelMap: TYPE ~ ImagerPixel.PixelMap; Context: TYPE ~ Imager.Context; ColorCorrection: TYPE ~ PrintColor.ColorCorrection; RasterProc: TYPE ~ PROC [raster: ImagerPixel.PixelBuffer] RETURNS [stop: BOOLEAN _ FALSE]; <> RasterType: TYPE ~ {rgb, gray, cmyk}; RasterSpec: TYPE ~ RECORD[ type: RasterType, fSize, sSize: NAT, -- size of raster surfaceUnitsPerPixel: NAT _ 5, -- controls smoothing. Make 1 for none scanMode: Imager.ScanMode _ Imager.defaultScanMode, colorCorrection: ColorCorrection _ NIL, --see PrintColorTransformations maxPixel: NAT _ 255 ]; <> Convert: PROC [action: PROC[Context], rasterSpec: RasterSpec, proc: RasterProc] RETURNS [nBands: NAT]; <> <> <> <> <> <> <<>> ToPixelMap: PROC [action: PROC[Context], rasterSpec: RasterSpec] RETURNS [PixelMap]; <> <> <<>> <> <> <> <> <<>> FromIP: PROC [ip: ROPE, ppiF,ppiS: REAL, page: NAT _ 1, rasterSpec: RasterSpec, proc: RasterProc, x,y,w,h: REAL _ 0] RETURNS[nBands: NAT]; FromIPToPixelMap: PROC [ip: ROPE, ppiF,ppiS: REAL, page: NAT _ 1, rasterSpec: RasterSpec, x,y,w,h: REAL _ 0] RETURNS [PixelMap]; AISFromPixelMap: PROC[aisRoot: ROPE, pm: PixelMap]; <> IPToRasterIP: PROC[ipIn, ipOut: ROPE, ppiF,ppiS: REAL, page: NAT _ 1, rasterSpec: RasterSpec, x,y,w,h: REAL _ 0, tx,ty: REAL _ 0]; <> <> IPWindow: PROC[ip: ROPE, page: NAT _ 1, tol: REAL _ 0.02] RETURNS [x,y,w,h: REAL]; <> CreateRasterSpec: PROC[type: RasterType, fSize, sSize: NAT, colorCorrection: ColorCorrection, surfaceUnitsPerPixel: NAT _ 5, scanMode: Imager.ScanMode _ Imager.defaultScanMode,maxPixel: NAT _ 255] RETURNS[RasterSpec]; END.