-- GraphicsBasic.mesa
-- Last changed by Doug Wyatt, August 30, 1982 4:21 pm
GraphicsBasic: CEDAR DEFINITIONS = {
-- Basic types --
Vec: TYPE = RECORD[x, y: REAL]; -- a vector
Transformation: TYPE = RECORD[a, b, c, d, e, f: REAL]; -- a transformation matrix
-- a b 0
-- c d 0
-- e f 1
Box: TYPE = RECORD[xmin, ymin, xmax, ymax: REAL]; -- a rectangular box
PaintMode: TYPE = {opaque, transparent, invert}; -- painting mode
Color: TYPE = RECORD[tag: ColorTag ← rgb, r, g, b: [0..256)]; -- a color value
ColorTag: TYPE = MACHINE DEPENDENT {rgb(0), stipple(1), (255)};
black: Color = [r: 0, g: 0, b: 0];
white: Color = [r: 255, g: 255, b: 255];
Texture: TYPE = ARRAY[0..16) OF WORD; -- a 16 by 16 bit stipple pattern
YMode: TYPE = {bottomUp, topDown};
StrokeEnds: TYPE = {butt, square, round}; -- endpoint types for strokes
Mark: TYPE = RECORD[CARDINAL]; -- a mark for use by Save and Restore
nullMark: Mark = [LAST[CARDINAL]];
baseMark: Mark = [0];
Trap: TYPE = RECORD[ -- a trapezoid
ybot: REAL, -- bottom y
xbotL: REAL, -- bottom left x
xbotR: REAL, -- bottom right x
ytop: REAL, -- top y
xtopL: REAL, -- top left x
xtopR: REAL, -- top right x
rectangle: BOOLEAN ← FALSE, -- is it a rectangle?
line: BOOLEAN ← FALSE -- is it a line?
];
-- Opaque types --
Path: TYPE = REF PathRep;
PathRep: TYPE;
DeviceRef: TYPE = REF DeviceObject;
DeviceObject: TYPE;
FontRef: TYPE = REF FontObject;
FontObject: TYPE;
ImageRef: TYPE = REF ImageObject;
ImageObject: TYPE;
MapperRef: TYPE = REF MapperObject;
MapperObject: TYPE;
ClipperRef: TYPE = REF ClipperObject;
ClipperObject: TYPE;
}.