From 06f80bde285ad2ff6972c7cf26047010360f04fe Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 21 Oct 2007 11:54:03 +0000 Subject: [PATCH] unifying offseting rules git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/graphics.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index a48b9e48b0..370ae935eb 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -292,7 +292,6 @@ public: virtual void StrokePath( const wxGraphicsPath& p ); virtual void FillPath( const wxGraphicsPath& p , int fillStyle = wxODDEVEN_RULE ); - virtual void DrawPath( const wxGraphicsPath& path, int fillStyle = wxODDEVEN_RULE ); // stroke lines connecting each of the points virtual void StrokeLines( size_t n, const wxPoint2DDouble *points); @@ -946,7 +945,7 @@ void wxGDIPlusContext::Init() void wxGDIPlusContext::SetDefaults() { m_context->SetTextRenderingHint(TextRenderingHintSystemDefault); - m_context->SetPixelOffsetMode(PixelOffsetModeHalf); + m_context->SetPixelOffsetMode(PixelOffsetModeHalf); m_context->SetSmoothingMode(SmoothingModeHighQuality); m_state1 = m_context->Save(); m_state2 = m_context->Save(); @@ -1026,21 +1025,13 @@ void wxGDIPlusContext::FillPath( const wxGraphicsPath& path , int fillStyle ) { if ( !m_brush.IsNull() ) { + wxGDIPlusOffsetHelper helper( m_context , ShouldOffset() ); ((GraphicsPath*) path.GetNativePath())->SetFillMode( fillStyle == wxODDEVEN_RULE ? FillModeAlternate : FillModeWinding); m_context->FillPath( ((wxGDIPlusBrushData*)m_brush.GetRefData())->GetGDIPlusBrush() , (GraphicsPath*) path.GetNativePath()); } } -void wxGDIPlusContext::DrawPath( const wxGraphicsPath& path, int fillStyle ) -{ - { - wxGDIPlusOffsetHelper helper( m_context , ShouldOffset() ); - FillPath( path , fillStyle ); - } - StrokePath( path ); -} - void wxGDIPlusContext::Rotate( wxDouble angle ) { m_context->RotateTransform( RadToDeg(angle) );