]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk1/dc.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/gtk1/dc.cpp
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 // For compilers that support precompilation, includes "wx.h".
10 #include "wx/wxprec.h"
12 #include "wx/gtk1/dc.h"
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
21 IMPLEMENT_ABSTRACT_CLASS(wxGTKDCImpl
, wxDCImpl
)
23 wxGTKDCImpl::wxGTKDCImpl(wxDC
*owner
)
28 m_logicalFunction
= wxCOPY
;
31 m_font
= *wxNORMAL_FONT
;
32 m_brush
= *wxWHITE_BRUSH
;
35 void wxGTKDCImpl::DoSetClippingRegion( wxCoord x
, wxCoord y
, wxCoord width
, wxCoord height
)
41 m_clipY2
= y
+ height
;
44 // ---------------------------------------------------------------------------
45 // get DC capabilities
46 // ---------------------------------------------------------------------------
48 void wxGTKDCImpl::DoGetSizeMM( int* width
, int* height
) const
53 if (width
) *width
= int( double(w
) / (m_userScaleX
*m_mm_to_pix_x
) );
54 if (height
) *height
= int( double(h
) / (m_userScaleY
*m_mm_to_pix_y
) );
57 // Resolution in pixels per logical inch
58 wxSize
wxGTKDCImpl::GetPPI() const
60 // TODO (should probably be pure virtual)