-
- static wxGraphicsContext* Create( const wxWindowDC& dc) ;
-
- static wxGraphicsContext* CreateFromNative( void * context ) ;
-
- static wxGraphicsContext* CreateFromNativeWindow( void * window ) ;
-
- static wxGraphicsContext* Create( wxWindow* window ) ;
-
- wxGraphicsPath * CreatePath();
-
- virtual wxGraphicsPen CreatePen(const wxPen& pen);
-
- virtual wxGraphicsBrush CreateBrush(const wxBrush& brush );
-
- // sets the brush to a linear gradient, starting at (x1,y1) with color c1 to (x2,y2) with color c2
- virtual wxGraphicsBrush CreateLinearGradientBrush( wxDouble x1, wxDouble y1, wxDouble x2, wxDouble y2,
- const wxColour&c1, const wxColour&c2);
-
- // sets the brush to a radial gradient originating at (xo,yc) with color oColor and ends on a circle around (xc,yc)
- // with radius r and color cColor
- virtual wxGraphicsBrush CreateRadialGradientBrush( wxDouble xo, wxDouble yo, wxDouble xc, wxDouble yc, wxDouble radius,
- const wxColour &oColor, const wxColour &cColor);
+
+ static wxGraphicsContext* Create( const wxWindowDC& dc);
+ static wxGraphicsContext * Create( const wxMemoryDC& dc);
+#if wxUSE_PRINTING_ARCHITECTURE
+ static wxGraphicsContext * Create( const wxPrinterDC& dc);
+#ifdef __WXMSW__
+ static wxGraphicsContext * Create( const wxEnhMetaFileDC& dc);
+#endif
+#endif // wxUSE_PRINTING_ARCHITECTURE
+
+ static wxGraphicsContext* CreateFromNative( void * context );
+
+ static wxGraphicsContext* CreateFromNativeWindow( void * window );
+
+ static wxGraphicsContext* Create( wxWindow* window );
+
+ // create a context that can be used for measuring texts only, no drawing allowed
+ static wxGraphicsContext * Create();
+
+ // begin a new document (relevant only for printing / pdf etc) if there is a progress dialog, message will be shown
+ virtual bool StartDoc( const wxString& message );
+
+ // done with that document (relevant only for printing / pdf etc)
+ virtual void EndDoc();
+
+ // opens a new page (relevant only for printing / pdf etc) with the given size in points
+ // (if both are null the default page size will be used)
+ virtual void StartPage( wxDouble width = 0, wxDouble height = 0 );
+
+ // ends the current page (relevant only for printing / pdf etc)
+ virtual void EndPage();
+
+ // make sure that the current content of this context is immediately visible
+ virtual void Flush();
+
+ wxGraphicsPath CreatePath() const;
+
+ virtual wxGraphicsPen CreatePen(const wxPen& pen) const;
+
+ virtual wxGraphicsBrush CreateBrush(const wxBrush& brush ) const;
+
+ // sets the brush to a linear gradient, starting at (x1,y1) and ending at
+ // (x2,y2) with the given boundary colours or the specified stops
+ wxGraphicsBrush
+ CreateLinearGradientBrush(wxDouble x1, wxDouble y1,
+ wxDouble x2, wxDouble y2,
+ const wxColour& c1, const wxColour& c2) const;
+ wxGraphicsBrush
+ CreateLinearGradientBrush(wxDouble x1, wxDouble y1,
+ wxDouble x2, wxDouble y2,
+ const wxGraphicsGradientStops& stops) const;
+
+ // sets the brush to a radial gradient originating at (xo,yc) and ending
+ // on a circle around (xc,yc) with the given radius; the colours may be
+ // specified by just the two extremes or the full array of gradient stops
+ wxGraphicsBrush
+ CreateRadialGradientBrush(wxDouble xo, wxDouble yo,
+ wxDouble xc, wxDouble yc, wxDouble radius,
+ const wxColour& oColor, const wxColour& cColor) const;
+
+ wxGraphicsBrush
+ CreateRadialGradientBrush(wxDouble xo, wxDouble yo,
+ wxDouble xc, wxDouble yc, wxDouble radius,
+ const wxGraphicsGradientStops& stops) const;