/////////////////////////////////////////////////////////////////////////////
-// 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
/////////////////////////////////////////////////////////////////////////////
#include "wx/dc.h"
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
#ifdef __BORLANDC__
#pragma hdrstop
#endif
{
gGDILoader.EnsureIsLoaded();
m_context = new Graphics( (HDC) hdc);
+ m_context->SetSmoothingMode(SmoothingModeHighQuality);
m_state1 = m_context->Save();
m_state2 = m_context->Save();
void wxGDIPlusContext::Rotate( wxDouble angle )
{
- m_context->RotateTransform( angle );
+ m_context->RotateTransform( RadToDeg(angle) );
}
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()