1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-07-25 10:31:55 -04:00
|
|
|
// Name: wx/motif/dc.h
|
2007-12-14 19:06:08 -05:00
|
|
|
// Purpose: wxMotifDCImpl class
|
1998-09-18 06:19:10 -04:00
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_DC_H_
|
|
|
|
#define _WX_DC_H_
|
|
|
|
|
2007-12-14 19:06:08 -05:00
|
|
|
#include "wx/dc.h"
|
1998-09-18 06:19:10 -04:00
|
|
|
|
2007-12-14 19:06:08 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxMotifDCImpl
|
|
|
|
// ----------------------------------------------------------------------------
|
1998-09-18 06:19:10 -04:00
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxMotifDCImpl : public wxDCImpl
|
1998-09-18 06:19:10 -04:00
|
|
|
{
|
1999-06-08 15:10:37 -04:00
|
|
|
public:
|
2007-12-14 19:06:08 -05:00
|
|
|
wxMotifDCImpl(wxDC *owner);
|
2004-05-05 18:43:57 -04:00
|
|
|
|
1999-06-08 15:10:37 -04:00
|
|
|
virtual wxSize GetPPI() const;
|
2004-05-05 18:43:57 -04:00
|
|
|
|
1999-06-08 15:10:37 -04:00
|
|
|
protected:
|
1999-10-18 23:26:24 -04:00
|
|
|
virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
|
|
|
|
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
|
2007-12-14 19:06:08 -05:00
|
|
|
bool useMask = false);
|
2004-05-05 18:43:57 -04:00
|
|
|
|
1999-10-18 23:26:24 -04:00
|
|
|
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
|
2007-12-14 19:06:08 -05:00
|
|
|
wxCoord width, wxCoord height);
|
1999-06-08 15:10:37 -04:00
|
|
|
virtual void DoGetSize(int *width, int *height) const;
|
|
|
|
virtual void DoGetSizeMM(int* width, int* height) const;
|
2004-05-05 18:43:57 -04:00
|
|
|
|
1999-06-08 15:10:37 -04:00
|
|
|
public:
|
2007-05-02 07:05:45 -04:00
|
|
|
// implementation
|
|
|
|
wxCoord XDEV2LOG(wxCoord x) const { return DeviceToLogicalX(x); }
|
|
|
|
wxCoord XDEV2LOGREL(wxCoord x) const { return DeviceToLogicalXRel(x); }
|
|
|
|
wxCoord YDEV2LOG(wxCoord y) const { return DeviceToLogicalY(y); }
|
|
|
|
wxCoord YDEV2LOGREL(wxCoord y) const { return DeviceToLogicalYRel(y); }
|
|
|
|
wxCoord XLOG2DEV(wxCoord x) const { return LogicalToDeviceX(x); }
|
|
|
|
wxCoord XLOG2DEVREL(wxCoord x) const { return LogicalToDeviceXRel(x); }
|
|
|
|
wxCoord YLOG2DEV(wxCoord y) const { return LogicalToDeviceY(y); }
|
|
|
|
wxCoord YLOG2DEVREL(wxCoord y) const { return LogicalToDeviceYRel(y); }
|
2007-12-14 19:06:08 -05:00
|
|
|
|
1999-06-08 15:10:37 -04:00
|
|
|
// Without device translation, for backing pixmap purposes
|
1999-10-18 23:26:24 -04:00
|
|
|
wxCoord XLOG2DEV_2(wxCoord x) const
|
1998-09-18 06:19:10 -04:00
|
|
|
{
|
2007-05-02 07:05:45 -04:00
|
|
|
return wxRound((double)(x - m_logicalOriginX) * m_scaleX) * m_signX;
|
1998-09-18 06:19:10 -04:00
|
|
|
}
|
1999-10-18 23:26:24 -04:00
|
|
|
wxCoord YLOG2DEV_2(wxCoord y) const
|
1998-09-18 06:19:10 -04:00
|
|
|
{
|
2007-05-02 07:05:45 -04:00
|
|
|
return wxRound((double)(y - m_logicalOriginY) * m_scaleY) * m_signY;
|
1998-09-18 06:19:10 -04:00
|
|
|
}
|
2004-05-05 18:43:57 -04:00
|
|
|
|
2007-12-14 19:06:08 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxMotifDCImpl)
|
1998-09-18 06:19:10 -04:00
|
|
|
};
|
|
|
|
|
2007-12-14 19:06:08 -05:00
|
|
|
#endif // _WX_DC_H_
|