Mac: change draw-point to use Quartz in smoothed mode

svn: r12538
This commit is contained in:
Matthew Flatt 2008-11-20 13:48:48 +00:00
parent 1a4b3abba7
commit 93a13222dc

View File

@ -533,6 +533,32 @@ void wxCanvasDC::DrawPoint(double x, double y)
if (!current_pen || current_pen->GetStyle() == wxTRANSPARENT)
return;
if (anti_alias) {
double xx, yy;
CGContextRef cg;
SetCurrentDC(TRUE);
cg = GetCG();
CGContextSaveGState(cg);
xx = SmoothingXFormX(x);
yy = SmoothingXFormY(y);
CGContextMoveToPoint(cg, xx, yy);
CGContextAddLineToPoint(cg, xx, yy);
wxMacSetCurrentTool(kPenTool);
CGContextStrokePath(cg);
wxMacSetCurrentTool(kNoTool);
CGContextRestoreGState(cg);
ReleaseCurrentDC();
return;
}
SetCurrentDC();
wxMacSetCurrentTool(kPenTool);
wxMacDrawPoint(XLOG2DEV(x), YLOG2DEV(y));