Added new wxGraphicsContext:Create( wxPrinterDC ) instead of wxDC:CreateGraphicsContext

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2008-04-28 20:39:57 +00:00
parent c3f941621e
commit 0b822969a6
18 changed files with 94 additions and 107 deletions

View File

@@ -42,11 +42,6 @@ class WXDLLIMPEXP_FWD_CORE wxMemoryDC;
class WXDLLIMPEXP_FWD_CORE wxPrinterDC;
class WXDLLIMPEXP_FWD_CORE wxPrintData;
#if wxUSE_GRAPHICS_CONTEXT
class WXDLLIMPEXP_FWD_CORE wxGraphicsContext;
#endif
//-----------------------------------------------------------------------------
// wxDrawObject helper class
//-----------------------------------------------------------------------------
@@ -187,14 +182,11 @@ public:
virtual bool CanDrawBitmap() const = 0;
virtual bool CanGetTextExtent() const = 0;
// get graphics context from
#if wxUSE_GRAPHICS_CONTEXT
virtual wxGraphicsContext* CreateGraphicsContext()
// get Cairo context
virtual void* GetCairoContext() const
{
return NULL;
}
#endif
// query dimension, colour deps, resolution
@@ -634,11 +626,6 @@ public:
bool IsOk() const
{ return m_pimpl && m_pimpl->IsOk(); }
#if wxUSE_GRAPHICS_CONTEXT
wxGraphicsContext* CreateGraphicsContext()
{ return m_pimpl->CreateGraphicsContext(); }
#endif
// query capabilities
bool CanDrawBitmap() const

View File

@@ -21,6 +21,7 @@
class WXDLLIMPEXP_FWD_CORE wxWindowDC;
class WXDLLIMPEXP_FWD_CORE wxMemoryDC;
class WXDLLIMPEXP_FWD_CORE wxPrinterDC;
class WXDLLIMPEXP_FWD_CORE wxGraphicsContext;
class WXDLLIMPEXP_FWD_CORE wxGraphicsPath;
class WXDLLIMPEXP_FWD_CORE wxGraphicsMatrix;
@@ -277,6 +278,7 @@ public:
static wxGraphicsContext* Create( const wxWindowDC& dc) ;
static wxGraphicsContext * Create( const wxMemoryDC& dc) ;
static wxGraphicsContext * Create( const wxPrinterDC& dc) ;
static wxGraphicsContext* CreateFromNative( void * context ) ;
@@ -543,6 +545,7 @@ public :
virtual wxGraphicsContext * CreateContext( const wxWindowDC& dc) = 0 ;
virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc) = 0 ;
virtual wxGraphicsContext * CreateContext( const wxPrinterDC& dc) = 0 ;
virtual wxGraphicsContext * CreateContextFromNativeContext( void * context ) = 0;

View File

@@ -28,10 +28,6 @@ public:
virtual ~wxWindowDCImpl();
#if wxUSE_GRAPHICS_CONTEXT
virtual wxGraphicsContext* CreateGraphicsContext();
#endif
virtual bool CanDrawBitmap() const { return true; }
virtual bool CanGetTextExtent() const { return true; }

View File

@@ -26,10 +26,6 @@ public:
virtual ~wxMemoryDCImpl();
#if wxUSE_GRAPHICS_CONTEXT
virtual wxGraphicsContext* CreateGraphicsContext();
#endif
// these get reimplemented for mono-bitmaps to behave
// more like their Win32 couterparts. They now interpret
// wxWHITE, wxWHITE_BRUSH and wxWHITE_PEN as drawing 0

View File

@@ -227,9 +227,7 @@ public:
bool Ok() const { return IsOk(); }
bool IsOk() const;
#if wxUSE_GRAPHICS_CONTEXT
virtual wxGraphicsContext* CreateGraphicsContext();
#endif
virtual void* GetCairoContext() const;
bool CanDrawBitmap() const { return true; }
void Clear();

View File

@@ -43,10 +43,6 @@ public:
// Create a DC corresponding to the whole window
wxWindowDCImpl( wxDC *owner, wxWindow *win );
#if wxUSE_GRAPHICS_CONTEXT
virtual wxGraphicsContext* CreateGraphicsContext();
#endif
virtual void DoGetSize(int *width, int *height) const;
protected:

View File

@@ -22,10 +22,6 @@ public:
wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc ); // Create compatible DC
#if wxUSE_GRAPHICS_CONTEXT
virtual wxGraphicsContext* CreateGraphicsContext();
#endif
// override some base class virtuals
virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
virtual void DoGetSize(int* width, int* height) const;