]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/dc.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
19 #include "wx/gdicmn.h"
21 //-----------------------------------------------------------------------------
23 //-----------------------------------------------------------------------------
27 #define MM_ISOTROPIC 1
28 #define MM_ANISOTROPIC 2
36 //-----------------------------------------------------------------------------
38 //-----------------------------------------------------------------------------
40 class WXDLLEXPORT wxDC
: public wxDCBase
42 DECLARE_DYNAMIC_CLASS(wxDC
)
48 virtual wxSize
GetPPI() const;
51 virtual void DoDrawIcon(const wxIcon
& icon
, wxCoord x
, wxCoord y
);
52 virtual void DoDrawBitmap(const wxBitmap
&bmp
, wxCoord x
, wxCoord y
,
53 bool useMask
= false);
55 virtual void DoSetClippingRegion(wxCoord x
, wxCoord y
,
56 wxCoord width
, wxCoord height
);
57 virtual void DoGetSize(int *width
, int *height
) const;
58 virtual void DoGetSizeMM(int* width
, int* height
) const;
62 wxCoord
XDEV2LOG(wxCoord x
) const { return DeviceToLogicalX(x
); }
63 wxCoord
XDEV2LOGREL(wxCoord x
) const { return DeviceToLogicalXRel(x
); }
64 wxCoord
YDEV2LOG(wxCoord y
) const { return DeviceToLogicalY(y
); }
65 wxCoord
YDEV2LOGREL(wxCoord y
) const { return DeviceToLogicalYRel(y
); }
66 wxCoord
XLOG2DEV(wxCoord x
) const { return LogicalToDeviceX(x
); }
67 wxCoord
XLOG2DEVREL(wxCoord x
) const { return LogicalToDeviceXRel(x
); }
68 wxCoord
YLOG2DEV(wxCoord y
) const { return LogicalToDeviceY(y
); }
69 wxCoord
YLOG2DEVREL(wxCoord y
) const { return LogicalToDeviceYRel(y
); }
71 // Without device translation, for backing pixmap purposes
72 wxCoord
XLOG2DEV_2(wxCoord x
) const
74 return wxRound((double)(x
- m_logicalOriginX
) * m_scaleX
) * m_signX
;
76 wxCoord
YLOG2DEV_2(wxCoord y
) const
78 return wxRound((double)(y
- m_logicalOriginY
) * m_scaleY
) * m_signY
;