Skip to content

QuickDraw Calls in Nightingale Code

donbyrd edited this page Oct 3, 2012 · 5 revisions

This list is based only on inspection of files in CFilesBoth alphabetically through DrawUtils.c; it's certainly incomplete -- e.g., see calls to grafPort or Gworld functions in InitNightingale.c.

'
Prototype Sample call Comment
void SetPort(GrafPtr port) SetPort(fontPort)
void GetPort(GrafPtr *port) GetPort(&oldPort)
void SetOrigin(short h, short v) SetOrigin(doc->origin.h, doc->origin.v)
void SetClip(RgnHandle rgn) SetClip(rgnHdl)
void GetClip(RgnHandle rgn) GetClip(rgnHdl)
void ClipRect(const Rect *r) ClipRect(&displayBox)
void HidePen(void) HidePen()
void ShowPen(void) ShowPen()
void GetPen(Point *pt) GetPen(&pt)
void GetPenState(PenState *pnState) GetPenState(&pnState)
void SetPenState(const PenState *pnState) SetPenState(&pnState)
void PenSize(short width, short height) PenSize(1, d2p(thick))
void PenMode(short mode) PenMode(patXor)
void PenPat(const Pattern *pat) PenPat(NGetQDGlobalsBlack())
void PenNormal(void) PenNormal()
void MoveTo(short h, short v) MoveTo(xpDots, yp) DRAW line w/ current pen size, color, pattern
void Move(short dh, short dv) Move(stemSpace, 0) DRAW line w/ current pen size, color, pattern
void LineTo(short h, short v) LineTo(r.right-1, r.top-1)
void Line(short dh, short dv) Line(d2p(2*dhalfLn), -d2p(4*dhalfLn))
void ForeColor(long color) ForeColor(Voice2Color(doc, p->voice))
void SetRect(Rect *r, short left, short top, short right, short bottom) SetRect(&doc->growRect,0,0,SCROLLBAR_WIDTH+1,SCROLLBAR_WIDTH+1)
void OffsetRect(Rect *r, short dh, short dv) OffsetRect(&rSub, xhead-pContext->paper.left, yhead-pContext->paper.top)
void InsetRect(Rect *r, short dh, short dv) InsetRect(&rSub, -1, -1)
Boolean SectRect(const Rect *src1, const Rect *src2, Rect *dstRect) SectRect(&doc->allSheets,&r,&rem))
void UnionRect(const Rect *src1, const Rect *src2, Rect *dstRect) UnionRect(&LinkOBJRECT(pL), &rSub, &LinkOBJRECT(pL))
Boolean EqualRect(const Rect *rect1, const Rect *rect2) EqualRect(&aRect, &tempR)
void FrameRect(const Rect *r) FrameRect(&r) DRAW
void PaintRect(const Rect *r) PaintRect(&segRect) DRAW
void EraseRect(const Rect *r) EraseRect(&box) DRAW background color/pattern(?)
void FillRect(const Rect *r, const Pattern *pat) FillRect(&segRect, NGetQDGlobalsGray()) DRAW
void PaintRoundRect(const Rect *r, short ovalWidth, short ovalHeight) PaintRoundRect(&leftEndRect, ovalWidth, ovalHeight) DRAW
void FillRoundRect(const Rect *r, short ovalWidth, short ovalHeight, const Pattern *pat) FillRoundRect(&segRect, rDiam, rDiam, NGetQDGlobalsGray()) DRAW
RgnHandle NewRgn(void) NewRgn()
void DisposeRgn(RgnHandle rgn) DisposeRgn(rgn)
void RectRgn(RgnHandle rgn, const Rect *r) RectRgn(rectRgn,&bounds)
void SectRgn(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) SectRgn(rgn,rectRgn,dstRgn)
void FillRgn(RgnHandle rgn, const Pattern *pat) FillRgn(doc->background,&paperBack) DRAW
void CopyBits(const BitMap *srcBits, const BitMap *dstBits, const Rect *srcRect, const Rect *dstRect, short mode, RgnHandle maskRgn) CopyBits(fontPortBits, oldPortBits, &srcRect, &dstRect, srcOr, dstRgn)
void DrawPicture(PicHandle myPicture, const Rect *dstRect) DrawPicture(pictRsrc,&r) DRAW
Boolean PtInRect(Point pt, const Rect *r) PtInRect(dragPt, &sysObjRect)
void TextFont(short font) TextFont(csFont)
void TextFace(short face) TextFace(csFace)
void TextMode(short mode) TextMode(srcOr)
void TextSize(short size) TextSize(csSize)
void DrawChar(short ch) DrawChar(glyph) DRAW in current font, size, style, mode
void DrawString(ConstStr255Param s) DrawString(str) DRAW in current font, size, style, mode
void DrawText(const void *textBuf, short firstByte, short byteCount) DrawText(thisStr, 0, strlen(thisStr)) DRAW in current font, size, style, mode
short CharWidth(short ch) CharWidth(noteChar)
void GetFontInfo(FontInfo *info) GetFontInfo(&fInfo)
?? DragGrayRgn(sysRgn, dragPt, &limitR, &slopR, vAxisOnly, NULL) ??Can't find the prototype
?? GetPortVisibleRegion(oldPort,rgn)
?? GetRegionBounds(rgn,&bounds)
Notes:
1. Only calls that say "DRAW" can immediately affect what's visible.
2. Prototypes are from System 7.5 versions of Quickdraw.h and QuickdrawText.h (1995). NB: all are prefixed with "extern pascal".
3. HiliteRect, GetPortTxFont, GetPortTxFace, GetPortTxSize are Ngale routines, NOT QuickDraw.

Clone this wiki locally