AllowedMasks:
TYPE ~
RECORD [
unorderedBoxes:
BOOL,
If TRUE, boxes sent to MaskBoxes may come in any order; otherwise the boxes will be disjoint, nonempty, and for any two consecutive boxes a and b, b.min.s >= a.max.s-1. This invariant is needed, for instance, by the anti-aliasing implementation.
regionFill:
BOOL,
If TRUE, may use MaskRegion
bitmap:
BOOL,
If TRUE, MaskBitmap may be called; otherwise runs are generated.
rawBitmaps:
BOOL,
If TRUE, MaskRawBitmaps may be called.
runGroupChar:
BOOL,
If TRUE, MaskChar may be called with a run-group character; otherwise runs are generated.
rasterChar:
BOOL
If TRUE, MaskChar may be called with a raster character; otherwise MaskBitmap is called, or runs are generated.
];
DeviceClassRep:
TYPE ~
RECORD [
SetColor:
PROC [context: Context, color: Color, viewToDevice: Transformation]
RETURNS [AllowedMasks] ←,
Notifies device of a color change. The return value indicates the kinds of masks that the device is willing to accept.
SetPriority:
PROC [context: Context, priorityImportant:
BOOL] ←
NIL,
Notifies device of a change to priorityImportant.
MaskBoxes:
PROC [context: Context, bounds: Box, boxes: BoxGenerator] ← ,
The basic means of communicating masks; this is the only mask proc that is required.
No guarantees about order. All boxes will fall within bounds.
MaskRegion:
PROC [context: Context, bounds: Box, edgeGenerator:
PROC [IISample.EdgeAction]] ←
NIL,
Masks a monotone region designated by the edges. The edgeGenerator must specify the edges in nondecreasing sMin order.
MaskBitmap:
PROC [context: Context, bitmap: SampleMap, delta: Vec, bounds: Box, boxes: BoxGenerator] ←
NIL,
Optional proc for masking a bitmap.
MaskRawBitmaps:
PROC [context: Context, n: [0..rawArraySize], a:
POINTER
TO RawArray] ←
NIL,
Optional proc for masking multiple bitmaps
DrawBitmap:
PROC [context: Context, bitmap: SampleMap, delta: Vec, bounds: Box, boxes: BoxGenerator] ←
NIL,
Optional proc for drawing a bitmap.
MaskChar:
PROC [context: Context, delta: Vec, mask: CharMask] ←
NIL,
Optional proc for masking a character from a font cache.
MoveBox:
PROC [context: Context, dstMin, srcMin, size: Vec] ←
NIL,
Optional proc for moving a rectangular region of the raster. If not supplied, IIBackdoor.MoveViewRectangle will raise an error when called.
DoBuffered:
PROC [context: Context, bounds: Box, copy:
BOOL, action:
PROC] ←
NIL
If supplied, allows full implementation of DoWithBuffer.
If copy=TRUE, device should copy from the main buffer to the temporary buffer; otherwise garbage in the buffer is OK, since the first thing that will happen is to fill it with a color.
];