X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f3d7473941a193fe1aed18b86a432b1600d55750..fc5d9e38ee002c024be3019e37b63f1a1d88e7c2:/src/gtk/dcclient.cpp diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 1ce082df0d..a7c10579f3 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 ); @@ -1062,9 +1070,6 @@ void wxWindowDCImpl::DoDrawBitmap( const wxBitmap &bitmap, int w = bitmap.GetWidth(); int h = bitmap.GetHeight(); - if (m_window && m_window->GetLayoutDirection() == wxLayout_RightToLeft) - xx -= w; - CalcBoundingBox( x, y ); CalcBoundingBox( x + w, y + h ); @@ -1073,6 +1078,9 @@ void wxWindowDCImpl::DoDrawBitmap( const wxBitmap &bitmap, int ww = XLOG2DEVREL(w); int hh = YLOG2DEVREL(h); + if (m_window && m_window->GetLayoutDirection() == wxLayout_RightToLeft) + xx -= ww; + if (IsOutsideOfClippingRegion( xx,yy,ww,hh )) return;