adding measuring contexts, streamlining printing code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -509,7 +509,7 @@ void wxGraphicsContext::SetPen( const wxGraphicsPen& pen )
|
||||
|
||||
void wxGraphicsContext::SetPen( const wxPen& pen )
|
||||
{
|
||||
if ( pen.GetStyle() == wxTRANSPARENT )
|
||||
if ( !pen.Ok() || pen.GetStyle() == wxTRANSPARENT )
|
||||
SetPen( wxNullGraphicsPen );
|
||||
else
|
||||
SetPen( CreatePen( pen ) );
|
||||
@@ -523,7 +523,7 @@ void wxGraphicsContext::SetBrush( const wxGraphicsBrush& brush )
|
||||
|
||||
void wxGraphicsContext::SetBrush( const wxBrush& brush )
|
||||
{
|
||||
if ( brush.GetStyle() == wxTRANSPARENT )
|
||||
if ( !brush.Ok() || brush.GetStyle() == wxTRANSPARENT )
|
||||
SetBrush( wxNullGraphicsBrush );
|
||||
else
|
||||
SetBrush( CreateBrush( brush ) );
|
||||
@@ -682,6 +682,11 @@ wxGraphicsContext* wxGraphicsContext::Create( wxWindow* window )
|
||||
return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(window);
|
||||
}
|
||||
|
||||
wxGraphicsContext* wxGraphicsContext::Create()
|
||||
{
|
||||
return wxGraphicsRenderer::GetDefaultRenderer()->CreateMeasuringContext();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxGraphicsRenderer
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user