correct repair to Mac OS X clipping region for smoothed drawing
svn: r9837
This commit is contained in:
parent
03e5466059
commit
ead4b65935
|
@ -972,7 +972,7 @@ CGContextRef wxCanvasDC::GetCG()
|
||||||
if (onpaint_reg) {
|
if (onpaint_reg) {
|
||||||
::CopyRgn(onpaint_reg, clipRgn);
|
::CopyRgn(onpaint_reg, clipRgn);
|
||||||
if (clip_reg)
|
if (clip_reg)
|
||||||
::SectRgn(current_reg, clip_reg, current_reg);
|
::SectRgn(clipRgn, clip_reg, clipRgn);
|
||||||
} else {
|
} else {
|
||||||
::CopyRgn(clip_reg, clipRgn);
|
::CopyRgn(clip_reg, clipRgn);
|
||||||
}
|
}
|
||||||
|
|
|
@ -315,14 +315,6 @@ void wxCanvasDC::DrawText(const char* text, double x, double y, Bool combine, Bo
|
||||||
qdp = cMacDC->macGrafPort();
|
qdp = cMacDC->macGrafPort();
|
||||||
SyncCGContextOriginWithPort(cg, qdp);
|
SyncCGContextOriginWithPort(cg, qdp);
|
||||||
GetPortBounds(qdp, &portRect);
|
GetPortBounds(qdp, &portRect);
|
||||||
{
|
|
||||||
RgnHandle clipRgn;
|
|
||||||
clipRgn = GetCurrentClipRgn(qdp);
|
|
||||||
if (clipRgn) {
|
|
||||||
ClipCGContextToRegion(cg, &portRect, clipRgn);
|
|
||||||
DisposeRgn(clipRgn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CGContextTranslateCTM(cg,
|
CGContextTranslateCTM(cg,
|
||||||
gdx + (x * user_scale_x) + device_origin_x,
|
gdx + (x * user_scale_x) + device_origin_x,
|
||||||
(portRect.bottom - portRect.top)
|
(portRect.bottom - portRect.top)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user