git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42036
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-// ============================================================================
-// declarations
-// ============================================================================
-
-// ---------------------------------------------------------------------------
-// headers
-// ---------------------------------------------------------------------------
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_GRAPHICS_CONTEXT
+
#include "wx/graphics.h"
#ifndef WX_PRECOMP
#include "wx/icon.h"
#include "wx/bitmap.h"
#include "wx/dcmemory.h"
#include "wx/graphics.h"
#ifndef WX_PRECOMP
#include "wx/icon.h"
#include "wx/bitmap.h"
#include "wx/dcmemory.h"
-#if wxUSE_GRAPHICS_CONTEXT
-
#if !defined(wxMAC_USE_CORE_GRAPHICS_BLEND_MODES)
#define wxMAC_USE_CORE_GRAPHICS_BLEND_MODES 0
#endif
#if !defined(wxMAC_USE_CORE_GRAPHICS_BLEND_MODES)
#define wxMAC_USE_CORE_GRAPHICS_BLEND_MODES 0
#endif
// constants
//-----------------------------------------------------------------------------
// constants
//-----------------------------------------------------------------------------
-const double RAD2DEG = 180.0 / M_PI;
-const short kEmulatedMode = -1;
-const short kUnsupportedMode = -2;
+static const double RAD2DEG = 180.0 / M_PI;
//-----------------------------------------------------------------------------
// Local functions
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// 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 DegToRad(double deg)
{
return (deg * M_PI) / 180.0;
}
-static inline double RadToDeg(double deg)
-{
- return (deg * 180.0) / M_PI;
-}
+//-----------------------------------------------------------------------------
wxPoint2DDouble wxGraphicsPath::GetCurrentPoint()
{
wxPoint2DDouble wxGraphicsPath::GetCurrentPoint()
{
-extern bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y,
- const wxColour & col, int style);
-
bool wxGCDC::DoFloodFill(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
const wxColour& WXUNUSED(col), int WXUNUSED(style))
{
bool wxGCDC::DoFloodFill(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
const wxColour& WXUNUSED(col), int WXUNUSED(style))
{
m_graphicContext->StrokePath( path );
delete path;
}
m_graphicContext->StrokePath( path );
delete path;
}
void wxGCDC::DoDrawPolygon( int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset,
void wxGCDC::DoDrawPolygon( int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset,
{
wxCHECK_RET( Ok(), wxT("wxGCDC(cg)::DoGetTextExtent - invalid DC") );
{
wxCHECK_RET( Ok(), wxT("wxGCDC(cg)::DoGetTextExtent - invalid DC") );
- wxFont formerFont = m_font;
if ( theFont )
{
m_graphicContext->SetFont( *theFont );
if ( theFont )
{
m_graphicContext->SetFont( *theFont );
wxDCBase::DoDrawCheckMark(x,y,width,height);
}
wxDCBase::DoDrawCheckMark(x,y,width,height);
}
+#endif // wxUSE_GRAPHICS_CONTEXT