From aec24dc76c6070a841ee195395c61e843945793a Mon Sep 17 00:00:00 2001 From: Kevin Ollivier Date: Mon, 17 Nov 2008 21:39:29 +0000 Subject: [PATCH] More fixes for API on 2.8. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@56826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/graphics.h | 2 +- src/generic/graphicc.cpp | 6 +++++- src/mac/carbon/graphics.cpp | 12 ++++++------ src/msw/graphics.cpp | 10 +++++----- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/include/wx/graphics.h b/include/wx/graphics.h index 7ed23f0a5d..8dac635506 100755 --- a/include/wx/graphics.h +++ b/include/wx/graphics.h @@ -545,7 +545,7 @@ public: // image support // #if wxABI_VERSION >= 20809 - void DrawBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ); + void DrawGraphicsBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ); #endif virtual void DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) = 0; diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index e545fe4781..5155bf8e28 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -341,7 +341,7 @@ public: // gets the matrix of this context virtual wxGraphicsMatrix GetTransform() const; - void DrawBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) {} + void DrawGraphicsBitmapInternal( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) {} virtual void DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ); virtual void DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxDouble w, wxDouble h ); virtual void PushState(); @@ -1145,6 +1145,10 @@ void wxCairoContext::PopState() cairo_restore(m_context); } +void wxGraphicsContext::DrawGraphicsBitmap(const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h) +{ +} + void wxCairoContext::DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) { wxCHECK_RET( bmp.IsOk(), wxT("Invalid bitmap in wxCairoContext::DrawBitmap")); diff --git a/src/mac/carbon/graphics.cpp b/src/mac/carbon/graphics.cpp index 206e1e838c..e0e481b2c8 100755 --- a/src/mac/carbon/graphics.cpp +++ b/src/mac/carbon/graphics.cpp @@ -1302,7 +1302,7 @@ public: // // image support // - void DrawBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ); + void DrawGraphicsBitmapInternal( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ); virtual void DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ); @@ -1710,18 +1710,18 @@ void wxMacCoreGraphicsContext::Rotate( wxDouble angle ) m_windowTransform = CGAffineTransformRotate(m_windowTransform,angle); } -void wxGraphicsContext::DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) +void wxGraphicsContext::DrawGraphicsBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) { - static_cast(this)->DrawBitmap(bmp, x, y, w, h); + static_cast(this)->DrawGraphicsBitmapInternal(bmp, x, y, w, h); } void wxMacCoreGraphicsContext::DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) { wxGraphicsBitmap bitmap = GetRenderer()->CreateBitmap(bmp); - DrawBitmap(bitmap, x, y, w, h); + DrawGraphicsBitmapInternal(bitmap, x, y, w, h); } -void wxMacCoreGraphicsContext::DrawBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) +void wxMacCoreGraphicsContext::DrawGraphicsBitmapInternal( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) { EnsureIsValid(); @@ -1745,9 +1745,9 @@ void wxMacCoreGraphicsContext::DrawBitmap( const wxGraphicsBitmap &bmp, wxDouble else { ((wxMacCoreGraphicsBrushData*)m_brush.GetRefData())->Apply(this); - HIViewDrawCGImage( m_cgContext , &r , image ); } } + HIViewDrawCGImage( m_cgContext , &r , image ); } void wxMacCoreGraphicsContext::DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index e4a71d9d41..f9f3591dfc 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -325,7 +325,7 @@ public: // gets the matrix of this context virtual wxGraphicsMatrix GetTransform() const; - void DrawBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ); + void DrawGraphicsBitmapInternal( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ); virtual void DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ); virtual void DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxDouble w, wxDouble h ); virtual void PushState(); @@ -1171,12 +1171,12 @@ void wxGDIPlusContext::PopState() // premultiplied format, therefore in the failing cases we create a new bitmap using the non-premultiplied // bytes as parameter -void wxGraphicsContext::DrawBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) +void wxGraphicsContext::DrawGraphicsBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) { - static_cast(this)->DrawBitmap(bmp, x, y, w, h); + static_cast(this)->DrawGraphicsBitmapInternal(bmp, x, y, w, h); } -void wxGDIPlusContext::DrawBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) +void wxGDIPlusContext::DrawGraphicsBitmapInternal( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) { Bitmap* image = static_cast(bmp.GetRefData())->GetGDIPlusBitmap(); if ( image ) @@ -1186,7 +1186,7 @@ void wxGDIPlusContext::DrawBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDo void wxGDIPlusContext::DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) { wxGraphicsBitmap bitmap = GetRenderer()->CreateBitmap(bmp); - DrawBitmap(bitmap, x, y, w, h); + DrawGraphicsBitmapInternal(bitmap, x, y, w, h); } void wxGDIPlusContext::DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxDouble w, wxDouble h )