#if wxUSE_GRAPHICS_CONTEXT
+#include "wx/graphics.h"
+
#ifndef WX_PRECOMP
#include "wx/bitmap.h"
#include "wx/icon.h"
-
- #include "wx/dc.h"
#include "wx/dcclient.h"
#include "wx/dcmemory.h"
#include "wx/dcprint.h"
#include "wx/private/graphics.h"
#include "wx/rawbmp.h"
+#include "wx/vector.h"
using namespace std;
-//-----------------------------------------------------------------------------
-// constants
-//-----------------------------------------------------------------------------
-
-const double RAD2DEG = 180.0 / M_PI;
-
-//-----------------------------------------------------------------------------
-// Local functions
-//-----------------------------------------------------------------------------
-
-static inline double dmin(double a, double b)
-{
- return a < b ? a : b;
-}
-static inline double dmax(double a, double b)
-{
- return a > b ? a : b;
-}
-
-static inline double DegToRad(double deg)
-{
- return (deg * M_PI) / 180.0;
-}
-static inline double RadToDeg(double deg)
-{
- return (deg * 180.0) / M_PI;
-}
-
//-----------------------------------------------------------------------------
// device context implementation
//
double *m_userLengths;
wxPen m_pen;
+
+ wxDECLARE_NO_COPY_CLASS(wxCairoPenData);
};
class WXDLLIMPEXP_CORE wxCairoBrushData : public wxGraphicsObjectRefData
wxDouble *descent, wxDouble *externalLeading ) const;
virtual void GetPartialTextExtents(const wxString& text, wxArrayDouble& widths) const;
+protected:
+ virtual void DoDrawText( const wxString &str, wxDouble x, wxDouble y );
+
private:
void Init(cairo_t *context);
- virtual void DoDrawText( const wxString &str, wxDouble x, wxDouble y );
-
cairo_t* m_context;
wxVector<float> m_layerOpacities;
cairo_operator_t cop;
switch (op)
{
- case wxCOMPOSITION__CLEAR:
+ case wxCOMPOSITION_CLEAR:
cop = CAIRO_OPERATOR_CLEAR;
break;
case wxCOMPOSITION_SOURCE:
wxGraphicsPen wxCairoRenderer::CreatePen(const wxPen& pen)
{
- if ( !pen.Ok() || pen.GetStyle() == wxTRANSPARENT )
+ if ( !pen.Ok() || pen.GetStyle() == wxPENSTYLE_TRANSPARENT )
return wxNullGraphicsPen;
else
{
wxGraphicsBrush wxCairoRenderer::CreateBrush(const wxBrush& brush )
{
- if ( !brush.Ok() || brush.GetStyle() == wxTRANSPARENT )
+ if ( !brush.Ok() || brush.GetStyle() == wxBRUSHSTYLE_TRANSPARENT )
return wxNullGraphicsBrush;
else
{