1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-07-25 14:31:55 +00:00
|
|
|
// Name: wx/motif/dc.h
|
2007-12-15 00:06:08 +00:00
|
|
|
// Purpose: wxMotifDCImpl class
|
1998-09-18 10:19:10 +00:00
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_DC_H_
|
|
|
|
#define _WX_DC_H_
|
|
|
|
|
2007-12-15 00:06:08 +00:00
|
|
|
#include "wx/dc.h"
|
1998-09-18 10:19:10 +00:00
|
|
|
|
2007-12-15 00:06:08 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxMotifDCImpl
|
|
|
|
// ----------------------------------------------------------------------------
|
1998-09-18 10:19:10 +00:00
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxMotifDCImpl : public wxDCImpl
|
1998-09-18 10:19:10 +00:00
|
|
|
{
|
1999-06-08 19:10:37 +00:00
|
|
|
public:
|
2007-12-15 00:06:08 +00:00
|
|
|
wxMotifDCImpl(wxDC *owner);
|
2004-05-05 22:43:57 +00:00
|
|
|
|
1999-06-08 19:10:37 +00:00
|
|
|
virtual wxSize GetPPI() const;
|
2004-05-05 22:43:57 +00:00
|
|
|
|
1999-06-08 19:10:37 +00:00
|
|
|
protected:
|
1999-10-19 03:26:24 +00:00
|
|
|
virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
|
|
|
|
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
|
2007-12-15 00:06:08 +00:00
|
|
|
bool useMask = false);
|
2004-05-05 22:43:57 +00:00
|
|
|
|
1999-10-19 03:26:24 +00:00
|
|
|
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
|
2007-12-15 00:06:08 +00:00
|
|
|
wxCoord width, wxCoord height);
|
1999-06-08 19:10:37 +00:00
|
|
|
virtual void DoGetSize(int *width, int *height) const;
|
|
|
|
virtual void DoGetSizeMM(int* width, int* height) const;
|
2004-05-05 22:43:57 +00:00
|
|
|
|
1999-06-08 19:10:37 +00:00
|
|
|
public:
|
2007-05-02 11:05:45 +00: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-15 00:06:08 +00:00
|
|
|
|
1999-06-08 19:10:37 +00:00
|
|
|
// Without device translation, for backing pixmap purposes
|
1999-10-19 03:26:24 +00:00
|
|
|
wxCoord XLOG2DEV_2(wxCoord x) const
|
1998-09-18 10:19:10 +00:00
|
|
|
{
|
2007-05-02 11:05:45 +00:00
|
|
|
return wxRound((double)(x - m_logicalOriginX) * m_scaleX) * m_signX;
|
1998-09-18 10:19:10 +00:00
|
|
|
}
|
1999-10-19 03:26:24 +00:00
|
|
|
wxCoord YLOG2DEV_2(wxCoord y) const
|
1998-09-18 10:19:10 +00:00
|
|
|
{
|
2007-05-02 11:05:45 +00:00
|
|
|
return wxRound((double)(y - m_logicalOriginY) * m_scaleY) * m_signY;
|
1998-09-18 10:19:10 +00:00
|
|
|
}
|
2004-05-05 22:43:57 +00:00
|
|
|
|
2007-12-15 00:06:08 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxMotifDCImpl)
|
1998-09-18 10:19:10 +00:00
|
|
|
};
|
|
|
|
|
2007-12-15 00:06:08 +00:00
|
|
|
#endif // _WX_DC_H_
|