]>
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"
16 //-----------------------------------------------------------------------------
18 //-----------------------------------------------------------------------------
21 IMPLEMENT_ABSTRACT_CLASS(wxGTKImplDC
, wxImplDC
)
23 IMPLEMENT_ABSTRACT_CLASS(wxGTKImplDC
, wxDCBase
)
27 wxGTKImplDC::wxGTKImplDC( wxDC
*owner
)
36 m_font
= *wxNORMAL_FONT
;
37 m_brush
= *wxWHITE_BRUSH
;
40 wxGTKImplDC::~wxGTKImplDC()
44 void wxGTKImplDC::DoSetClippingRegion( wxCoord x
, wxCoord y
, wxCoord width
, wxCoord height
)
50 m_clipY2
= y
+ height
;
53 // ---------------------------------------------------------------------------
54 // get DC capabilities
55 // ---------------------------------------------------------------------------
57 void wxGTKImplDC::DoGetSizeMM( int* width
, int* height
) const
61 GetOwner()->GetSize( &w
, &h
);
62 if (width
) *width
= int( double(w
) / (m_userScaleX
*m_mm_to_pix_x
) );
63 if (height
) *height
= int( double(h
) / (m_userScaleY
*m_mm_to_pix_y
) );
66 // Resolution in pixels per logical inch
67 wxSize
wxGTKImplDC::GetPPI() const
69 // TODO (should probably be pure virtual)