home *** CD-ROM | disk | FTP | other *** search
- #define DISABLE_LOCAL_CALLTRACE 1 // Set to 1 to disable Call Traces for this file.
- #define DISABLE_LOCAL_DEBUG 0 // Set to 1 to disable all debugging for this file.
- #include "DebugUtils.h"
-
- #include "QDUtils.h"
-
-
-
-
-
- QDContext::QDContext(void)
- {
- GetPort(&fSavePort);
-
- fPenSize = fSavePort->pnSize;
- fPenMode = fSavePort->pnMode;
- fPenPat = fSavePort->pnPat;
- fTextFont = fSavePort->txFont;
- fTextFace = fSavePort->txFace;
- fTextMode = fSavePort->txMode;
- fTextSize = fSavePort->txSize;
- GetForeColor(&fForeColor);
- GetBackColor(&fBackColor);
- }
-
-
-
-
-
- QDContext::QDContext(GrafPtr port)
- {
- GetPort(&fSavePort);
-
- fPenSize = fSavePort->pnSize;
- fPenMode = fSavePort->pnMode;
- fPenPat = fSavePort->pnPat;
- fTextFont = fSavePort->txFont;
- fTextFace = fSavePort->txFace;
- fTextMode = fSavePort->txMode;
- fTextSize = fSavePort->txSize;
- GetForeColor(&fForeColor);
- GetBackColor(&fBackColor);
-
- SetPort((GrafPtr)port);
- }
-
-
-
-
-
- QDContext::~QDContext(void)
- {
- SetPort(fSavePort);
-
- PenSize(fPenSize.h,fPenSize.v);
- PenMode(fPenMode);
- PenPat(&fPenPat);
- TextFont(fTextFont);
- TextFace(fTextFace);
- TextMode(fTextMode);
- TextSize(fTextSize);
- RGBForeColor(&fForeColor);
- RGBBackColor(&fBackColor);
- }
-
-
-
-
-
- QDClipContext::QDClipContext(GrafPtr port,RgnHandle clip)
- {
- QDContext context(port);
-
-
- fSavePort = port;
- fSaveClip = NewRgn();
-
- GetClip(fSaveClip);
- SetClip(clip);
- }
-
-
-
-
-
- QDClipContext::~QDClipContext(void)
- {
- QDContext context(fSavePort);
-
-
- SetClip(fSaveClip);
- DisposeRgn(fSaveClip);
- }
-