]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dc.cpp
return 0 (meaning the file is not seekable, as the docs now explain) instead of 4KB...
[wxWidgets.git] / src / msw / dc.cpp
index 5a8608840b557b41ed29bf66f6f06143aa4e7a3f..c912e076aaafb3a2a327587ebc272c6920f379e8 100644 (file)
@@ -1074,10 +1074,15 @@ void wxMSWDCImpl::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord hei
 
     wxBrushAttrsSetter cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling
 
-    wxCoord x2 = (x+width);
-    wxCoord y2 = (y+height);
+    // +1 below makes the ellipse more similar to other platforms.
+    // In particular, DoDrawEllipse(x,y,1,1) should draw one point.
+    wxCoord x2 = x + width + 1;
+    wxCoord y2 = y + height + 1;
+
+    // Problem: Windows GDI Ellipse() with x2-x == y2-y == 3 and transparent
+    // pen doesn't draw anything. Should we provide a workaround?
 
-    (void)Ellipse(GetHdc(), XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2), YLOG2DEV(y2));
+    ::Ellipse(GetHdc(), XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2), YLOG2DEV(y2));
 
     CalcBoundingBox(x, y);
     CalcBoundingBox(x2, y2);