X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0217cfa537f6da6addba21a7fed4899e0eaaec26..c13d6ac1ea199d1e3908d40d129e2fd5a4d82df7:/src/common/graphcmn.cpp diff --git a/src/common/graphcmn.cpp b/src/common/graphcmn.cpp index 665621e274..8536a68762 100644 --- a/src/common/graphcmn.cpp +++ b/src/common/graphcmn.cpp @@ -595,7 +595,7 @@ void wxGraphicsContext::SetPen( const wxGraphicsPen& pen ) void wxGraphicsContext::SetPen( const wxPen& pen ) { - if ( !pen.Ok() || pen.GetStyle() == wxPENSTYLE_TRANSPARENT ) + if ( !pen.IsOk() || pen.GetStyle() == wxPENSTYLE_TRANSPARENT ) SetPen( wxNullGraphicsPen ); else SetPen( CreatePen( pen ) ); @@ -609,7 +609,7 @@ void wxGraphicsContext::SetBrush( const wxGraphicsBrush& brush ) void wxGraphicsContext::SetBrush( const wxBrush& brush ) { - if ( !brush.Ok() || brush.GetStyle() == wxBRUSHSTYLE_TRANSPARENT ) + if ( !brush.IsOk() || brush.GetStyle() == wxBRUSHSTYLE_TRANSPARENT ) SetBrush( wxNullGraphicsBrush ); else SetBrush( CreateBrush( brush ) ); @@ -623,7 +623,7 @@ void wxGraphicsContext::SetFont( const wxGraphicsFont& font ) void wxGraphicsContext::SetFont( const wxFont& font, const wxColour& colour ) { - if ( font.Ok() ) + if ( font.IsOk() ) SetFont( CreateFont( font, colour ) ); else SetFont( wxNullGraphicsFont ); @@ -665,9 +665,7 @@ wxGraphicsContext::DoDrawFilledText(const wxString &str, // to make sure our 'OffsetToPixelBoundaries' doesn't move the fill shape SetPen( wxNullGraphicsPen ); - wxGraphicsPath path = CreatePath(); - path.AddRectangle( x , y, width, height ); - FillPath( path ); + DrawRectangle(x , y, width, height); DrawText( str, x ,y); SetBrush( formerBrush );