]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/graphcmn.cpp
there is no sqrt(int) in standard C++ (although glibc seems to provide it); select...
[wxWidgets.git] / src / common / graphcmn.cpp
index d3166c26ddfa9b759c23855a280b50e1afe263e4..e35981ca6f7146cc5b07130bc4f114d010967edc 100644 (file)
@@ -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 )
 {