Initial community commit
This commit is contained in:
parent
537bcbc862
commit
fc06254474
16440 changed files with 4239995 additions and 2 deletions
51
Src/Wasabi/api/wnd/platform/osx/PaintCanvas.cpp
Normal file
51
Src/Wasabi/api/wnd/platform/osx/PaintCanvas.cpp
Normal file
|
@ -0,0 +1,51 @@
|
|||
#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()
|
||||
{
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue