1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxMotifDCImpl class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
17 // ----------------------------------------------------------------------------
19 // ----------------------------------------------------------------------------
21 class WXDLLEXPORT wxMotifDCImpl
: public wxDCImpl
24 wxMotifDCImpl(wxDC
*owner
);
26 virtual wxSize
GetPPI() const;
29 virtual void DoDrawIcon(const wxIcon
& icon
, wxCoord x
, wxCoord y
);
30 virtual void DoDrawBitmap(const wxBitmap
&bmp
, wxCoord x
, wxCoord y
,
31 bool useMask
= false);
33 virtual void DoSetClippingRegion(wxCoord x
, wxCoord y
,
34 wxCoord width
, wxCoord height
);
35 virtual void DoGetSize(int *width
, int *height
) const;
36 virtual void DoGetSizeMM(int* width
, int* height
) const;
40 wxCoord
XDEV2LOG(wxCoord x
) const { return DeviceToLogicalX(x
); }
41 wxCoord
XDEV2LOGREL(wxCoord x
) const { return DeviceToLogicalXRel(x
); }
42 wxCoord
YDEV2LOG(wxCoord y
) const { return DeviceToLogicalY(y
); }
43 wxCoord
YDEV2LOGREL(wxCoord y
) const { return DeviceToLogicalYRel(y
); }
44 wxCoord
XLOG2DEV(wxCoord x
) const { return LogicalToDeviceX(x
); }
45 wxCoord
XLOG2DEVREL(wxCoord x
) const { return LogicalToDeviceXRel(x
); }
46 wxCoord
YLOG2DEV(wxCoord y
) const { return LogicalToDeviceY(y
); }
47 wxCoord
YLOG2DEVREL(wxCoord y
) const { return LogicalToDeviceYRel(y
); }
49 // Without device translation, for backing pixmap purposes
50 wxCoord
XLOG2DEV_2(wxCoord x
) const
52 return wxRound((double)(x
- m_logicalOriginX
) * m_scaleX
) * m_signX
;
54 wxCoord
YLOG2DEV_2(wxCoord y
) const
56 return wxRound((double)(y
- m_logicalOriginY
) * m_scaleY
) * m_signY
;
59 DECLARE_DYNAMIC_CLASS(wxMotifDCImpl
)