-//-----------------------------------------------------------------------------
-// wxGDIPlusRenderer declaration
-//-----------------------------------------------------------------------------
-
-class wxGDIPlusRenderer : public wxGraphicsRenderer
-{
-public :
- wxGDIPlusRenderer()
- {
- m_loaded = -1;
- m_gditoken = 0;
- }
-
- virtual ~wxGDIPlusRenderer()
- {
- if ( m_loaded == 1 )
- {
- Unload();
- }
- }
-
- // Context
-
- virtual wxGraphicsContext * CreateContext( const wxWindowDC& dc);
-
- virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc);
-
-#if wxUSE_PRINTING_ARCHITECTURE
- virtual wxGraphicsContext * CreateContext( const wxPrinterDC& dc);
-#endif
-
-#if wxUSE_ENH_METAFILE
- virtual wxGraphicsContext * CreateContext( const wxEnhMetaFileDC& dc);
-#endif
-
- virtual wxGraphicsContext * CreateContextFromNativeContext( void * context );
-
- virtual wxGraphicsContext * CreateContextFromNativeWindow( void * window );
-
- virtual wxGraphicsContext * CreateContext( wxWindow* window );
-
- virtual wxGraphicsContext * CreateMeasuringContext();
-
- // Path
-
- virtual wxGraphicsPath CreatePath();
-
- // Matrix
-
- virtual wxGraphicsMatrix CreateMatrix( wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0,
- wxDouble tx=0.0, wxDouble ty=0.0);
-
-
- virtual wxGraphicsPen CreatePen(const wxPen& pen) ;
-
- virtual wxGraphicsBrush CreateBrush(const wxBrush& brush ) ;
-
- virtual wxGraphicsBrush
- CreateLinearGradientBrush(wxDouble x1, wxDouble y1,
- wxDouble x2, wxDouble y2,
- const wxGraphicsGradientStops& stops);
-
- virtual wxGraphicsBrush
- CreateRadialGradientBrush(wxDouble xo, wxDouble yo,
- wxDouble xc, wxDouble yc,
- wxDouble radius,
- const wxGraphicsGradientStops& stops);
-
- // create a native bitmap representation
- virtual wxGraphicsBitmap CreateBitmap( const wxBitmap &bitmap );
-
- // stub: should not be called directly
- virtual wxGraphicsFont CreateFont( const wxFont& WXUNUSED(font),
- const wxColour& WXUNUSED(col) )
- { wxFAIL; return wxNullGraphicsFont; }
-
- // this is used to really create the font
- wxGraphicsFont CreateGDIPlusFont( const wxGDIPlusContext* gc,
- const wxFont &font,
- const wxColour &col );
-
- // create a graphics bitmap from a native bitmap
- virtual wxGraphicsBitmap CreateBitmapFromNativeBitmap( void* bitmap );
-
- // create a subimage from a native image representation
- virtual wxGraphicsBitmap CreateSubBitmap( const wxGraphicsBitmap &bitmap, wxDouble x, wxDouble y, wxDouble w, wxDouble h );
-
-protected :
- bool EnsureIsLoaded();
- void Load();
- void Unload();
- friend class wxGDIPlusRendererModule;
-
-private :
- int m_loaded;
- ULONG_PTR m_gditoken;
-
- DECLARE_DYNAMIC_CLASS_NO_COPY(wxGDIPlusRenderer)
-} ;
-