From: Vadim Zeitlin Date: Sun, 14 Sep 2008 00:12:02 +0000 (+0000) Subject: make ellipses drawn with transparent pen more wxGC/Cairo-like (closes #9899) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c11bdf68b89e56b79828e67acc64d236f6623f7a make ellipses drawn with transparent pen more wxGC/Cairo-like (closes #9899) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 1ce082df0d..7c647971b0 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -955,6 +955,14 @@ void wxWindowDCImpl::DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord bool originChanged; DrawingSetup(gc, originChanged); + // If the pen is transparent pen we increase the size + // for better compatibility with other platforms. + if (m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT) + { + ++ww; + ++hh; + } + gdk_draw_arc(m_gdkwindow, gc, true, xx, yy, ww, hh, 0, 360*64); if (originChanged) @@ -962,7 +970,7 @@ void wxWindowDCImpl::DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord } if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT) - gdk_draw_arc( m_gdkwindow, m_penGC, FALSE, xx, yy, ww, hh, 0, 360*64 ); + gdk_draw_arc( m_gdkwindow, m_penGC, false, xx, yy, ww, hh, 0, 360*64 ); } CalcBoundingBox( x, y );