diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index c390eb4cec..1b09719609 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -876,10 +876,9 @@ void wxGCDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h) CalcBoundingBox(x, y); CalcBoundingBox(x + w, y + h); - if ( m_graphicContext->ShouldOffset() ) + if (m_pen.IsOk() && m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT && m_pen.GetWidth() > 0) { - // if we are offsetting the entire rectangle is moved 0.5, so the - // border line gets off by 1 + // outline is one pixel larger than what raster-based wxDC implementations draw w -= 1; h -= 1; } @@ -905,10 +904,9 @@ void wxGCDCImpl::DoDrawRoundedRectangle(wxCoord x, wxCoord y, CalcBoundingBox(x, y); CalcBoundingBox(x + w, y + h); - if ( m_graphicContext->ShouldOffset() ) + if (m_pen.IsOk() && m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT && m_pen.GetWidth() > 0) { - // if we are offsetting the entire rectangle is moved 0.5, so the - // border line gets off by 1 + // outline is one pixel larger than what raster-based wxDC implementations draw w -= 1; h -= 1; } @@ -925,13 +923,6 @@ void wxGCDCImpl::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord w, wxCoord h) CalcBoundingBox(x, y); CalcBoundingBox(x + w, y + h); - if ( m_graphicContext->ShouldOffset() ) - { - // if we are offsetting the entire rectangle is moved 0.5, so the - // border line gets off by 1 - w -= 1; - h -= 1; - } m_graphicContext->DrawEllipse(x,y,w,h); }