]> git.saurik.com Git - wxWidgets.git/commitdiff
correct meaning of logical origin
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 31 Oct 2006 10:30:42 +0000 (10:30 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 31 Oct 2006 10:30:42 +0000 (10:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/dcgraph.cpp

index 5b173d0aa42804f8727f4972aac92aaf1246fb18..c0bcd97b1aaa13ccd28ebf62b43e4f2296654b78 100644 (file)
@@ -301,7 +301,8 @@ void wxGCDC::ComputeScaleAndOrigin()
     m_matrixCurrent = m_graphicContext->CreateMatrix();
     m_matrixCurrent.Translate( m_deviceOriginX, m_deviceOriginY );
     m_matrixCurrent.Scale( m_scaleX, m_scaleY );
-    m_matrixCurrent.Translate( m_logicalOriginX, m_logicalOriginY );
+    // the logical origin sets the origin to have new coordinates
+    m_matrixCurrent.Translate( -m_logicalOriginX, -m_logicalOriginY );
 
     m_graphicContext->SetTransform( m_matrixOriginal );
     m_graphicContext->ConcatTransform( m_matrixCurrent );