123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #include "PaintCanvas.h"
- PaintCanvas::PaintCanvas()
- {
- qdcontext=0;
- }
- bool PaintCanvas::beginPaint(BaseWnd *wnd)
- {
- HIWindowRef macWnd = wnd->getOsWindowHandle();
- qdcontext = GetWindowPort(macWnd);
- QDBeginCGContext(qdcontext, &context);
-
- return true;
- }
- PaintCanvas::~PaintCanvas()
- {
- if (qdcontext)
- QDEndCGContext(qdcontext, &context);
- }
- WndCanvas::WndCanvas()
- {
- qdcontext=0;
- }
- WndCanvas::~WndCanvas()
- {
- if (qdcontext)
- QDEndCGContext(qdcontext, &context);
- }
-
- int WndCanvas::attachToClient(BaseWnd *basewnd)
- {
- HIWindowRef macWnd = basewnd->getOsWindowHandle();
-
- qdcontext = GetWindowPort(macWnd);
- QDBeginCGContext(qdcontext, &context);
- return 1;
- }
-
- TextInfoCanvas::TextInfoCanvas(BaseWnd */*unused*/)
- {
- }
- TextInfoCanvas::~TextInfoCanvas()
- {
- }
|