1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxMotifDCImpl class
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 class WXDLLIMPEXP_CORE wxMotifDCImpl
: public wxDCImpl
23 wxMotifDCImpl(wxDC
*owner
);
25 virtual wxSize
GetPPI() const;
28 virtual void DoDrawIcon(const wxIcon
& icon
, wxCoord x
, wxCoord y
);
29 virtual void DoDrawBitmap(const wxBitmap
&bmp
, wxCoord x
, wxCoord y
,
30 bool useMask
= false);
32 virtual void DoSetClippingRegion(wxCoord x
, wxCoord y
,
33 wxCoord width
, wxCoord height
);
34 virtual void DoGetSize(int *width
, int *height
) const;
35 virtual void DoGetSizeMM(int* width
, int* height
) const;
39 wxCoord
XDEV2LOG(wxCoord x
) const { return DeviceToLogicalX(x
); }
40 wxCoord
XDEV2LOGREL(wxCoord x
) const { return DeviceToLogicalXRel(x
); }
41 wxCoord
YDEV2LOG(wxCoord y
) const { return DeviceToLogicalY(y
); }
42 wxCoord
YDEV2LOGREL(wxCoord y
) const { return DeviceToLogicalYRel(y
); }
43 wxCoord
XLOG2DEV(wxCoord x
) const { return LogicalToDeviceX(x
); }
44 wxCoord
XLOG2DEVREL(wxCoord x
) const { return LogicalToDeviceXRel(x
); }
45 wxCoord
YLOG2DEV(wxCoord y
) const { return LogicalToDeviceY(y
); }
46 wxCoord
YLOG2DEVREL(wxCoord y
) const { return LogicalToDeviceYRel(y
); }
48 // Without device translation, for backing pixmap purposes
49 wxCoord
XLOG2DEV_2(wxCoord x
) const
51 return wxRound((double)(x
- m_logicalOriginX
) * m_scaleX
) * m_signX
;
53 wxCoord
YLOG2DEV_2(wxCoord y
) const
55 return wxRound((double)(y
- m_logicalOriginY
) * m_scaleY
) * m_signY
;
58 DECLARE_DYNAMIC_CLASS(wxMotifDCImpl
)