non-pch build fixes, some cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -17,11 +17,11 @@
|
||||
|
||||
#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"
|
||||
@@ -29,37 +29,10 @@
|
||||
|
||||
#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
|
||||
//
|
||||
@@ -255,6 +228,8 @@ private :
|
||||
double *m_userLengths;
|
||||
|
||||
wxPen m_pen;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxCairoPenData);
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCairoBrushData : public wxGraphicsObjectRefData
|
||||
@@ -380,11 +355,12 @@ public:
|
||||
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;
|
||||
@@ -1576,7 +1552,7 @@ bool wxCairoContext::SetCompositionMode(wxCompositionMode op)
|
||||
cairo_operator_t cop;
|
||||
switch (op)
|
||||
{
|
||||
case wxCOMPOSITION__CLEAR:
|
||||
case wxCOMPOSITION_CLEAR:
|
||||
cop = CAIRO_OPERATOR_CLEAR;
|
||||
break;
|
||||
case wxCOMPOSITION_SOURCE:
|
||||
@@ -1796,7 +1772,7 @@ wxGraphicsMatrix wxCairoRenderer::CreateMatrix( wxDouble a, wxDouble b, wxDouble
|
||||
|
||||
wxGraphicsPen wxCairoRenderer::CreatePen(const wxPen& pen)
|
||||
{
|
||||
if ( !pen.Ok() || pen.GetStyle() == wxTRANSPARENT )
|
||||
if ( !pen.Ok() || pen.GetStyle() == wxPENSTYLE_TRANSPARENT )
|
||||
return wxNullGraphicsPen;
|
||||
else
|
||||
{
|
||||
@@ -1808,7 +1784,7 @@ wxGraphicsPen wxCairoRenderer::CreatePen(const wxPen& pen)
|
||||
|
||||
wxGraphicsBrush wxCairoRenderer::CreateBrush(const wxBrush& brush )
|
||||
{
|
||||
if ( !brush.Ok() || brush.GetStyle() == wxTRANSPARENT )
|
||||
if ( !brush.Ok() || brush.GetStyle() == wxBRUSHSTYLE_TRANSPARENT )
|
||||
return wxNullGraphicsBrush;
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user