]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dcgraph.cpp
wxWinCE compile fixes
[wxWidgets.git] / src / common / dcgraph.cpp
index 4b4461dc3edbaea1e52e09ca3ba9e86359b24dbb..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 );
@@ -786,13 +787,13 @@ void wxGCDC::DoGetTextExtent( const wxString &str, wxCoord *width, wxCoord *heig
     m_graphicContext->GetTextExtent( str, &w, &h, &d, &e );
 
     if ( height )
-        *height = h;
+        *height = (wxCoord)h;
     if ( descent )
-        *descent = d;
+        *descent = (wxCoord)d;
     if ( externalLeading )
-        *externalLeading =e;
+        *externalLeading = (wxCoord)e;
     if ( width )
-        *width = w;
+        *width = (wxCoord)w;
 
     if ( theFont )
     {