Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/tataki/canvas/mac/PaintCanvas.cpp

52 lines
789 B
C++
Raw Normal View History

2024-09-24 12:54:57 +00:00
#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()
{
}