Mac: change draw-point to use Quartz in smoothed mode
svn: r12538
This commit is contained in:
parent
1a4b3abba7
commit
93a13222dc
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue
Block a user