always initialize dc with map mode
svn: r2109
This commit is contained in:
parent
0b83c1154f
commit
f5dec47e4e
|
@ -217,11 +217,15 @@ HDC wxDC::ThisDC(Bool flush_cache)
|
||||||
if (flush_cache)
|
if (flush_cache)
|
||||||
ReleaseSelectedCache();
|
ReleaseSelectedCache();
|
||||||
|
|
||||||
if (canvas) wnd = (wxWnd *)canvas->handle;
|
|
||||||
if (cdc)
|
if (cdc)
|
||||||
dc = cdc;
|
dc = cdc;
|
||||||
else if (wnd)
|
else {
|
||||||
dc = wnd->GetHDC();
|
if (canvas) {
|
||||||
|
wnd = (wxWnd *)canvas->handle;
|
||||||
|
if (wnd)
|
||||||
|
dc = wnd->GetHDC();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!old_pen) {
|
if (!old_pen) {
|
||||||
HPEN op;
|
HPEN op;
|
||||||
|
@ -230,6 +234,7 @@ HDC wxDC::ThisDC(Bool flush_cache)
|
||||||
old_pen = op;
|
old_pen = op;
|
||||||
ob = (HBRUSH)::SelectObject(dc, null_brush);
|
ob = (HBRUSH)::SelectObject(dc, null_brush);
|
||||||
old_brush = ob;
|
old_brush = ob;
|
||||||
|
ResetMapMode(dc);
|
||||||
}
|
}
|
||||||
|
|
||||||
return dc;
|
return dc;
|
||||||
|
@ -1469,15 +1474,16 @@ void wxDC::DrawEllipse(double x, double y, double width, double height)
|
||||||
HDC dc;
|
HDC dc;
|
||||||
int x1, y1, x2, y2;
|
int x1, y1, x2, y2;
|
||||||
|
|
||||||
|
if (anti_alias) {
|
||||||
|
DrawArc(x, y, width, height, 0, 2 * wxPI);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
dc = ThisDC();
|
dc = ThisDC();
|
||||||
|
|
||||||
if (!dc) return;
|
if (!dc) return;
|
||||||
|
|
||||||
if (anti_alias) {
|
ReleaseGraphics(dc);
|
||||||
DrawArc(x, y, width, height, 0, 2 * wxPI);
|
|
||||||
return;
|
|
||||||
} else
|
|
||||||
ReleaseGraphics(dc);
|
|
||||||
|
|
||||||
if (StippleBrush()) {
|
if (StippleBrush()) {
|
||||||
wxRegion *r;
|
wxRegion *r;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user