ETHZ_Logo RAMSES_Logo_Right   RAMSES   RAMSES_Logo_Left Systems Ecology  
Start    search button      Modules:   A-Z   Function   Layer        QuickRefs:   DM   AuxLib   AuxLibE   SciLib   EasyMW   MW   ISIS   RMSLib

DEFINITION MODULE DMQuickDraw;

  (*******************************************************************

    Module  DMQuickDraw     ('Dialog Machine' DM_V3.0)

      Copyright (c) 1986-2006 by Klara Vancso, Andreas Fischlin and
      ETH Zurich.

    Purpose   Plattform specific direct access to drawing 
              routines from the Apple Macintosh QuickDraw 
              API (obsolete).

    Remarks   This module belongs to the 'Dialog Machine'.


    Programming

      o Design
        Klara Vancso              17/04/1986

      o Implementation
        Klara Vancso              17/04/1986
        Andreas Fischlin          06/01/1990


    ETH Zurich
    Systems Ecology
    CHN E 35.1
    Universitaetstrasse 16
    8092 Zurich
    SWITZERLAND

    URLs:
        <mailto:RAMSES@env.ethz.ch>
        <http://www.sysecol.ethz.ch>
        <http://www.sysecol.ethz.ch/SimSoftware/RAMSES>


    Last revision of definition:  15/11/1992  AF

  *******************************************************************)


  FROM SYSTEM     IMPORT BYTE;
  FROM DMMemTypes IMPORT SignedByte, Byte, Ptr, Handle, ProcPtr, Fixed,
                         StringPtr, StringHandle, Str255;

  CONST
      srcCopy      = 0;  (*  the 16 transfer modes  *)
      srcOr        = 1;
      srcXor       = 2;
      srcBic       = 3;
      notSrcCopy   = 4;
      notSrcOr     = 5;
      notSrcXor    = 6;
      notSrcBic    = 7;
      patCopy      = 8;
      patOr        = 9;
      patXor       = 10;
      patBic       = 11;
      notPatCopy   = 12;
      notPatOr     = 13;
      notPatXor    = 14;
      notPatBic    = 15;

      (*  QuickDraw color separation constants  *)

      normalBit    = 0;       (*  normal screen mapping    *)
      inverseBit   = 1;       (*  inverse screen mapping   *)
      redBit       = 4;       (*  RGB additive mapping  *)
      greenBit     = 3;
      blueBit      = 2;
      cyanBit      = 8;       (*  CMYBk subtractive mapping  *)
      magentaBit   = 7;
      yellowBit    = 6;
      blackBit     = 5;

      blackColor   = 33D;     (*  colors expressed in these mappings  *)
      whiteColor   = 30D;
      redColor     = 205D;
      greenColor   = 341D;
      blueColor    = 409D;
      cyanColor    = 273D;
      magentaColor = 137D;
      yellowColor  = 69D;

      picLParen    = 0;       (*  standard picture comments  *)
      picRParen    = 1;


  TYPE
     QDByte    =  SignedByte;
     QDPtr     =  Ptr;              (*  blind pointer  *)
     QDHandle  =  Handle;           (*  blind handle   *)
     Pattern   =  ARRAY[0..7] OF BYTE;
     Bits16    =  ARRAY[0..15] OF INTEGER;
     VHSelect  =  (v,h);
     VHSelectR =  [v..h];
     GrafVerb  =  (frame,paint,erase,invert,fill);
     StyleItem =  (bold,italic,underline,outline,shadow,condense,extend);
     Style     =  SET OF StyleItem;

     FontInfo  =  RECORD
                    ascent:  INTEGER;
                    descent: INTEGER;
                    widMax:  INTEGER;
                    leading: INTEGER;
                  END;

     Point = RECORD
               CASE :INTEGER OF
                 0: v: INTEGER;
                    h: INTEGER;
               | 1: vh: ARRAY VHSelectR OF INTEGER;
               END;
             END;


     Rect = RECORD
              CASE :INTEGER OF
                0: top:      INTEGER;
                   left:     INTEGER;
                   bottom:   INTEGER;
                   right:    INTEGER;
              | 1: topLeft:  Point;
                   botRight: Point;
              END;
            END;


     BitMap = RECORD
                baseAddr: Ptr;
                rowBytes: INTEGER;
                bounds:   Rect;
              END;


     Cursor = RECORD
                data:    Bits16;
                mask:    Bits16;
                hotSpot: Point;
              END;


     PenState = RECORD
                  pnLoc:   Point;
                  pnSize:  Point;
                  pnMode:  INTEGER;
                  pnPat:   Pattern;
                END;


     PolyHandle = POINTER TO PolyPtr;
     PolyPtr    = POINTER TO Polygon;
     Polygon    = RECORD
                    polySize:   INTEGER;
                    polyBBox:   Rect;
                    polyPoints: ARRAY[0..0] OF Point;
                  END;


     RgnHandle = POINTER TO RgnPtr;
     RgnPtr    = POINTER TO Region;
     Region    =  RECORD
                    rgnSize:   INTEGER;  (*  rgnSize = 10 for rectangular  *)
                    rgnBBox:   Rect;
                    (*  plus more data if not rectangular  *)
                  END;


     PicHandle = POINTER TO PicPtr;
     PicPtr    = POINTER TO Picture;
     Picture   =  RECORD
                    picSize:    INTEGER;
                    picFrame:   Rect;
                    (*  plus byte codes for picture content  *)
                  END;


     QDProcsPtr = POINTER TO QDProcs;
     QDProcs = RECORD
                 textProc:    Ptr;
                 lineProc:    Ptr;
                 rectProc:    Ptr;
                 rRectProc:   Ptr;
                 ovalProc:    Ptr;
                 arcProc:     Ptr;
                 polyProc:    Ptr;
                 rgnProc:     Ptr;
                 bitsProc:    Ptr;
                 commentProc: Ptr;
                 txMeasProc:  Ptr;
                 getPicProc:  Ptr;
                 putPicProc:  Ptr;
               END;


     GrafPtr  = POINTER TO GrafPort;
     GrafPort = RECORD
                  device:      INTEGER;
                  portBits:    BitMap;
                  portRect:    Rect;
                  visRgn:      RgnHandle;
                  clipRgn:     RgnHandle;
                  bkPat:       Pattern;
                  fillPat:     Pattern;
                  pnLoc:       Point;
                  pnSize:      Point;
                  pnMode:      INTEGER;
                  pnPat:       Pattern;
                  pnVis:       INTEGER;
                  txFont:      INTEGER;
                  txFace:      Style;
                  txMode:      INTEGER;
                  txSize:      INTEGER;
                  spExtra:     LONGINT;
                  fgColor:     LONGINT;
                  bkColor:     LONGINT;
                  colrBit:     INTEGER;
                  patStretch:  INTEGER;
                  picSave:     Handle;
                  rgnSave:     Handle;
                  polySave:    Handle;
                  grafProcs:   QDProcsPtr;
                END;

  TYPE
     FMOutPtr = POINTER TO FMOutRec;
     FMOutRec = RECORD
                  errNum:     INTEGER;     (*  used only for GrafError     *)
                  fontHandle: QDHandle;    (*  handle to font              *)
                  bold:       Byte;        (*  how much to smear horiz     *)
                  italic:     Byte;        (*  how much to shear           *)
                  ulOffset:   Byte;        (*  pixels below baseline       *)
                  ulShadow:   Byte;        (*  how big is the halo         *)
                  ulThick:    Byte;        (*  how thick is the underline  *)
                  shadow:     Byte;        (*  0,1,2,or 3 only             *)
                  extra:      SignedByte;  (*  extra white dots each char  *)
                  ascent:     Byte;        (*  ascent measure for font     *)
                  descent:    Byte;        (*  descent measure for font    *)
                  widMax:     Byte;        (*  width of widest char        *)
                  leading:    SignedByte;  (*  leading between lines       *)
                  unused:     Byte;
                  numer:      Point;       (*  use this modified scale to  *)
                  denom:      Point;       (*  draw or measure text with   *)
                END;

(*  The following are the QuickDraw variables. They are declared here in
  reverse order of their normal appearance.  This is because the MDS
  linker allocates storage for globals (relative to A5) in reverse
  order of their declaration.*)

  VAR (*  Private QuickDraw variables  *)
    fontData:   FMOutRec;
    fontPtr:    FMOutPtr;      (*  the last font used, used by DrawText   *)
    fontAdj:    LONGINT;       (*  Fixed Point to adjust for font subst.  *)
    patAlign:   Point;         (*  to align pattern during DrawPicture    *)
    polyMax:    INTEGER;       (*  max bytes allocated so far to the Poly  *)
    thePoly:    PolyHandle;    (*  the current polygon being defined      *)
    playIndex:  INTEGER;       (*  used by StdGetPic                      *)
    playPic:    PicHandle;     (*  used by StdGetPic                      *)
    rgnMax:     INTEGER;       (*  max bytes allocated so far to rgnBuf   *)
    rgnIndex:   INTEGER;       (*  current bytes used in rgnBuf           *)
    rgnBuf:     QDHandle;      (*  point saving buffer for OpenRgn        *)
    wideData:   Region;
    wideMaster: RgnPtr;
    wideOpen:   RgnHandle;     (*  a dummy rectangular region, read-only  *)

    (*  Public QuickDraw variables  *)
    randSeed:   LONGINT;
    screenBits: BitMap;
    arrow:      Cursor;
    dkGray:     Pattern;
    ltGray:     Pattern;
    gray:       Pattern;
    black:      Pattern;
    white:      Pattern;
    thePort:    GrafPtr;

  TYPE
    QDGlobals = RECORD
                  randSeed:   LONGINT;
                  screenBits: BitMap;
                  arrow:      Cursor;
                  dkGray:     Pattern;
                  ltGray:     Pattern;
                  gray:       Pattern;
                  black:      Pattern;
                  white:      Pattern;
                  thePort:    GrafPtr;
    			END;
     QDGlobalsPtr = POINTER TO QDGlobals;

  VAR
    QDGPtr: QDGlobalsPtr;
    (* allows to acces directly the QDGlobals instead of the above exported vars *)

(* String conversion routines *)

PROCEDURE ArrToStr(VAR modula2Str, macPascalStr: ARRAY OF CHAR);
PROCEDURE StrToArr (VAR macPascalStr, modula2Str: ARRAY OF CHAR);
  (*
    a modula2Str can be of any length (<32 KBytes) and is
    terminated by 0C
    a macPascalStr is of type ARRAY [0..255] OF CHAR and contains
    the actual length in the first element ORD(macPascalStr[0]).
    The first parameters is the source (input), the second the result
    string; VAR parameters used for input parameters only for
    efficiency reasons:
  *)

(*  GrafPort Routines  *)

PROCEDURE InitGraf   (globalPtr: Ptr);                  CODE 0A86EH;
PROCEDURE OpenPort   (port: GrafPtr);                   CODE 0A86FH;
PROCEDURE InitPort   (port: GrafPtr);                   CODE 0A86DH;
PROCEDURE ClosePort  (port: GrafPtr);                   CODE 0A87DH;
PROCEDURE SetPort    (port: GrafPtr);                   CODE 0A873H;
PROCEDURE GetPort    (VAR port: GrafPtr);               CODE 0A874H;
PROCEDURE GrafDevice (device: INTEGER);                 CODE 0A872H;
PROCEDURE SetPortBits(VAR bm: BitMap);                  CODE 0A875H;
PROCEDURE PortSize   (width,height: INTEGER);           CODE 0A876H;
PROCEDURE MovePortTo (leftGlobal,topGlobal: INTEGER);   CODE 0A877H;
PROCEDURE SetOrigin  (h,v: INTEGER);                    CODE 0A878H;
PROCEDURE SetClip    (rgn: RgnHandle);                  CODE 0A879H;
PROCEDURE GetClip    (rgn: RgnHandle);                  CODE 0A87AH;
PROCEDURE ClipRect   (VAR r: Rect);                     CODE 0A87BH;
PROCEDURE BackPat    (VAR pat: Pattern);                CODE 0A87CH;

(*  Cursor Routines  *)

PROCEDURE InitCursor;                                   CODE 0A850H;
PROCEDURE SetCursor(VAR crsr: Cursor);                  CODE 0A851H;
PROCEDURE HideCursor;                                   CODE 0A852H;
PROCEDURE ShowCursor;                                   CODE 0A853H;
PROCEDURE ObscureCursor;                                CODE 0A856H;

(*  Line Routines  *)

PROCEDURE HidePen;                                      CODE 0A896H;
PROCEDURE ShowPen;                                      CODE 0A897H;
PROCEDURE GetPen     (VAR pt: Point);                   CODE 0A89AH;
PROCEDURE GetPenState(VAR pnState: PenState);           CODE 0A898H;
PROCEDURE SetPenState(VAR pnState: PenState);           CODE 0A899H;
PROCEDURE PenSize    (width,height: INTEGER);           CODE 0A89BH;
PROCEDURE PenMode    (mode: INTEGER);                   CODE 0A89CH;
PROCEDURE PenPat     (VAR pat: Pattern);                CODE 0A89DH;
PROCEDURE PenNormal;                                    CODE 0A89EH;
PROCEDURE MoveTo     (h,v: INTEGER);                    CODE 0A893H;
PROCEDURE Move       (dh,dv: INTEGER);                  CODE 0A894H;
PROCEDURE LineTo     (h,v: INTEGER);                    CODE 0A891H;
PROCEDURE Line       (dh,dv: INTEGER);                  CODE 0A892H;


(*  Text Routines  *)

PROCEDURE TextFont     (font: INTEGER);                 CODE 0A887H;
PROCEDURE TextFace     (face: Style);                   CODE 0A888H;
PROCEDURE TextMode     (mode: INTEGER);                 CODE 0A889H;
PROCEDURE TextSize     (size: INTEGER);                 CODE 0A88AH;
PROCEDURE SpaceExtra   (extra: Fixed);                  CODE 0A88EH;
PROCEDURE ToolboxDrawChar(ordCh: INTEGER);              CODE 0A883H;
PROCEDURE ToolboxDrawString(VAR theString: Str255);     CODE 0A884H;
PROCEDURE DrawText     (textBuf: Ptr;
                        firstByte,byteCount: INTEGER);  CODE 0A885H;
PROCEDURE ToolboxCharWidth(ordCh: INTEGER): INTEGER;    CODE 0A88DH;
PROCEDURE ToolboxStringWidth(VAR theString: Str255): INTEGER;
                                                        CODE 0A88CH;
PROCEDURE TextWidth    (textBuf: Ptr; firstByte,
                        byteCount: INTEGER): INTEGER;   CODE 0A886H;
PROCEDURE GetFontInfo  (VAR info: FontInfo);            CODE 0A88BH;

(*  Point Calculations  *)

PROCEDURE AddPt         (src: Point; VAR dst: Point);   CODE 0A87EH;
PROCEDURE SubPt         (src: Point; VAR dst: Point);   CODE 0A87FH;
PROCEDURE SetPt         (VAR pt: Point; h,v: INTEGER);  CODE 0A880H;
PROCEDURE EqualPt       (pt1,pt2: Point): BOOLEAN;      CODE 0A881H;
PROCEDURE ScalePt       (VAR pt: Point;
                        VAR fromRect,toRect: Rect);     CODE 0A8F8H;
PROCEDURE MapPt         (VAR pt: Point;
                        VAR fromRect,toRect: Rect);     CODE 0A8F9H;
PROCEDURE LocalToGlobal (VAR pt: Point);                CODE 0A870H;
PROCEDURE GlobalToLocal (VAR pt: Point);                CODE 0A871H;

(*  Rectangle Calculations  *)

PROCEDURE SetRect    (VAR r: Rect;
                      left,top,right,bottom: INTEGER);  CODE 0A8A7H;
PROCEDURE EqualRect  (VAR rect1,rect2: Rect): BOOLEAN;  CODE 0A8A6H;
PROCEDURE EmptyRect  (VAR r: Rect): BOOLEAN;            CODE 0A8AEH;
PROCEDURE OffsetRect (VAR r: Rect; dh,dv: INTEGER);     CODE 0A8A8H;
PROCEDURE MapRect    (VAR r:  Rect;
                      VAR fromRect,toRect: Rect);       CODE 0A8FAH;
PROCEDURE InsetRect  (VAR r: Rect; dh,dv: INTEGER);     CODE 0A8A9H;
PROCEDURE SectRect   (VAR src1,src2: Rect;
                      VAR dstRect: Rect): BOOLEAN;      CODE 0A8AAH;
PROCEDURE UnionRect  (VAR src1,src2: Rect;
                      VAR dstRect: Rect);               CODE 0A8ABH;
PROCEDURE PtInRect   (pt: Point; VAR r: Rect): BOOLEAN; CODE 0A8ADH;
PROCEDURE Pt2Rect    (pt1,pt2: Point;
                      VAR dstRect: Rect);               CODE 0A8ACH;

(*  Graphical Operations on Rectangles  *)

PROCEDURE FrameRect  (VAR r: Rect);                     CODE 0A8A1H;
PROCEDURE PaintRect  (VAR r: Rect);                     CODE 0A8A2H;
PROCEDURE EraseRect  (VAR r: Rect);                     CODE 0A8A3H;
PROCEDURE InvertRect (VAR r: Rect);                     CODE 0A8A4H;
PROCEDURE FillRect   (VAR r: Rect; VAR pat: Pattern);   CODE 0A8A5H;

(*  RoundRect Routines  *)

PROCEDURE FrameRoundRect  (VAR r: Rect; ovWd,ovHt: INTEGER); CODE 0A8B0H;
PROCEDURE PaintRoundRect  (VAR r: Rect; ovWd,ovHt: INTEGER); CODE 0A8B1H;
PROCEDURE EraseRoundRect  (VAR r: Rect; ovWd,ovHt: INTEGER); CODE 0A8B2H;
PROCEDURE InvertRoundRect (VAR r: Rect; ovWd,ovHt: INTEGER); CODE 0A8B3H;
PROCEDURE FillRoundRect   (VAR r: Rect; ovWd,ovHt: INTEGER;
                           VAR pat: Pattern);                CODE 0A8B4H;

(*  Oval Routines  *)

PROCEDURE FrameOval  (VAR r: Rect);                     CODE 0A8B7H;
PROCEDURE PaintOval  (VAR r: Rect);                     CODE 0A8B8H;
PROCEDURE EraseOval  (VAR r: Rect);                     CODE 0A8B9H;
PROCEDURE InvertOval (VAR r: Rect);                     CODE 0A8BAH;
PROCEDURE FillOval   (VAR r: Rect; VAR pat: Pattern);   CODE 0A8BBH;


(*  Arc Routines  *)

PROCEDURE FrameArc  (VAR r: Rect; startAngle,arcAngle: INTEGER);  CODE 0A8BEH;
PROCEDURE PaintArc  (VAR r: Rect; startAngle,arcAngle: INTEGER);  CODE 0A8BFH;
PROCEDURE EraseArc  (VAR r: Rect; startAngle,arcAngle: INTEGER);  CODE 0A8C0H;
PROCEDURE InvertArc (VAR r: Rect; startAngle,arcAngle: INTEGER);  CODE 0A8C1H;
PROCEDURE FillArc   (VAR r: Rect; startAngle,arcAngle: INTEGER;
                     VAR pat: Pattern);                           CODE 0A8C2H;
PROCEDURE PtToAngle (VAR r: Rect; pt: Point; VAR angle: INTEGER); CODE 0A8C3H;

(*  Polygon Routines  *)

PROCEDURE OpenPoly():  PolyHandle;                              CODE 0A8CBH;
PROCEDURE ClosePoly;                                            CODE 0A8CCH;
PROCEDURE KillPoly    (poly: PolyHandle);                       CODE 0A8CDH;
PROCEDURE OffsetPoly  (poly: PolyHandle; dh,dv: INTEGER);       CODE 0A8CEH;
PROCEDURE MapPoly     (poly: PolyHandle; VAR fromRect,toRect: Rect);CODE 0A8FCH;
PROCEDURE FramePoly   (poly: PolyHandle);                       CODE 0A8C6H;
PROCEDURE PaintPoly   (poly: PolyHandle);                       CODE 0A8C7H;
PROCEDURE ErasePoly   (poly: PolyHandle);                       CODE 0A8C8H;
PROCEDURE InvertPoly  (poly: PolyHandle);                       CODE 0A8C9H;
PROCEDURE FillPoly    (poly: PolyHandle; VAR pat: Pattern);     CODE 0A8CAH;

(*  Region Calculations  *)

PROCEDURE NewRgn(): RgnHandle;                                  CODE 0A8D8H;
PROCEDURE DisposeRgn(rgn: RgnHandle);                           CODE 0A8D9H;
PROCEDURE CopyRgn   (srcRgn,dstRgn: RgnHandle);                 CODE 0A8DCH;
PROCEDURE SetEmptyRgn(rgn: RgnHandle);                          CODE 0A8DDH;
PROCEDURE SetRectRgn(rgn: RgnHandle;
                     left,top,right,bottom: INTEGER);           CODE 0A8DEH;
PROCEDURE RectRgn   (rgn: RgnHandle; VAR r: Rect);              CODE 0A8DFH;
PROCEDURE OpenRgn;                                              CODE 0A8DAH;
PROCEDURE CloseRgn  (dstRgn: RgnHandle);                        CODE 0A8DBH;
PROCEDURE OffsetRgn (rgn: RgnHandle; dh,dv: INTEGER);           CODE 0A8E0H;
PROCEDURE MapRgn    (rgn: RgnHandle; VAR fromRect,toRect: Rect);CODE 0A8FBH;
PROCEDURE InsetRgn  (rgn: RgnHandle; dh,dv: INTEGER);           CODE 0A8E1H;
PROCEDURE SectRgn   (srcRgnA,srcRgnB,dstRgn: RgnHandle);        CODE 0A8E4H;
PROCEDURE UnionRgn  (srcRgnA,srcRgnB,dstRgn: RgnHandle);        CODE 0A8E5H;
PROCEDURE DiffRgn   (srcRgnA,srcRgnB,dstRgn: RgnHandle);        CODE 0A8E6H;
PROCEDURE XorRgn    (srcRgnA,srcRgnB,dstRgn: RgnHandle);        CODE 0A8E7H;
PROCEDURE EqualRgn  (rgnA,rgnB: RgnHandle): BOOLEAN;            CODE 0A8E3H;
PROCEDURE EmptyRgn  (rgn: RgnHandle): BOOLEAN;                  CODE 0A8E2H;
PROCEDURE PtInRgn   (pt: Point; rgn: RgnHandle): BOOLEAN;       CODE 0A8E8H;
PROCEDURE RectInRgn (VAR r: Rect; rgn: RgnHandle): BOOLEAN;     CODE 0A8E9H;

(*  Graphical Operations on Regions  *)

PROCEDURE FrameRgn  (rgn: RgnHandle);                           CODE 0A8D2H;
PROCEDURE PaintRgn  (rgn: RgnHandle);                           CODE 0A8D3H;
PROCEDURE EraseRgn  (rgn: RgnHandle);                           CODE 0A8D4H;
PROCEDURE InvertRgn (rgn: RgnHandle);                           CODE 0A8D5H;
PROCEDURE FillRgn   (rgn: RgnHandle; VAR pat: Pattern);         CODE 0A8D6H;

(*  Graphical Operations on BitMaps  *)

PROCEDURE ScrollRect(VAR dstRect: Rect; dh,dv: INTEGER;
                     updateRgn: RgnHandle);                     CODE 0A8EFH;
PROCEDURE CopyBits  (VAR srcBits,dstBits: BitMap;
                     VAR srcRect,dstRect: Rect;
                     mode:            INTEGER;
                     maskRgn:         RgnHandle);               CODE 0A8ECH;

(*  Picture Routines  *)

PROCEDURE OpenPicture(VAR picFrame: Rect): PicHandle;           CODE 0A8F3H;
PROCEDURE ClosePicture;                                         CODE 0A8F4H;
PROCEDURE DrawPicture(myPicture: PicHandle; VAR dstRect: Rect); CODE 0A8F6H;
PROCEDURE PicComment (kind,dataSize: INTEGER;
                      dataHandle: Handle);                      CODE 0A8F2H;
PROCEDURE KillPicture(myPicture: PicHandle);                    CODE 0A8F5H;

(*   The Bottleneck Interface:    *)

PROCEDURE SetStdProcs(VAR procs: QDProcs);                      CODE 0A8EAH;
PROCEDURE StdText    (count: INTEGER; textAddr: Ptr;
                      numer,denom: Point);                      CODE 0A882H;
PROCEDURE StdLine    (newPt: Point);                            CODE 0A890H;
PROCEDURE StdRect    (verb: GrafVerb; VAR r: Rect);             CODE 0A8A0H;
PROCEDURE StdRRect   (verb: GrafVerb; VAR r: Rect;
                      ovWd,ovHt: INTEGER);                      CODE 0A8AFH;
PROCEDURE StdOval    (verb: GrafVerb; VAR r: Rect);             CODE 0A8B6H;
PROCEDURE StdArc     (verb: GrafVerb; VAR r: Rect;
                      startAngle,arcAngle: INTEGER);            CODE 0A8BDH;
PROCEDURE StdPoly    (verb: GrafVerb; poly: PolyHandle);        CODE 0A8C5H;
PROCEDURE StdRgn     (verb: GrafVerb; rgn: RgnHandle);          CODE 0A8D1H;
PROCEDURE StdBits    (VAR srcBits: BitMap;
                      VAR srcRect,dstRect: Rect;
                      mode: INTEGER; maskRgn: RgnHandle);       CODE 0A8EBH;
PROCEDURE StdComment (kind,dataSize: INTEGER;
                      dataHandle: Handle);                      CODE 0A8F1H;
PROCEDURE StdTxMeas  (count: INTEGER; textAddr: Ptr;
                      VAR numer,denom: Point;
                      VAR info: FontInfo): INTEGER;             CODE 0A8EDH;
PROCEDURE StdGetPic  (dataPtr: Ptr; byteCount: INTEGER);        CODE 0A8EEH;
PROCEDURE StdPutPic  (dataPtr: Ptr; byteCount: INTEGER);        CODE 0A8F0H;

(*  Misc. Utility Routines  *)

PROCEDURE GetMouse (VAR pt: Point);							    CODE 0A972H;
PROCEDURE GetPixel  (h,v: INTEGER): BOOLEAN;                    CODE 0A865H;
PROCEDURE Random(): INTEGER;                                    CODE 0A861H;
PROCEDURE StuffHex  (thingptr: Ptr; theString: ARRAY OF CHAR);
                                                            (*  CODE 0A866H; *)
PROCEDURE ForeColor (color: LONGINT);                           CODE 0A862H;
PROCEDURE BackColor (color: LONGINT);                           CODE 0A863H;
PROCEDURE ColorBit  (whichBit: INTEGER);                        CODE 0A864H;

PROCEDURE UpdateQDGlobals;
(* updates the values of the exported public global variables to the current values
actually contained in the global QuickDraw variables *)

END DMQuickDraw.

  Contact RAMSES@env.ethz.ch Last updated: 25-Jul-2011 [Top of page]