]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/graphcmn.cpp
Remove unnecessary comparison of unsigned variable with 0.
[wxWidgets.git] / src / common / graphcmn.cpp
index 9cdfdbac0cfb96fc3337970bc84e55e53046cf12..dcdf8485e370678ef4df531baee9dc5e162b2461 100644 (file)
@@ -18,7 +18,7 @@
 
 #if wxUSE_GRAPHICS_CONTEXT
 
-#include "wx/private/graphics.h"
+#include "wx/graphics.h"
 
 #ifndef WX_PRECOMP
     #include "wx/icon.h"
     #include "wx/log.h"
 #endif
 
-//-----------------------------------------------------------------------------
-// constants
-//-----------------------------------------------------------------------------
-
-static const double RAD2DEG = 180.0 / M_PI;
+#include "wx/private/graphics.h"
 
 //-----------------------------------------------------------------------------
 // Local functions
@@ -480,7 +476,6 @@ void wxGraphicsPathData::AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2,
     wxDouble dist = r / sin(alpha/2) * cos(alpha/2);
     // calculate tangential points
     wxPoint2DDouble t1 = dist*v1 + p1;
-    wxPoint2DDouble t2 = dist*v2 + p1;
 
     wxPoint2DDouble nv1 = v1;
     nv1.SetVectorAngle(v1.GetVectorAngle()-90);
@@ -501,7 +496,7 @@ void wxGraphicsPathData::AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2,
 IMPLEMENT_ABSTRACT_CLASS(wxGraphicsContext, wxObject)
 
 
-wxGraphicsContext::wxGraphicsContext(wxGraphicsRenderer* renderer) : 
+wxGraphicsContext::wxGraphicsContext(wxGraphicsRenderer* renderer) :
     wxGraphicsObject(renderer),
       m_antialias(wxANTIALIAS_DEFAULT),
       m_composition(wxCOMPOSITION_OVER)
@@ -565,7 +560,7 @@ void wxGraphicsContext::SetPen( const wxGraphicsPen& pen )
 
 void wxGraphicsContext::SetPen( const wxPen& pen )
 {
-    if ( !pen.Ok() || pen.GetStyle() == wxTRANSPARENT )
+    if ( !pen.Ok() || pen.GetStyle() == wxPENSTYLE_TRANSPARENT )
         SetPen( wxNullGraphicsPen );
     else
         SetPen( CreatePen( pen ) );
@@ -579,7 +574,7 @@ void wxGraphicsContext::SetBrush( const wxGraphicsBrush& brush )
 
 void wxGraphicsContext::SetBrush( const wxBrush& brush )
 {
-    if ( !brush.Ok() || brush.GetStyle() == wxTRANSPARENT )
+    if ( !brush.Ok() || brush.GetStyle() == wxBRUSHSTYLE_TRANSPARENT )
         SetBrush( wxNullGraphicsBrush );
     else
         SetBrush( CreateBrush( brush ) );
@@ -781,20 +776,12 @@ wxGraphicsFont wxGraphicsContext::CreateFont( const wxFont &font , const wxColou
 
 wxGraphicsBitmap wxGraphicsContext::CreateBitmap( const wxBitmap& bmp ) const
 {
-#ifndef __WXGTK20__
     return GetRenderer()->CreateBitmap(bmp);
-#else
-    return wxNullGraphicsBitmap;
-#endif
 }
 
 wxGraphicsBitmap wxGraphicsContext::CreateSubBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h   ) const
 {
-#ifndef __WXGTK20__
     return GetRenderer()->CreateSubBitmap(bmp,x,y,w,h);
-#else
-    return wxNullGraphicsBitmap;
-#endif
 }
 
 /* static */ wxGraphicsContext* wxGraphicsContext::Create( const wxWindowDC& dc)