hack to fix warnings about wxMAC_USE_CORE_GRAPHICS_BLEND_MODES not being defined -- but should it be used in this common file at all?

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-10-30 23:16:17 +00:00
parent 0797d64777
commit 6c0aace267

View File

@@ -3,7 +3,7 @@
// Purpose: graphics context methods common to all platforms // Purpose: graphics context methods common to all platforms
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// Created: // Created:
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
@@ -27,6 +27,10 @@
#include "wx/region.h" #include "wx/region.h"
#endif #endif
#ifndef wxMAC_USE_CORE_GRAPHICS_BLEND_MODES
#define wxMAC_USE_CORE_GRAPHICS_BLEND_MODES 0
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// constants // constants
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -58,7 +62,7 @@ wxGCDC::wxGCDC()
} }
void wxGCDC::SetGraphicsContext( wxGraphicsContext* ctx ) void wxGCDC::SetGraphicsContext( wxGraphicsContext* ctx )
{ {
delete m_graphicContext; delete m_graphicContext;
m_graphicContext = ctx; m_graphicContext = ctx;
if ( m_graphicContext ) if ( m_graphicContext )
@@ -298,7 +302,7 @@ void wxGCDC::ComputeScaleAndOrigin()
m_matrixCurrent.Translate( m_deviceOriginX, m_deviceOriginY ); m_matrixCurrent.Translate( m_deviceOriginX, m_deviceOriginY );
m_matrixCurrent.Scale( m_scaleX, m_scaleY ); m_matrixCurrent.Scale( m_scaleX, m_scaleY );
m_matrixCurrent.Translate( m_logicalOriginX, m_logicalOriginY ); m_matrixCurrent.Translate( m_logicalOriginX, m_logicalOriginY );
m_graphicContext->SetTransform( m_matrixOriginal ); m_graphicContext->SetTransform( m_matrixOriginal );
m_graphicContext->ConcatTransform( m_matrixCurrent ); m_graphicContext->ConcatTransform( m_matrixCurrent );
} }
@@ -701,7 +705,7 @@ bool wxGCDC::DoBlit(
{ {
wxCHECK_MSG( Ok(), false, wxT("wxGCDC(cg)::DoBlit - invalid DC") ); wxCHECK_MSG( Ok(), false, wxT("wxGCDC(cg)::DoBlit - invalid DC") );
wxCHECK_MSG( source->Ok(), false, wxT("wxGCDC(cg)::DoBlit - invalid source DC") ); wxCHECK_MSG( source->Ok(), false, wxT("wxGCDC(cg)::DoBlit - invalid source DC") );
if ( logical_func == wxNO_OP ) if ( logical_func == wxNO_OP )
return true; return true;
else if ( logical_func != wxCOPY ) else if ( logical_func != wxCOPY )
@@ -718,9 +722,9 @@ bool wxGCDC::DoBlit(
wxRect subrect(source-> LogicalToDeviceX(xsrc),source-> LogicalToDeviceY(ysrc), wxRect subrect(source-> LogicalToDeviceX(xsrc),source-> LogicalToDeviceY(ysrc),
source-> LogicalToDeviceXRel(width),source-> LogicalToDeviceYRel(height)); source-> LogicalToDeviceXRel(width),source-> LogicalToDeviceYRel(height));
wxBitmap blit = source->GetAsBitmap( &subrect ); wxBitmap blit = source->GetAsBitmap( &subrect );
if ( blit.Ok() ) if ( blit.Ok() )
{ {
m_graphicContext->DrawBitmap( blit, xdest , ydest , width , height ); m_graphicContext->DrawBitmap( blit, xdest , ydest , width , height );
@@ -837,7 +841,7 @@ void wxGCDC::Clear(void)
wxPen p = *wxTRANSPARENT_PEN; wxPen p = *wxTRANSPARENT_PEN;
m_graphicContext->SetPen( p ); m_graphicContext->SetPen( p );
DoDrawRectangle( 0, 0, 32000 , 32000 ); DoDrawRectangle( 0, 0, 32000 , 32000 );
m_graphicContext->SetPen( m_pen ); m_graphicContext->SetPen( m_pen );
m_graphicContext->SetBrush( m_brush ); m_graphicContext->SetBrush( m_brush );
} }