X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2970ae54d3ac3989cd47180229bc7d6cc0f65f51..2efd54a41b12a5977713c837c585d89f35a13d14:/src/gtk/dc.cpp diff --git a/src/gtk/dc.cpp b/src/gtk/dc.cpp index 9b2bcee17f..5998f8b674 100644 --- a/src/gtk/dc.cpp +++ b/src/gtk/dc.cpp @@ -10,20 +10,16 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/dc.h" - +#include "wx/gtk/dc.h" //----------------------------------------------------------------------------- -// wxDC +// wxGTKDCImpl //----------------------------------------------------------------------------- -#if wxUSE_NEW_DC -IMPLEMENT_ABSTRACT_CLASS(wxGTKImplDC, wxDC) -#else -IMPLEMENT_ABSTRACT_CLASS(wxGTKImplDC, wxDCBase) -#endif +IMPLEMENT_ABSTRACT_CLASS(wxGTKDCImpl, wxDCImpl) -wxGTKImplDC::wxGTKImplDC() +wxGTKDCImpl::wxGTKDCImpl( wxDC *owner ) + : wxDCImpl( owner ) { m_ok = FALSE; @@ -32,7 +28,11 @@ wxGTKImplDC::wxGTKImplDC() m_brush = *wxWHITE_BRUSH; } -void wxGTKImplDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height ) +wxGTKDCImpl::~wxGTKDCImpl() +{ +} + +void wxGTKDCImpl::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height ) { m_clipping = TRUE; m_clipX1 = x; @@ -45,17 +45,17 @@ void wxGTKImplDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCo // get DC capabilities // --------------------------------------------------------------------------- -void wxGTKImplDC::DoGetSizeMM( int* width, int* height ) const +void wxGTKDCImpl::DoGetSizeMM( int* width, int* height ) const { int w = 0; int h = 0; - GetSize( &w, &h ); + GetOwner()->GetSize( &w, &h ); if (width) *width = int( double(w) / (m_userScaleX*m_mm_to_pix_x) ); if (height) *height = int( double(h) / (m_userScaleY*m_mm_to_pix_y) ); } // Resolution in pixels per logical inch -wxSize wxGTKImplDC::GetPPI() const +wxSize wxGTKDCImpl::GetPPI() const { // TODO (should probably be pure virtual) return wxSize(0, 0);