Converted wxGTK's basic DC classes to new DC code

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2007-09-23 11:27:41 +00:00
parent fc1f568e23
commit ab171e9502
16 changed files with 962 additions and 646 deletions

View File

@@ -18,12 +18,17 @@
//-----------------------------------------------------------------------------
#if wxUSE_NEW_DC
IMPLEMENT_ABSTRACT_CLASS(wxGTKImplDC, wxDC)
IMPLEMENT_ABSTRACT_CLASS(wxGTKImplDC, wxImplDC)
#else
IMPLEMENT_ABSTRACT_CLASS(wxGTKImplDC, wxDCBase)
#endif
wxGTKImplDC::wxGTKImplDC()
#if wxUSE_NEW_DC
wxGTKImplDC::wxGTKImplDC( wxDC *owner )
: wxImplDC( owner )
#else
wxDC::wxDC()
#endif
{
m_ok = FALSE;
@@ -32,6 +37,10 @@ wxGTKImplDC::wxGTKImplDC()
m_brush = *wxWHITE_BRUSH;
}
wxGTKImplDC::~wxGTKImplDC()
{
}
void wxGTKImplDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
{
m_clipping = TRUE;
@@ -49,7 +58,7 @@ void wxGTKImplDC::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) );
}