X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0b822969a677939811d9fb966177031fb5fc625b..d31d30d791201146a5e224d3bf0f0cd909300bba:/src/common/graphcmn.cpp diff --git a/src/common/graphcmn.cpp b/src/common/graphcmn.cpp index d3166c26dd..e35981ca6f 100644 --- a/src/common/graphcmn.cpp +++ b/src/common/graphcmn.cpp @@ -425,6 +425,9 @@ void wxGraphicsPathData::AddCircle( wxDouble x, wxDouble y, wxDouble r ) void wxGraphicsPathData::AddEllipse( wxDouble x, wxDouble y, wxDouble w, wxDouble h) { + if (w <= 0. || h <= 0.) + return; + wxDouble rw = w/2; wxDouble rh = h/2; wxDouble xc = x + rw; @@ -800,10 +803,12 @@ wxGraphicsBitmap wxGraphicsContext::CreateSubBitmap( const wxGraphicsBitmap &bmp return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(dc); } +#if wxUSE_PRINTING_ARCHITECTURE /* static */ wxGraphicsContext* wxGraphicsContext::Create( const wxPrinterDC& dc) { return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(dc); } +#endif wxGraphicsContext* wxGraphicsContext::CreateFromNative( void * context ) {