X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fe31db8170c0385ebd4dd56c0bb9a08367cc6ad9..c0badae10089ea785072d739df817b1f5f05c088:/src/msw/graphics.cpp diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index e3a43c31d7..69f3a08e67 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -1,11 +1,11 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/mac/carbon/dccg.cpp +// Name: src/msw/graphics.cpp // Purpose: wxGCDC class // Author: Stefan Csomor // Modified by: -// Created: 01/02/97 +// Created: 2006-09-30 // RCS-ID: $Id$ -// Copyright: (c) Stefan Csomor +// Copyright: (c) 2006 Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -13,9 +13,6 @@ #include "wx/dc.h" -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - #ifdef __BORLANDC__ #pragma hdrstop #endif @@ -38,6 +35,8 @@ #include "wx/graphics.h" +#if wxUSE_GRAPHICS_CONTEXT + #include using namespace std; @@ -349,6 +348,7 @@ wxGDIPlusContext::wxGDIPlusContext( WXHDC hdc ) { gGDILoader.EnsureIsLoaded(); m_context = new Graphics( (HDC) hdc); + m_context->SetSmoothingMode(SmoothingModeHighQuality); m_state1 = m_context->Save(); m_state2 = m_context->Save(); @@ -417,7 +417,7 @@ wxGraphicsPath* wxGDIPlusContext::CreatePath() void wxGDIPlusContext::Rotate( wxDouble angle ) { - m_context->RotateTransform( angle ); + m_context->RotateTransform( RadToDeg(angle) ); } void wxGDIPlusContext::Translate( wxDouble dx , wxDouble dy ) @@ -427,21 +427,7 @@ void wxGDIPlusContext::Translate( wxDouble dx , wxDouble dy ) void wxGDIPlusContext::Scale( wxDouble xScale , wxDouble yScale ) { - PointF penWidth( m_pen->GetWidth(), 0); - Matrix matrix ; - if ( !m_penTransparent ) - { - m_context->GetTransform(&matrix); - matrix.TransformVectors(&penWidth); - } m_context->ScaleTransform(xScale,yScale); - if ( !m_penTransparent ) - { - m_context->GetTransform(&matrix); - matrix.Invert(); - matrix.TransformVectors(&penWidth) ; - m_pen->SetWidth( sqrt( penWidth.X*penWidth.X + penWidth.Y*penWidth.Y)); - } } void wxGDIPlusContext::PushState() @@ -945,3 +931,6 @@ wxGraphicsContext* wxGraphicsContext::Create( const wxWindowDC& dc) { return new wxGDIPlusContext( (HDC) dc.GetHDC() ); } + + +#endif // wxUSE_GRAPHICS_CONTEXT