]> git.saurik.com Git - wxWidgets.git/commitdiff
remove just added wxCoordRound() (see patch 1586499)
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 30 Oct 2006 20:34:25 +0000 (20:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 30 Oct 2006 20:34:25 +0000 (20:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/function.tex
include/wx/defs.h
include/wx/dfb/dc.h
include/wx/gtk1/dc.h
src/common/prntbase.cpp
src/mac/carbon/dccg.cpp

index 2b06d32202f8a647e3e9a249fd43dc1ccad1882b..18d99ced498ebce97807ff0a2312a3d8403d7a76 100644 (file)
@@ -58,7 +58,6 @@ the corresponding topic.
 \helpref{wxCONCAT}{wxconcat}\\
 \helpref{wxConcatFiles}{wxconcatfiles}\\
 \helpref{wxConstCast}{wxconstcast}\\
-\helpref{wxCoordRound}{wxcoordround}\\
 \helpref{wxCopyFile}{wxcopyfile}\\
 \helpref{wxCreateDynamicObject}{wxcreatedynamicobject}\\
 \helpref{wxCreateFileTipProvider}{wxcreatefiletipprovider}\\
@@ -2848,20 +2847,6 @@ this language feature but still take advantage of it when it is available.
 
 
 
-\membersection{::wxCoordRound}\label{wxcoordround}
-
-\func{wxCoord}{wxCoordRound}{\param{const float\& }{f}}
-
-\func{wxCoord}{wxCoordRound}{\param{const double\& }{f}}
-
-Convert \em{f} to a wxCoord, using round-to-nearest. This is commonly used
-in scaling calculations.
-
-\wxheading{Include files}
-
-<wx/defs.h>
-
-
 \membersection{::wxGetKeyState}\label{wxgetkeystate}
 
 \func{bool}{wxGetKeyState}{\param{wxKeyCode }{key}}
index 759d9325873b27e8783fa413b17aee4e0e2ce56b..22cb3d2d871828e3419a0f21f143f333afd361a7 100644 (file)
@@ -658,18 +658,6 @@ typedef int wxCoord;
 
 enum {  wxDefaultCoord = -1 };
 
-/*  round-to-nearest (used in scaling) */
-#ifdef __cplusplus
-inline wxCoord wxCoordRound(const float& f)
-{
-    return (f > 0) ? (wxCoord)(f + 0.5) : (f < 0) ? (wxCoord)(f - 0.5) : 0;
-}
-inline wxCoord wxCoordRound(const double& f)
-{
-    return (f > 0) ? (wxCoord)(f + 0.5) : (f < 0) ? (wxCoord)(f - 0.5) : 0;
-}
-#endif
-
 /*  ---------------------------------------------------------------------------- */
 /*  define fixed length types */
 /*  ---------------------------------------------------------------------------- */
index 7024ea37ad639ecdcc2c2cc017d38c8dfed7ded2..686bbea2a2ce4e20759e21ec7e7c45726e1f97d0 100644 (file)
@@ -80,35 +80,35 @@ public:
 
     wxCoord XDEV2LOG(wxCoord x) const
     {
-        return wxCoordRound((double)(x - m_deviceOriginX) / m_scaleX) * m_signX + m_logicalOriginX;
+        return wxRound((double)(x - m_deviceOriginX) / m_scaleX) * m_signX + m_logicalOriginX;
     }
     wxCoord XDEV2LOGREL(wxCoord x) const
     {
-        return wxCoordRound((double)(x) / m_scaleX);
+        return wxRound((double)(x) / m_scaleX);
     }
     wxCoord YDEV2LOG(wxCoord y) const
     {
-        return wxCoordRound((double)(y - m_deviceOriginY) / m_scaleY) * m_signY + m_logicalOriginY;
+        return wxRound((double)(y - m_deviceOriginY) / m_scaleY) * m_signY + m_logicalOriginY;
     }
     wxCoord YDEV2LOGREL(wxCoord y) const
     {
-        return wxCoordRound((double)(y) / m_scaleY);
+        return wxRound((double)(y) / m_scaleY);
     }
     wxCoord XLOG2DEV(wxCoord x) const
     {
-        return wxCoordRound((double)(x - m_logicalOriginX) * m_scaleX) * m_signX + m_deviceOriginX;
+        return wxRound((double)(x - m_logicalOriginX) * m_scaleX) * m_signX + m_deviceOriginX;
     }
     wxCoord XLOG2DEVREL(wxCoord x) const
     {
-        return wxCoordRound((double)(x) * m_scaleX);
+        return wxRound((double)(x) * m_scaleX);
     }
     wxCoord YLOG2DEV(wxCoord y) const
     {
-        return wxCoordRound((double)(y - m_logicalOriginY) * m_scaleY) * m_signY + m_deviceOriginY;
+        return wxRound((double)(y - m_logicalOriginY) * m_scaleY) * m_signY + m_deviceOriginY;
     }
     wxCoord YLOG2DEVREL(wxCoord y) const
     {
-        return wxCoordRound((double)(y) * m_scaleY);
+        return wxRound((double)(y) * m_scaleY);
     }
 
     // Returns the surface (and increases its ref count)
index e2c64864094ea1ff835b3b3b0f0d6fa731210160..b020c081bcf72d668ba9cb9cca2f2e98459591c7 100644 (file)
@@ -70,35 +70,35 @@ public:
 
     wxCoord XDEV2LOG(wxCoord x) const
     {
-        return wxCoordRound((double)(x - m_deviceOriginX) / m_scaleX) * m_signX + m_logicalOriginX;
+        return wxRound((double)(x - m_deviceOriginX) / m_scaleX) * m_signX + m_logicalOriginX;
     }
     wxCoord XDEV2LOGREL(wxCoord x) const
     {
-        return wxCoordRound((double)(x) / m_scaleX);
+        return wxRound((double)(x) / m_scaleX);
     }
     wxCoord YDEV2LOG(wxCoord y) const
     {
-        return wxCoordRound((double)(y - m_deviceOriginY) / m_scaleY) * m_signY + m_logicalOriginY;
+        return wxRound((double)(y - m_deviceOriginY) / m_scaleY) * m_signY + m_logicalOriginY;
     }
     wxCoord YDEV2LOGREL(wxCoord y) const
     {
-        return wxCoordRound((double)(y) / m_scaleY);
+        return wxRound((double)(y) / m_scaleY);
     }
     wxCoord XLOG2DEV(wxCoord x) const
     {
-        return wxCoordRound((double)(x - m_logicalOriginX) * m_scaleX) * m_signX + m_deviceOriginX;
+        return wxRound((double)(x - m_logicalOriginX) * m_scaleX) * m_signX + m_deviceOriginX;
     }
     wxCoord XLOG2DEVREL(wxCoord x) const
     {
-        return wxCoordRound((double)(x) * m_scaleX);
+        return wxRound((double)(x) * m_scaleX);
     }
     wxCoord YLOG2DEV(wxCoord y) const
     {
-        return wxCoordRound((double)(y - m_logicalOriginY) * m_scaleY) * m_signY + m_deviceOriginY;
+        return wxRound((double)(y - m_logicalOriginY) * m_scaleY) * m_signY + m_deviceOriginY;
     }
     wxCoord YLOG2DEVREL(wxCoord y) const
     {
-        return wxCoordRound((double)(y) * m_scaleY);
+        return wxRound((double)(y) * m_scaleY);
     }
 
 protected:
index 94b3de2a3922836f16e000c981bd71b060dd7ec7..43d3a361d2e8fff28acb987df233c812fa34945e 100644 (file)
@@ -27,6 +27,7 @@
     #include "wx/utils.h"
     #include "wx/dc.h"
     #include "wx/app.h"
+    #include "wx/math.h"
     #include "wx/msgdlg.h"
     #include "wx/layout.h"
     #include "wx/choice.h"
@@ -617,10 +618,10 @@ void wxPrintout::FitThisSizeToPageMargins(const wxSize& imageSize, const wxPageS
     GetPageSizeMM(&mw, &mh);
     float mmToDeviceX = float(pw) / mw;
     float mmToDeviceY = float(ph) / mh;
-    wxRect pageMarginsRect(paperRect.x + wxCoordRound(mmToDeviceX * topLeft.x),
-        paperRect.y + wxCoordRound(mmToDeviceY * topLeft.y),
-        paperRect.width - wxCoordRound(mmToDeviceX * (topLeft.x + bottomRight.x)),
-        paperRect.height - wxCoordRound(mmToDeviceY * (topLeft.y + bottomRight.y)));
+    wxRect pageMarginsRect(paperRect.x + wxRound(mmToDeviceX * topLeft.x),
+        paperRect.y + wxRound(mmToDeviceY * topLeft.y),
+        paperRect.width - wxRound(mmToDeviceX * (topLeft.x + bottomRight.x)),
+        paperRect.height - wxRound(mmToDeviceY * (topLeft.y + bottomRight.y)));
     wxCoord w, h;
     m_printoutDC->GetSize(&w, &h);
     float scaleX = (float(pageMarginsRect.width) * w) / (float(pw) * imageSize.x);
@@ -708,10 +709,10 @@ wxRect wxPrintout::GetLogicalPaperRect() const
     // This DC doesn't match the printed page, so we have to scale.
     float scaleX = float(w) / pw;
     float scaleY = float(h) / ph;
-    return wxRect(m_printoutDC->DeviceToLogicalX(wxCoordRound(paperRect.x * scaleX)), 
-        m_printoutDC->DeviceToLogicalY(wxCoordRound(paperRect.y * scaleY)), 
-        m_printoutDC->DeviceToLogicalXRel(wxCoordRound(paperRect.width * scaleX)), 
-        m_printoutDC->DeviceToLogicalYRel(wxCoordRound(paperRect.height * scaleY)));
+    return wxRect(m_printoutDC->DeviceToLogicalX(wxRound(paperRect.x * scaleX)), 
+        m_printoutDC->DeviceToLogicalY(wxRound(paperRect.y * scaleY)), 
+        m_printoutDC->DeviceToLogicalXRel(wxRound(paperRect.width * scaleX)), 
+        m_printoutDC->DeviceToLogicalYRel(wxRound(paperRect.height * scaleY)));
 }
 
 wxRect wxPrintout::GetLogicalPageRect() const
@@ -740,10 +741,10 @@ wxRect wxPrintout::GetLogicalPageMarginsRect(const wxPageSetupDialogData& pageSe
     GetPageSizeMM(&mw, &mh);
     float mmToDeviceX = float(pw) / mw;
     float mmToDeviceY = float(ph) / mh;
-    wxRect pageMarginsRect(paperRect.x + wxCoordRound(mmToDeviceX * topLeft.x),
-        paperRect.y + wxCoordRound(mmToDeviceY * topLeft.y),
-        paperRect.width - wxCoordRound(mmToDeviceX * (topLeft.x + bottomRight.x)),
-        paperRect.height - wxCoordRound(mmToDeviceY * (topLeft.y + bottomRight.y)));
+    wxRect pageMarginsRect(paperRect.x + wxRound(mmToDeviceX * topLeft.x),
+        paperRect.y + wxRound(mmToDeviceY * topLeft.y),
+        paperRect.width - wxRound(mmToDeviceX * (topLeft.x + bottomRight.x)),
+        paperRect.height - wxRound(mmToDeviceY * (topLeft.y + bottomRight.y)));
     wxCoord w, h;
     m_printoutDC->GetSize(&w, &h);
     if (w == pw && h == ph) {
@@ -756,10 +757,10 @@ wxRect wxPrintout::GetLogicalPageMarginsRect(const wxPageSetupDialogData& pageSe
     // This DC doesn't match the printed page, so we have to scale.
     float scaleX = float(w) / pw;
     float scaleY = float(h) / ph;
-    return wxRect(m_printoutDC->DeviceToLogicalX(wxCoordRound(pageMarginsRect.x * scaleX)), 
-        m_printoutDC->DeviceToLogicalY(wxCoordRound(pageMarginsRect.y * scaleY)), 
-        m_printoutDC->DeviceToLogicalXRel(wxCoordRound(pageMarginsRect.width * scaleX)), 
-        m_printoutDC->DeviceToLogicalYRel(wxCoordRound(pageMarginsRect.height * scaleY)));
+    return wxRect(m_printoutDC->DeviceToLogicalX(wxRound(pageMarginsRect.x * scaleX)), 
+        m_printoutDC->DeviceToLogicalY(wxRound(pageMarginsRect.y * scaleY)), 
+        m_printoutDC->DeviceToLogicalXRel(wxRound(pageMarginsRect.width * scaleX)), 
+        m_printoutDC->DeviceToLogicalYRel(wxRound(pageMarginsRect.height * scaleY)));
 }
 
 void wxPrintout::SetLogicalOrigin(wxCoord x, wxCoord y)
index 2d2f2e27a4b31b852872c02a0b677caeec0c1636..eed1bb4f8be96792a9422b36380042fc2cc540aa 100755 (executable)
@@ -203,14 +203,14 @@ CGPathRef wxMacCGPath::GetPath() const
     return m_path ;
 }
 
-void wxMacCGPath::AddArcToPoint( wxCoord x1, wxCoord y1 , wxCoord x2, wxCoord y2, wxCoord r ) 
+void wxMacCGPath::AddArcToPoint( wxCoord x1, wxCoord y1 , wxCoord x2, wxCoord y2, wxCoord r )
 {
-    CGPathAddArcToPoint( m_path, NULL , x1, y1, x2, y2, r); 
+    CGPathAddArcToPoint( m_path, NULL , x1, y1, x2, y2, r);
 }
 
-void wxMacCGPath::AddArc( wxCoord x, wxCoord y, wxCoord r, double startAngle, double endAngle, bool clockwise ) 
+void wxMacCGPath::AddArc( wxCoord x, wxCoord y, wxCoord r, double startAngle, double endAngle, bool clockwise )
 {
-    CGPathAddArc( m_path, NULL , x, y, r, startAngle, endAngle, clockwise); 
+    CGPathAddArc( m_path, NULL , x, y, r, startAngle, endAngle, clockwise);
 }
 
 //-----------------------------------------------------------------------------
@@ -272,8 +272,8 @@ void wxMacCGContext::StrokePath( const wxGraphicPath *p )
         width = 1 ;
     if ( m_pen.GetStyle() == wxTRANSPARENT )
         width = 0 ;
-        
-    bool offset = ( width % 2 ) == 1 ; 
+
+    bool offset = ( width % 2 ) == 1 ;
 
     if ( offset )
         CGContextTranslateCTM( m_cgContext, 0.5, 0.5 );
@@ -303,8 +303,8 @@ void wxMacCGContext::DrawPath( const wxGraphicPath *p , int fillStyle )
         width = 1 ;
     if ( m_pen.GetStyle() == wxTRANSPARENT )
         width = 0 ;
-        
-    bool offset = ( width % 2 ) == 1 ; 
+
+    bool offset = ( width % 2 ) == 1 ;
 
     if ( offset )
         CGContextTranslateCTM( m_cgContext, 0.5, 0.5 );
@@ -383,7 +383,7 @@ void wxMacCGContext::SetNativeContext( CGContextRef cg )
     m_cgContext = cg ;
 }
 
-void wxMacCGContext::Translate( wxCoord dx , wxCoord dy ) 
+void wxMacCGContext::Translate( wxCoord dx , wxCoord dy )
 {
     CGContextTranslateCTM( m_cgContext, dx, dy );
 }
@@ -393,17 +393,17 @@ void wxMacCGContext::Scale( wxCoord xScale , wxCoord yScale )
     CGContextScaleCTM( m_cgContext , xScale , yScale ) ;
 }
 
-void wxMacCGContext::DrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, wxCoord w, wxCoord h ) 
+void wxMacCGContext::DrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, wxCoord w, wxCoord h )
 {
     CGImageRef image = (CGImageRef)( bmp.CGImageCreate() ) ;
-    HIRect r = CGRectMake( 0 , 0 , w , h ); 
+    HIRect r = CGRectMake( 0 , 0 , w , h );
 
     CGContextSaveGState( m_cgContext );
     CGContextTranslateCTM( m_cgContext, x , y + h );
     CGContextScaleCTM( m_cgContext, 1, -1 );
-        
+
     // in case image is a mask, set the foreground color
-    CGContextSetRGBFillColor( m_cgContext , m_textForegroundColor.Red() / 255.0 , m_textForegroundColor.Green() / 255.0 , 
+    CGContextSetRGBFillColor( m_cgContext , m_textForegroundColor.Red() / 255.0 , m_textForegroundColor.Green() / 255.0 ,
         m_textForegroundColor.Blue() / 255.0 , m_textForegroundColor.Alpha() / 255.0 ) ;
     CGContextDrawImage( m_cgContext, r, image );
     CGContextRestoreGState( m_cgContext );
@@ -411,7 +411,7 @@ void wxMacCGContext::DrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, wxCo
     CGImageRelease( image ) ;
 }
 
-void wxMacCGContext::DrawIcon( const wxIcon &icon, wxCoord x, wxCoord y, wxCoord w, wxCoord h ) 
+void wxMacCGContext::DrawIcon( const wxIcon &icon, wxCoord x, wxCoord y, wxCoord w, wxCoord h )
 {
     CGRect r = CGRectMake( 0 , 0 , w , h ) ;
     CGContextSaveGState( m_cgContext );
@@ -427,12 +427,12 @@ void wxMacCGContext::PushState()
     CGContextSaveGState( m_cgContext );
 }
 
-void wxMacCGContext::PopState() 
+void wxMacCGContext::PopState()
 {
     CGContextRestoreGState( m_cgContext );
 }
 
-void wxMacCGContext::SetTextColor( const wxColour &col ) 
+void wxMacCGContext::SetTextColor( const wxColour &col )
 {
     m_textForegroundColor = col ;
 }
@@ -662,7 +662,7 @@ void wxMacCGContext::SetPen( const wxPen &pen )
 
         if ( stroke )
         {
-            CGContextSetRGBStrokeColor( m_cgContext , pen.GetColour().Red() / 255.0 , pen.GetColour().Green() / 255.0 , 
+            CGContextSetRGBStrokeColor( m_cgContext , pen.GetColour().Red() / 255.0 , pen.GetColour().Green() / 255.0 ,
                     pen.GetColour().Blue() / 255.0 , pen.GetColour().Alpha() / 255.0 ) ;
 
             // TODO: * m_dc->m_scaleX
@@ -788,7 +788,7 @@ void wxMacCGContext::SetPen( const wxPen &pen )
                         CGContextSetStrokeColorSpace( m_cgContext , patternSpace ) ;
                         wxMacCFRefHolder<CGPatternRef> pattern( *( new HatchPattern( pen.GetStyle() , CGContextGetCTM( m_cgContext ) ) ) );
 
-                        CGFloat  colorArray[4] = { pen.GetColour().Red() / 255.0 , pen.GetColour().Green() / 255.0 , 
+                        CGFloat  colorArray[4] = { pen.GetColour().Red() / 255.0 , pen.GetColour().Green() / 255.0 ,
                             pen.GetColour().Blue() / 255.0 , pen.GetColour().Alpha() / 255.0 } ;
 
                         CGContextSetStrokePattern( m_cgContext, pattern , colorArray ) ;
@@ -841,7 +841,7 @@ void wxMacCGContext::SetBrush( const wxBrush &brush )
         {
             if ( brush.GetStyle() == wxSOLID )
             {
-                CGContextSetRGBFillColor( m_cgContext , brush.GetColour().Red() / 255.0 , brush.GetColour().Green() / 255.0 , 
+                CGContextSetRGBFillColor( m_cgContext , brush.GetColour().Red() / 255.0 , brush.GetColour().Green() / 255.0 ,
                     brush.GetColour().Blue() / 255.0 , brush.GetColour().Alpha() / 255.0 ) ;
             }
             else if ( brush.IsHatch() )
@@ -850,7 +850,7 @@ void wxMacCGContext::SetBrush( const wxBrush &brush )
                 CGContextSetFillColorSpace( m_cgContext , patternSpace ) ;
                 wxMacCFRefHolder<CGPatternRef> pattern( *( new HatchPattern( brush.GetStyle() , CGContextGetCTM( m_cgContext ) ) ) );
 
-                CGFloat  colorArray[4] = { brush.GetColour().Red() / 255.0 , brush.GetColour().Green() / 255.0 , 
+                CGFloat  colorArray[4] = { brush.GetColour().Red() / 255.0 , brush.GetColour().Green() / 255.0 ,
                     brush.GetColour().Blue() / 255.0 , brush.GetColour().Alpha() / 255.0 } ;
 
                 CGContextSetFillPattern( m_cgContext, pattern , colorArray ) ;
@@ -879,7 +879,7 @@ void wxMacCGContext::SetBrush( const wxBrush &brush )
     }
 }
 
-void wxMacCGContext::DrawText( const wxString &str, wxCoord x, wxCoord y, double angle ) 
+void wxMacCGContext::DrawText( const wxString &str, wxCoord x, wxCoord y, double angle )
 {
     OSStatus status = noErr ;
     ATSUTextLayout atsuLayout ;
@@ -1006,14 +1006,14 @@ void wxMacCGContext::DrawText( const wxString &str, wxCoord x, wxCoord y, double
     free( ubuf ) ;
 #endif
 }
-    
+
 void wxMacCGContext::GetTextExtent( const wxString &str, wxCoord *width, wxCoord *height,
                             wxCoord *descent, wxCoord *externalLeading ) const
 {
     wxCHECK_RET( m_macATSUIStyle != NULL, wxT("wxDC(cg)::DoGetTextExtent - no valid font set") ) ;
 
     OSStatus status = noErr ;
-    
+
     ATSUTextLayout atsuLayout ;
     UniCharCount chars = str.length() ;
     UniChar* ubuf = NULL ;
@@ -1064,7 +1064,7 @@ void wxMacCGContext::GetTextExtent( const wxString &str, wxCoord *width, wxCoord
     ::ATSUDisposeTextLayout(atsuLayout);
 }
 
-void wxMacCGContext::GetPartialTextExtents(const wxString& text, wxArrayInt& widths) const 
+void wxMacCGContext::GetPartialTextExtents(const wxString& text, wxArrayInt& widths) const
 {
     widths.Empty();
     widths.Add(0, text.length());
@@ -1121,7 +1121,7 @@ void wxMacCGContext::GetPartialTextExtents(const wxString& text, wxArrayInt& wid
     ::ATSUDisposeTextLayout(atsuLayout);
 }
 
-void wxMacCGContext::SetFont( const wxFont &font ) 
+void wxMacCGContext::SetFont( const wxFont &font )
 {
     if ( m_macATSUIStyle )
     {
@@ -1498,7 +1498,7 @@ void wxDC::SetPen( const wxPen &pen )
 {
     if ( m_pen == pen )
         return ;
-    
+
     m_pen = pen;
     if ( m_graphicContext )
     {
@@ -1691,7 +1691,7 @@ void wxDC::DoDrawArc( wxCoord x1, wxCoord y1,
     }
 
     bool fill = m_brush.GetStyle() != wxTRANSPARENT ;
-    
+
     wxGraphicPath* path = m_graphicContext->CreatePath() ;
     m_graphicContext->PushState() ;
     m_graphicContext->Translate( xxc, yyc ) ;
@@ -1908,8 +1908,8 @@ void wxDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
         penwidth = 1 ;
     if ( m_pen.GetStyle() == wxTRANSPARENT )
         penwidth = 0 ;
-        
-    bool offset = ( penwidth % 2 ) == 1 ; 
+
+    bool offset = ( penwidth % 2 ) == 1 ;
 
     wxGraphicPath* path = m_graphicContext->CreatePath() ;
     // if we are offsetting the entire rectangle is moved 0.5, so the border line gets off by 1
@@ -1917,7 +1917,7 @@ void wxDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
         path->AddRectangle( xx , yy , ww-1 , hh-1 ) ;
     else
         path->AddRectangle( xx , yy , ww , hh ) ;
-        
+
     m_graphicContext->DrawPath( path ) ;
     delete path ;
 }
@@ -2000,7 +2000,7 @@ void wxDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
         hh = -hh;
         yy = yy - hh;
     }
-    
+
     wxGraphicPath* path = m_graphicContext->CreatePath() ;
     m_graphicContext->PushState() ;
     m_graphicContext->Translate(xx + ww / 2, yy + hh / 2);
@@ -2086,7 +2086,7 @@ bool wxDC::DoBlit(
     else
     {
         wxFAIL_MSG( wxT("Blitting is only supported from bitmap contexts, and only with wxCOPY logical operation.") ) ;
-        return false ; 
+        return false ;
     }
 
     return true;
@@ -2135,7 +2135,7 @@ void wxDC::DoGetTextExtent( const wxString &str, wxCoord *width, wxCoord *height
     }
 
     wxCoord h , d , e , w ;
-    
+
     m_graphicContext->GetTextExtent( str, &w, &h, &d, &e ) ;
 
     if ( height )
@@ -2286,42 +2286,42 @@ void wxDC::Clear(void)
 */ // TODO
 wxCoord wxDCBase::DeviceToLogicalX(wxCoord x) const
 {
-    return wxCoordRound((double)(x - m_deviceOriginX) / m_scaleX) * m_signX + m_logicalOriginX;
+    return wxRound((double)(x - m_deviceOriginX) / m_scaleX) * m_signX + m_logicalOriginX;
 }
 
 wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const
 {
-    return wxCoordRound((double)(y - m_deviceOriginY) / m_scaleY) * m_signY + m_logicalOriginY;
+    return wxRound((double)(y - m_deviceOriginY) / m_scaleY) * m_signY + m_logicalOriginY;
 }
 
 wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const
 {
-    return wxCoordRound((double)(x) / m_scaleX);
+    return wxRound((double)(x) / m_scaleX);
 }
 
 wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const
 {
-    return wxCoordRound((double)(y) / m_scaleY);
+    return wxRound((double)(y) / m_scaleY);
 }
 
 wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const
 {
-    return wxCoordRound((double)(x - m_logicalOriginX) * m_scaleX) * m_signX + m_deviceOriginX;
+    return wxRound((double)(x - m_logicalOriginX) * m_scaleX) * m_signX + m_deviceOriginX;
 }
 
 wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const
 {
-    return wxCoordRound((double)(y - m_logicalOriginY) * m_scaleY) * m_signY + m_deviceOriginY;
+    return wxRound((double)(y - m_logicalOriginY) * m_scaleY) * m_signY + m_deviceOriginY;
 }
 
 wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const
 {
-    return wxCoordRound((double)(x) * m_scaleX);
+    return wxRound((double)(x) * m_scaleX);
 }
 
 wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const
 {
-    return wxCoordRound((double)(y) * m_scaleY);
+    return wxRound((double)(y) * m_scaleY);
 }
 
 #endif // wxMAC_USE_CORE_GRAPHICS