X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6445acc7832ccd1f2fc5211a68c90f4426ab4346..9f41bf0eb04f4cdffd98a9ff38653c403b150d29:/include/wx/gtk/gnome/gprint.h diff --git a/include/wx/gtk/gnome/gprint.h b/include/wx/gtk/gnome/gprint.h index 8490d504c2..15869d68c6 100644 --- a/include/wx/gtk/gnome/gprint.h +++ b/include/wx/gtk/gnome/gprint.h @@ -261,7 +261,6 @@ public: void DoGetSizeMM(int *width, int *height) const; wxSize GetPPI() const; void SetAxisOrientation( bool xLeftRight, bool yBottomUp ); - void SetDeviceOrigin( wxCoord x, wxCoord y ); virtual int GetDepth() const { return 24; } @@ -286,6 +285,8 @@ private: unsigned char m_currentRed; unsigned char m_currentGreen; unsigned char m_currentBlue; + + int m_deviceOffsetY; wxGnomePrinter *m_printer; GnomePrintContext *m_gpc; @@ -296,35 +297,35 @@ private: private: 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_deviceOffsetY) / m_scaleY) * m_signY + m_logicalOriginY; } wxCoord YDEV2LOGREL(wxCoord y) const { - return wCoordRound((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 + m_deviceOffsetY; } wxCoord YLOG2DEVREL(wxCoord y) const { - return wxCoordRound((double)(y) * m_scaleY); + return wxRound((double)(y) * m_scaleY); } private: DECLARE_DYNAMIC_CLASS(wxGnomePrintDC)