]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk/dc.cpp
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
15 //-----------------------------------------------------------------------------
17 //-----------------------------------------------------------------------------
19 IMPLEMENT_ABSTRACT_CLASS(wxDC
, wxDCBase
)
26 m_font
= *wxNORMAL_FONT
;
27 m_brush
= *wxWHITE_BRUSH
;
30 void wxDC::DoSetClippingRegion( wxCoord x
, wxCoord y
, wxCoord width
, wxCoord height
)
36 m_clipY2
= y
+ height
;
39 // ---------------------------------------------------------------------------
40 // get DC capabilities
41 // ---------------------------------------------------------------------------
43 void wxDC::DoGetSizeMM( int* width
, int* height
) const
48 if (width
) *width
= int( double(w
) / (m_userScaleX
*m_mm_to_pix_x
) );
49 if (height
) *height
= int( double(h
) / (m_userScaleY
*m_mm_to_pix_y
) );
52 // Resolution in pixels per logical inch
53 wxSize
wxDC::GetPPI() const
55 // TODO (should probably be pure virtual)