]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dcgraph.cpp
rebaked everything, fixes problems with OpenGL samples makefiles
[wxWidgets.git] / src / common / dcgraph.cpp
index 4e1fdfed7ffc483e77980b2e5f026863ed7a44e7..d6e6112d967aba7da3fb67b5f24c0612de28c79d 100644 (file)
@@ -52,19 +52,23 @@ static inline double DegToRad(double deg)
 
 IMPLEMENT_DYNAMIC_CLASS(wxGCDC, wxDC)
 
-wxGCDC::wxGCDC(const wxWindowDC& dc)
+wxGCDC::wxGCDC(const wxWindowDC& dc) :
+  wxDC( new wxGCDCImpl( this, dc ) )
 {
-    m_pimpl = new wxGCDCImpl( this, dc );
 }
 
-wxGCDC::wxGCDC( const wxMemoryDC& dc)
+wxGCDC::wxGCDC( const wxMemoryDC& dc) :
+  wxDC( new wxGCDCImpl( this, dc ) )
 {
-    m_pimpl = new wxGCDCImpl( this, dc );
 }
 
-wxGCDC::wxGCDC()
+wxGCDC::wxGCDC() :
+  wxDC( new wxGCDCImpl( this ) )
+{
+}
+
+wxGCDC::~wxGCDC()
 {
-    m_pimpl = new wxGCDCImpl( this );
 }
 
 wxGraphicsContext* wxGCDC::GetGraphicsContext()
@@ -326,44 +330,6 @@ void wxGCDCImpl::SetMapMode( int mode )
     ComputeScaleAndOrigin();
 }
 
-void wxGCDCImpl::SetUserScale( double x, double y )
-{
-    // allow negative ? -> no
-
-    m_userScaleX = x;
-    m_userScaleY = y;
-    ComputeScaleAndOrigin();
-}
-
-void wxGCDCImpl::SetLogicalScale( double x, double y )
-{
-    // allow negative ?
-    m_logicalScaleX = x;
-    m_logicalScaleY = y;
-    ComputeScaleAndOrigin();
-}
-
-void wxGCDCImpl::SetLogicalOrigin( wxCoord x, wxCoord y )
-{
-    m_logicalOriginX = x * m_signX;   // is this still correct ?
-    m_logicalOriginY = y * m_signY;
-    ComputeScaleAndOrigin();
-}
-
-void wxGCDCImpl::SetDeviceOrigin( wxCoord x, wxCoord y )
-{
-    m_deviceOriginX = x;
-    m_deviceOriginY = y;
-    ComputeScaleAndOrigin();
-}
-
-void wxGCDCImpl::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
-{
-    m_signX = (xLeftRight ?  1 : -1);
-    m_signY = (yBottomUp ? -1 :  1);
-    ComputeScaleAndOrigin();
-}
-
 wxSize wxGCDCImpl::GetPPI() const
 {
     return wxSize(72, 72);
@@ -375,9 +341,8 @@ int wxGCDCImpl::GetDepth() const
 }
 
 void wxGCDCImpl::ComputeScaleAndOrigin()
-{
-    m_scaleX = m_logicalScaleX * m_userScaleX;
-    m_scaleY = m_logicalScaleY * m_userScaleY;
+{    
+    wxDCImpl::ComputeScaleAndOrigin();
 
     if ( m_graphicContext )
     {