Types and Constants
Context: TYPE ~ Imager.Context;
IntKey: TYPE ~ ImagerBackdoor.IntKey;
RealKey: TYPE ~ ImagerBackdoor.RealKey;
Rectangle: TYPE ~ ImagerBox.Rectangle;
Color: TYPE ~ ImagerColor.Color;
ColorOperator: TYPE ~ ImagerColor.ColorOperator;
Font: TYPE ~ ImagerFont.Font;
XStringProc: TYPE ~ ImagerFont.XStringProc;
PathProc: TYPE ~ ImagerPath.PathProc;
PixelArray: TYPE ~ ImagerPixelArray.PixelArray;
Transformation: TYPE ~ ImagerTransformation.Transformation;
TransformationRep: TYPE ~ ImagerTransformation.TransformationRep;
Factors: TYPE ~ ImagerTransformation.FactoredTransformation;
PSFont: TYPE ~ IPtoPS.PSFont;
ROPE: TYPE ~ Rope.ROPE;
Class: TYPE ~ ImagerPrivate.Class;
ClassRep:
PUBLIC
TYPE ~ ImagerPrivate.ClassRep;
-- export to Imager.ClassRep
FontRecord:
TYPE ~
RECORD [id:
INT ¬ -1, font: Font ¬
NIL, type:
ATOM ¬ $Unknown];
Piece:
TYPE ~
RECORD [
text: ROPE ¬ NIL, -- text to be justified
forMeasure: ROPE ¬ NIL, -- needed for string width measure
forBefore: ROPE ¬ NIL, -- needed before text shown
forAfter: ROPE ¬ NIL -- needed after text shown
];
DefType:
TYPE ~ {overlay, showbackward, plainJustify, mixedJustify};
Data: TYPE ~ REF DataRep;
DataRep:
TYPE ~
RECORD [
compact: BOOL ¬ FALSE, -- minimize output size?
stream: IO.STREAM, -- PostScript output stream
debug: IO.STREAM ¬ NIL, -- output stream for debugging
sampledColor: PixelArray ¬ NIL, -- maintain sampled color state
sampledColorM: Transformation ¬ NIL, -- maintain sampled color state
sampledColorOperator: ColorOperator ¬ NIL, -- maintain sampled color state
getTDone: BOOL ¬ FALSE, -- getTForm set?
getTForm: NAT ¬ firstIPForm, -- context transformation form
T: Transformation ¬ NIL, -- client to initial matrix
matrixStack: LIST OF TransformationRep ¬ NIL,
nest: INT ¬ 0, -- PostScript nesting level
fonts: LIST OF FontRecord ¬ NIL, -- cache of fonts found
font: FontRecord ¬ [0,, $Unknown], -- current font
fontStack: LIST OF FontRecord ¬ NIL, -- never promised a rose garden
nUnderlines: INT ¬ 0, -- ditto
justifying: BOOL ¬ FALSE, -- buffer for text justification?
colwidth: REAL ¬ 0.0, -- width of justification column
nPieces: INT ¬ 0, -- # different text pieces in line
piece: ARRAY [0..maxNPieces) OF Piece, -- piece of text for justified line
defined: ARRAY DefType OF BOOL ¬ ALL[FALSE], -- defined yet?
nInvalidChars: INT ¬ 0
];
ShowType:
TYPE ~ {normal, xRel, fixedXRel, backward};
maxNPieces: NAT ~ 100;
firstIPForm: NAT ~ 100;
endIPForm: NAT ~ 1000;
identity: Transformation ~ ImagerTransformation.Scale[1];
miterLimit: ImagerBackdoor.RealKey ~ miterLimit;
hex:
ARRAY [0..16)
OF
CHAR
¬
['0, '1, '2, '3, '4, '5, '6, '7, '8, '9, 'A, 'B, 'C, 'D, 'E, 'F];
mathChars:
ARRAY [32..126]
OF
BYTE ¬ [
each entry:
PostScript octal equivalent (or 250B if unsupported)
decimal Xerox character code
Xerox character with Look-M (math)
valid characters: 32-95, 97-111, 113-126 (but necessarily with PostScript equivalents)
invalid characters:
code = 59 (:): unprintable by Tioga
code = 96 (`): unprintable by Tioga
code = 112 (p): non-standard character set
040B--32:#--, 250B--33: --, 250B--34:°--, 245B--35:--, 250B--36:--,
270B--37:÷--, 331B--38:'--, 272B--39:P-- , 242B--40:`--, 326B--41:--,
327B--42:--, 261B--43:±--, 047B--44:--, 250B--45: --, 134B--46:+--,
306B--47:˜--, 117B--48:Ë--, 250B--49:¡--, 104B--50:--, 340B--51:.--,
305B--52:•--, 250B--53:–--, 304B--54:—--, 320B--55: --, 250B--56:Æ--,
267B--57:"--, 170B--58:§--, 250B--59:®--, 243B--60:d--, 271B--61:`--,
263B--62:e--, 250B--63:¿--, 250B--64:--, 042B--65: