public:
wxGCDC(const wxWindowDC& dc);
+#ifdef __WXMSW__
+ wxGCDC( const wxMemoryDC& dc);
+#endif
wxGCDC();
virtual ~wxGCDC();
#include "wx/dynarray.h"
class WXDLLIMPEXP_CORE wxWindowDC;
+class WXDLLIMPEXP_CORE wxMemoryDC;
class WXDLLIMPEXP_CORE wxGraphicsContext;
class WXDLLIMPEXP_CORE wxGraphicsPath;
class WXDLLIMPEXP_CORE wxGraphicsMatrix;
static wxGraphicsContext* Create( const wxWindowDC& dc) ;
+#ifdef __WXMSW__
+ static wxGraphicsContext * Create( const wxMemoryDC& dc) ;
+#endif
+
static wxGraphicsContext* CreateFromNative( void * context ) ;
static wxGraphicsContext* CreateFromNativeWindow( void * window ) ;
// Context
virtual wxGraphicsContext * CreateContext( const wxWindowDC& dc) = 0 ;
-
+#ifdef __WXMSW__
+ virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc) = 0 ;
+#endif
virtual wxGraphicsContext * CreateContextFromNativeContext( void * context ) = 0;
virtual wxGraphicsContext * CreateContextFromNativeWindow( void * window ) = 0;
SetGraphicsContext( wxGraphicsContext::Create(dc) );
}
+#ifdef __WXMSW__
+wxGCDC::wxGCDC(const wxMemoryDC& dc)
+{
+ Init();
+ SetGraphicsContext( wxGraphicsContext::Create(dc) );
+}
+#endif
+
void wxGCDC::Init()
{
m_ok = false;
{
return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(dc);
}
+#ifdef __WXMSW__
+wxGraphicsContext* wxGraphicsContext::Create( const wxMemoryDC& dc)
+{
+ return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(dc);
+}
+#endif
wxGraphicsContext* wxGraphicsContext::CreateFromNative( void * context )
{
virtual wxGraphicsContext * CreateContext( const wxWindowDC& dc);
+#ifdef __WXMSW__
+ virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc);
+#endif
+
virtual wxGraphicsContext * CreateContextFromNativeContext( void * context );
virtual wxGraphicsContext * CreateContextFromNativeWindow( void * window );
return new wxCairoContext(this,dc);
}
+#ifdef __WXMSW__
+wxGraphicsContext * wxCairoRenderer::CreateContext( const wxMemoryDC& dc)
+{
+ return NULL;
+}
+#endif
+
wxGraphicsContext * wxCairoRenderer::CreateContextFromNativeContext( void * context )
{
return new wxCairoContext(this,(cairo_t*)context);
virtual wxGraphicsContext * CreateContext( const wxWindowDC& dc);
+ virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc);
+
virtual wxGraphicsContext * CreateContextFromNativeContext( void * context );
virtual wxGraphicsContext * CreateContextFromNativeWindow( void * window );
return new wxGDIPlusContext(this,(HDC) dc.GetHDC());
}
+wxGraphicsContext * wxGDIPlusRenderer::CreateContext( const wxMemoryDC& dc)
+{
+ EnsureIsLoaded();
+ return new wxGDIPlusContext(this,(HDC) dc.GetHDC());
+}
+
wxGraphicsContext * wxGDIPlusRenderer::CreateMeasuringContext()
{
EnsureIsLoaded();