]>
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"
14 #include "wx/gtk/private.h"
16 //-----------------------------------------------------------------------------
18 //-----------------------------------------------------------------------------
20 IMPLEMENT_ABSTRACT_CLASS(wxGTKDCImpl
, wxDCImpl
)
22 wxGTKDCImpl::wxGTKDCImpl( wxDC
*owner
)
28 m_font
= *wxNORMAL_FONT
;
29 m_brush
= *wxWHITE_BRUSH
;
32 wxGTKDCImpl::~wxGTKDCImpl()
36 void wxGTKDCImpl::DoSetClippingRegion( wxCoord x
, wxCoord y
, wxCoord width
, wxCoord height
)
42 m_clipY2
= y
+ height
;
45 // ---------------------------------------------------------------------------
46 // get DC capabilities
47 // ---------------------------------------------------------------------------
49 void wxGTKDCImpl::DoGetSizeMM( int* width
, int* height
) const
53 GetOwner()->GetSize( &w
, &h
);
54 if (width
) *width
= int( double(w
) / (m_userScaleX
*m_mm_to_pix_x
) );
55 if (height
) *height
= int( double(h
) / (m_userScaleY
*m_mm_to_pix_y
) );
58 // Resolution in pixels per logical inch
59 wxSize
wxGTKDCImpl::GetPPI() const
61 // TODO (should probably be pure virtual)