]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/dc.h
3faf7252e216e020f69f1a426eb8147b78b2665a
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
13 //-----------------------------------------------------------------------------
15 //-----------------------------------------------------------------------------
19 #define MM_ISOTROPIC 1
20 #define MM_ANISOTROPIC 2
28 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 class WXDLLIMPEXP_CORE wxDC
: public wxDCBase
39 void SetColourMap( const wxPalette
& palette
) { SetPalette(palette
); };
40 #endif // wxUSE_PALETTE
42 // Resolution in pixels per logical inch
43 virtual wxSize
GetPPI() const;
45 virtual bool StartDoc( const wxString
& WXUNUSED(message
) ) { return true; }
46 virtual void EndDoc() { }
47 virtual void StartPage() { }
48 virtual void EndPage() { }
50 virtual wxCoord
DeviceToLogicalX(wxCoord x
) const;
51 virtual wxCoord
DeviceToLogicalY(wxCoord y
) const;
52 virtual wxCoord
DeviceToLogicalXRel(wxCoord x
) const;
53 virtual wxCoord
DeviceToLogicalYRel(wxCoord y
) const;
54 virtual wxCoord
LogicalToDeviceX(wxCoord x
) const;
55 virtual wxCoord
LogicalToDeviceY(wxCoord y
) const;
56 virtual wxCoord
LogicalToDeviceXRel(wxCoord x
) const;
57 virtual wxCoord
LogicalToDeviceYRel(wxCoord y
) const ;
59 virtual void SetMapMode( int mode
);
60 virtual void SetUserScale( double x
, double y
);
61 virtual void SetLogicalScale( double x
, double y
);
62 virtual void SetLogicalOrigin( wxCoord x
, wxCoord y
);
63 virtual void SetDeviceOrigin( wxCoord x
, wxCoord y
);
65 virtual void SetAxisOrientation( bool xLeftRight
, bool yBottomUp
);
67 virtual void ComputeScaleAndOrigin();
69 virtual GdkWindow
* GetGDKWindow() const { return NULL
; }
75 wxCoord
XDEV2LOG(wxCoord x
) const
77 return DeviceToLogicalX(x
);
79 wxCoord
XDEV2LOGREL(wxCoord x
) const
81 return DeviceToLogicalXRel(x
);
83 wxCoord
YDEV2LOG(wxCoord y
) const
85 return DeviceToLogicalY(y
);
87 wxCoord
YDEV2LOGREL(wxCoord y
) const
89 return DeviceToLogicalYRel(y
);
91 wxCoord
XLOG2DEV(wxCoord x
) const
93 return LogicalToDeviceX(x
);
95 wxCoord
XLOG2DEVREL(wxCoord x
) const
97 return LogicalToDeviceXRel(x
);
99 wxCoord
YLOG2DEV(wxCoord y
) const
101 return LogicalToDeviceY(y
);
103 wxCoord
YLOG2DEVREL(wxCoord y
) const
105 return LogicalToDeviceYRel(y
);
108 // base class pure virtuals implemented here
109 virtual void DoSetClippingRegion(wxCoord x
, wxCoord y
, wxCoord width
, wxCoord height
);
110 virtual void DoGetSizeMM(int* width
, int* height
) const;
113 // GTK-specific member variables
115 // not sure what for, but what is a mm on a screen you don't know the size
117 double m_mm_to_pix_x
,
120 bool m_needComputeScaleX
,
121 m_needComputeScaleY
; // not yet used
125 DECLARE_ABSTRACT_CLASS(wxDC
)
128 // this must be defined when wxDC::Blit() honours the DC origian and needed to
129 // allow wxUniv code in univ/winuniv.cpp to work with versions of wxGTK
131 #ifndef wxHAS_WORKING_GTK_DC_BLIT
132 #define wxHAS_WORKING_GTK_DC_BLIT