1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: graphics context header
4 // Author: Stefan Csomor
7 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_GRAPHICS_H_
13 #define _WX_GRAPHICS_H_
15 #if wxUSE_GRAPHICS_CONTEXT
17 #include "wx/geometry.h"
18 #include "wx/dynarray.h"
20 class WXDLLIMPEXP_CORE wxWindowDC
;
21 class WXDLLIMPEXP_CORE wxMemoryDC
;
22 class WXDLLIMPEXP_CORE wxGraphicsContext
;
23 class WXDLLIMPEXP_CORE wxGraphicsPath
;
24 class WXDLLIMPEXP_CORE wxGraphicsMatrix
;
25 class WXDLLIMPEXP_CORE wxGraphicsFigure
;
26 class WXDLLIMPEXP_CORE wxGraphicsRenderer
;
27 class WXDLLIMPEXP_CORE wxGraphicsPen
;
28 class WXDLLIMPEXP_CORE wxGraphicsBrush
;
29 class WXDLLIMPEXP_CORE wxGraphicsFont
;
32 * notes about the graphics context apis
34 * angles : are measured in radians, 0.0 being in direction of positiv x axis, PI/2 being
35 * in direction of positive y axis.
38 // Base class of all objects used for drawing in the new graphics API, the always point back to their
39 // originating rendering engine, there is no dynamic unloading of a renderer currently allowed,
40 // these references are not counted
43 // The data used by objects like graphics pens etc is ref counted, in order to avoid unnecessary expensive
44 // duplication. Any operation on a shared instance that results in a modified state, uncouples this
45 // instance from the other instances that were shared - using copy on write semantics
48 class WXDLLIMPEXP_CORE wxGraphicsObjectRefData
: public wxObjectRefData
51 wxGraphicsObjectRefData( wxGraphicsRenderer
* renderer
);
52 wxGraphicsObjectRefData( const wxGraphicsObjectRefData
* data
);
53 wxGraphicsRenderer
* GetRenderer() const ;
54 virtual wxGraphicsObjectRefData
* Clone() const ;
57 wxGraphicsRenderer
* m_renderer
;
60 class WXDLLIMPEXP_CORE wxGraphicsObject
: public wxObject
64 wxGraphicsObject( wxGraphicsRenderer
* renderer
) ;
65 virtual ~wxGraphicsObject() ;
69 // returns the renderer that was used to create this instance, or NULL if it has not been initialized yet
70 wxGraphicsRenderer
* GetRenderer() const ;
71 wxGraphicsObjectRefData
* GetGraphicsData() const ;
73 virtual wxObjectRefData
* CreateRefData() const;
74 virtual wxObjectRefData
* CloneRefData(const wxObjectRefData
* data
) const;
76 DECLARE_DYNAMIC_CLASS(wxGraphicsObject
);
79 class WXDLLIMPEXP_CORE wxGraphicsPen
: public wxGraphicsObject
83 virtual ~wxGraphicsPen() {}
85 DECLARE_DYNAMIC_CLASS(wxGraphicsPen
)
88 extern WXDLLEXPORT_DATA(wxGraphicsPen
) wxNullGraphicsPen
;
90 class WXDLLIMPEXP_CORE wxGraphicsBrush
: public wxGraphicsObject
94 virtual ~wxGraphicsBrush() {}
96 DECLARE_DYNAMIC_CLASS(wxGraphicsBrush
)
99 extern WXDLLEXPORT_DATA(wxGraphicsBrush
) wxNullGraphicsBrush
;
101 class WXDLLIMPEXP_CORE wxGraphicsFont
: public wxGraphicsObject
105 virtual ~wxGraphicsFont() {}
107 DECLARE_DYNAMIC_CLASS(wxGraphicsFont
)
110 extern WXDLLEXPORT_DATA(wxGraphicsFont
) wxNullGraphicsFont
;
113 class WXDLLIMPEXP_CORE wxGraphicsMatrixData
: public wxGraphicsObjectRefData
116 wxGraphicsMatrixData( wxGraphicsRenderer
* renderer
) :
117 wxGraphicsObjectRefData(renderer
) {}
119 virtual ~wxGraphicsMatrixData() {}
121 // concatenates the matrix
122 virtual void Concat( const wxGraphicsMatrixData
*t
) = 0;
124 // sets the matrix to the respective values
125 virtual void Set(wxDouble a
=1.0, wxDouble b
=0.0, wxDouble c
=0.0, wxDouble d
=1.0,
126 wxDouble tx
=0.0, wxDouble ty
=0.0) = 0;
128 // makes this the inverse matrix
129 virtual void Invert() = 0;
131 // returns true if the elements of the transformation matrix are equal ?
132 virtual bool IsEqual( const wxGraphicsMatrixData
* t
) const = 0;
134 // return true if this is the identity matrix
135 virtual bool IsIdentity() const = 0;
141 // add the translation to this matrix
142 virtual void Translate( wxDouble dx
, wxDouble dy
) = 0;
144 // add the scale to this matrix
145 virtual void Scale( wxDouble xScale
, wxDouble yScale
) = 0;
147 // add the rotation to this matrix (radians)
148 virtual void Rotate( wxDouble angle
) = 0;
151 // apply the transforms
154 // applies that matrix to the point
155 virtual void TransformPoint( wxDouble
*x
, wxDouble
*y
) const = 0;
157 // applies the matrix except for translations
158 virtual void TransformDistance( wxDouble
*dx
, wxDouble
*dy
) const =0;
160 // returns the native representation
161 virtual void * GetNativeMatrix() const = 0;
164 class WXDLLIMPEXP_CORE wxGraphicsMatrix
: public wxGraphicsObject
167 wxGraphicsMatrix() {}
169 virtual ~wxGraphicsMatrix() {}
171 // concatenates the matrix
172 virtual void Concat( const wxGraphicsMatrix
*t
);
173 void Concat( const wxGraphicsMatrix
&t
) { Concat( &t
); }
175 // sets the matrix to the respective values
176 virtual void Set(wxDouble a
=1.0, wxDouble b
=0.0, wxDouble c
=0.0, wxDouble d
=1.0,
177 wxDouble tx
=0.0, wxDouble ty
=0.0);
179 // makes this the inverse matrix
180 virtual void Invert();
182 // returns true if the elements of the transformation matrix are equal ?
183 virtual bool IsEqual( const wxGraphicsMatrix
* t
) const;
184 bool IsEqual( const wxGraphicsMatrix
& t
) const { return IsEqual( &t
); }
186 // return true if this is the identity matrix
187 virtual bool IsIdentity() const;
193 // add the translation to this matrix
194 virtual void Translate( wxDouble dx
, wxDouble dy
);
196 // add the scale to this matrix
197 virtual void Scale( wxDouble xScale
, wxDouble yScale
);
199 // add the rotation to this matrix (radians)
200 virtual void Rotate( wxDouble angle
);
203 // apply the transforms
206 // applies that matrix to the point
207 virtual void TransformPoint( wxDouble
*x
, wxDouble
*y
) const;
209 // applies the matrix except for translations
210 virtual void TransformDistance( wxDouble
*dx
, wxDouble
*dy
) const;
212 // returns the native representation
213 virtual void * GetNativeMatrix() const;
215 const wxGraphicsMatrixData
* GetMatrixData() const
216 { return (const wxGraphicsMatrixData
*) GetRefData(); }
217 wxGraphicsMatrixData
* GetMatrixData()
218 { return (wxGraphicsMatrixData
*) GetRefData(); }
221 DECLARE_DYNAMIC_CLASS(wxGraphicsMatrix
)
224 extern WXDLLEXPORT_DATA(wxGraphicsMatrix
) wxNullGraphicsMatrix
;
226 class WXDLLIMPEXP_CORE wxGraphicsPathData
: public wxGraphicsObjectRefData
229 wxGraphicsPathData(wxGraphicsRenderer
* renderer
) : wxGraphicsObjectRefData(renderer
) {}
230 virtual ~wxGraphicsPathData() {}
233 // These are the path primitives from which everything else can be constructed
236 // begins a new subpath at (x,y)
237 virtual void MoveToPoint( wxDouble x
, wxDouble y
) = 0;
239 // adds a straight line from the current point to (x,y)
240 virtual void AddLineToPoint( wxDouble x
, wxDouble y
) = 0;
242 // adds a cubic Bezier curve from the current point, using two control points and an end point
243 virtual void AddCurveToPoint( wxDouble cx1
, wxDouble cy1
, wxDouble cx2
, wxDouble cy2
, wxDouble x
, wxDouble y
) = 0;
246 virtual void AddPath( const wxGraphicsPathData
* path
) =0;
248 // closes the current sub-path
249 virtual void CloseSubpath() = 0;
251 // gets the last point of the current path, (0,0) if not yet set
252 virtual void GetCurrentPoint( wxDouble
* x
, wxDouble
* y
) const = 0;
254 // adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle
255 virtual void AddArc( wxDouble x
, wxDouble y
, wxDouble r
, wxDouble startAngle
, wxDouble endAngle
, bool clockwise
) = 0;
258 // These are convenience functions which - if not available natively will be assembled
259 // using the primitives from above
262 // adds a quadratic Bezier curve from the current point, using a control point and an end point
263 virtual void AddQuadCurveToPoint( wxDouble cx
, wxDouble cy
, wxDouble x
, wxDouble y
);
265 // appends a rectangle as a new closed subpath
266 virtual void AddRectangle( wxDouble x
, wxDouble y
, wxDouble w
, wxDouble h
);
268 // appends an ellipsis as a new closed subpath fitting the passed rectangle
269 virtual void AddCircle( wxDouble x
, wxDouble y
, wxDouble r
);
271 // appends a an arc to two tangents connecting (current) to (x1,y1) and (x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1)
272 virtual void AddArcToPoint( wxDouble x1
, wxDouble y1
, wxDouble x2
, wxDouble y2
, wxDouble r
) ;
274 // appends an ellipse
275 virtual void AddEllipse( wxDouble x
, wxDouble y
, wxDouble w
, wxDouble h
);
277 // appends a rounded rectangle
278 virtual void AddRoundedRectangle( wxDouble x
, wxDouble y
, wxDouble w
, wxDouble h
, wxDouble radius
);
280 // returns the native path
281 virtual void * GetNativePath() const = 0;
283 // give the native path returned by GetNativePath() back (there might be some deallocations necessary)
284 virtual void UnGetNativePath(void *p
) const= 0;
286 // transforms each point of this path by the matrix
287 virtual void Transform( const wxGraphicsMatrixData
* matrix
) =0;
289 // gets the bounding box enclosing all points (possibly including control points)
290 virtual void GetBox(wxDouble
*x
, wxDouble
*y
, wxDouble
*w
, wxDouble
*h
) const=0;
292 virtual bool Contains( wxDouble x
, wxDouble y
, int fillStyle
= wxODDEVEN_RULE
) const=0;
295 class WXDLLIMPEXP_CORE wxGraphicsPath
: public wxGraphicsObject
299 virtual ~wxGraphicsPath() {}
302 // These are the path primitives from which everything else can be constructed
305 // begins a new subpath at (x,y)
306 virtual void MoveToPoint( wxDouble x
, wxDouble y
);
307 void MoveToPoint( const wxPoint2DDouble
& p
);
309 // adds a straight line from the current point to (x,y)
310 virtual void AddLineToPoint( wxDouble x
, wxDouble y
);
311 void AddLineToPoint( const wxPoint2DDouble
& p
);
313 // adds a cubic Bezier curve from the current point, using two control points and an end point
314 virtual void AddCurveToPoint( wxDouble cx1
, wxDouble cy1
, wxDouble cx2
, wxDouble cy2
, wxDouble x
, wxDouble y
) ;
315 void AddCurveToPoint( const wxPoint2DDouble
& c1
, const wxPoint2DDouble
& c2
, const wxPoint2DDouble
& e
);
318 virtual void AddPath( const wxGraphicsPath
& path
);
320 // closes the current sub-path
321 virtual void CloseSubpath() ;
323 // gets the last point of the current path, (0,0) if not yet set
324 virtual void GetCurrentPoint( wxDouble
* x
, wxDouble
* y
) const;
325 wxPoint2DDouble
GetCurrentPoint() const;
327 // adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle
328 virtual void AddArc( wxDouble x
, wxDouble y
, wxDouble r
, wxDouble startAngle
, wxDouble endAngle
, bool clockwise
) ;
329 void AddArc( const wxPoint2DDouble
& c
, wxDouble r
, wxDouble startAngle
, wxDouble endAngle
, bool clockwise
);
332 // These are convenience functions which - if not available natively will be assembled
333 // using the primitives from above
336 // adds a quadratic Bezier curve from the current point, using a control point and an end point
337 virtual void AddQuadCurveToPoint( wxDouble cx
, wxDouble cy
, wxDouble x
, wxDouble y
);
339 // appends a rectangle as a new closed subpath
340 virtual void AddRectangle( wxDouble x
, wxDouble y
, wxDouble w
, wxDouble h
);
342 // appends an ellipsis as a new closed subpath fitting the passed rectangle
343 virtual void AddCircle( wxDouble x
, wxDouble y
, wxDouble r
);
345 // appends a an arc to two tangents connecting (current) to (x1,y1) and (x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1)
346 virtual void AddArcToPoint( wxDouble x1
, wxDouble y1
, wxDouble x2
, wxDouble y2
, wxDouble r
) ;
348 // appends an ellipse
349 virtual void AddEllipse( wxDouble x
, wxDouble y
, wxDouble w
, wxDouble h
);
351 // appends a rounded rectangle
352 virtual void AddRoundedRectangle( wxDouble x
, wxDouble y
, wxDouble w
, wxDouble h
, wxDouble radius
);
354 // returns the native path
355 virtual void * GetNativePath() const;
357 // give the native path returned by GetNativePath() back (there might be some deallocations necessary)
358 virtual void UnGetNativePath(void *p
)const;
360 // transforms each point of this path by the matrix
361 virtual void Transform( const wxGraphicsMatrix
& matrix
);
363 // gets the bounding box enclosing all points (possibly including control points)
364 virtual void GetBox(wxDouble
*x
, wxDouble
*y
, wxDouble
*w
, wxDouble
*h
)const;
365 wxRect2DDouble
GetBox()const;
367 virtual bool Contains( wxDouble x
, wxDouble y
, int fillStyle
= wxODDEVEN_RULE
)const;
368 bool Contains( const wxPoint2DDouble
& c
, int fillStyle
= wxODDEVEN_RULE
)const;
370 const wxGraphicsPathData
* GetPathData() const
371 { return (const wxGraphicsPathData
*) GetRefData(); }
372 wxGraphicsPathData
* GetPathData()
373 { return (wxGraphicsPathData
*) GetRefData(); }
376 DECLARE_DYNAMIC_CLASS(wxGraphicsPath
)
379 extern WXDLLEXPORT_DATA(wxGraphicsPath
) wxNullGraphicsPath
;
382 class WXDLLIMPEXP_CORE wxGraphicsContext
: public wxGraphicsObject
385 wxGraphicsContext(wxGraphicsRenderer
* renderer
);
387 virtual ~wxGraphicsContext();
389 static wxGraphicsContext
* Create( const wxWindowDC
& dc
) ;
392 static wxGraphicsContext
* Create( const wxMemoryDC
& dc
) ;
395 static wxGraphicsContext
* CreateFromNative( void * context
) ;
397 static wxGraphicsContext
* CreateFromNativeWindow( void * window
) ;
399 static wxGraphicsContext
* Create( wxWindow
* window
) ;
401 // create a context that can be used for measuring texts only, no drawing allowed
402 static wxGraphicsContext
* Create();
404 wxGraphicsPath
CreatePath() const;
406 virtual wxGraphicsPen
CreatePen(const wxPen
& pen
) const;
408 virtual wxGraphicsBrush
CreateBrush(const wxBrush
& brush
) const;
410 // sets the brush to a linear gradient, starting at (x1,y1) with color c1 to (x2,y2) with color c2
411 virtual wxGraphicsBrush
CreateLinearGradientBrush( wxDouble x1
, wxDouble y1
, wxDouble x2
, wxDouble y2
,
412 const wxColour
&c1
, const wxColour
&c2
) const;
414 // sets the brush to a radial gradient originating at (xo,yc) with color oColor and ends on a circle around (xc,yc)
415 // with radius r and color cColor
416 virtual wxGraphicsBrush
CreateRadialGradientBrush( wxDouble xo
, wxDouble yo
, wxDouble xc
, wxDouble yc
, wxDouble radius
,
417 const wxColour
&oColor
, const wxColour
&cColor
) const;
420 virtual wxGraphicsFont
CreateFont( const wxFont
&font
, const wxColour
&col
= *wxBLACK
) const;
422 // create a 'native' matrix corresponding to these values
423 virtual wxGraphicsMatrix
CreateMatrix( wxDouble a
=1.0, wxDouble b
=0.0, wxDouble c
=0.0, wxDouble d
=1.0,
424 wxDouble tx
=0.0, wxDouble ty
=0.0) const;
426 // push the current state of the context, ie the transformation matrix on a stack
427 virtual void PushState() = 0;
429 // pops a stored state from the stack
430 virtual void PopState() = 0;
432 // clips drawings to the region, combined to current clipping region
433 virtual void Clip( const wxRegion
®ion
) = 0;
435 // clips drawings to the rect
436 virtual void Clip( wxDouble x
, wxDouble y
, wxDouble w
, wxDouble h
) = 0;
438 // resets the clipping to original extent
439 virtual void ResetClip() = 0 ;
441 // returns the native context
442 virtual void * GetNativeContext() = 0;
445 // transformation : changes the current transformation matrix CTM of the context
449 virtual void Translate( wxDouble dx
, wxDouble dy
) = 0;
452 virtual void Scale( wxDouble xScale
, wxDouble yScale
) = 0;
455 virtual void Rotate( wxDouble angle
) = 0;
457 // concatenates this transform with the current transform of this context
458 virtual void ConcatTransform( const wxGraphicsMatrix
& matrix
) = 0;
460 // sets the transform of this context
461 virtual void SetTransform( const wxGraphicsMatrix
& matrix
) = 0;
463 // gets the matrix of this context
464 virtual wxGraphicsMatrix
GetTransform() const = 0;
470 virtual void SetPen( const wxGraphicsPen
& pen
);
472 void SetPen( const wxPen
& pen
);
474 // sets the brush for filling
475 virtual void SetBrush( const wxGraphicsBrush
& brush
);
477 void SetBrush( const wxBrush
& brush
);
480 virtual void SetFont( const wxGraphicsFont
& font
);
482 void SetFont( const wxFont
& font
, const wxColour
& colour
);
485 // strokes along a path with the current pen
486 virtual void StrokePath( const wxGraphicsPath
& path
) = 0;
488 // fills a path with the current brush
489 virtual void FillPath( const wxGraphicsPath
& path
, int fillStyle
= wxODDEVEN_RULE
) = 0;
491 // draws a path by first filling and then stroking
492 virtual void DrawPath( const wxGraphicsPath
& path
, int fillStyle
= wxODDEVEN_RULE
);
498 virtual void DrawText( const wxString
&str
, wxDouble x
, wxDouble y
) = 0;
500 virtual void DrawText( const wxString
&str
, wxDouble x
, wxDouble y
, wxDouble angle
);
502 virtual void DrawText( const wxString
&str
, wxDouble x
, wxDouble y
, const wxGraphicsBrush
& backgroundBrush
) ;
504 virtual void DrawText( const wxString
&str
, wxDouble x
, wxDouble y
, wxDouble angle
, const wxGraphicsBrush
& backgroundBrush
);
506 virtual void GetTextExtent( const wxString
&text
, wxDouble
*width
, wxDouble
*height
,
507 wxDouble
*descent
, wxDouble
*externalLeading
) const = 0;
509 virtual void GetPartialTextExtents(const wxString
& text
, wxArrayDouble
& widths
) const = 0;
515 virtual void DrawBitmap( const wxBitmap
&bmp
, wxDouble x
, wxDouble y
, wxDouble w
, wxDouble h
) = 0;
517 virtual void DrawIcon( const wxIcon
&icon
, wxDouble x
, wxDouble y
, wxDouble w
, wxDouble h
) = 0;
520 // convenience methods
523 // strokes a single line
524 virtual void StrokeLine( wxDouble x1
, wxDouble y1
, wxDouble x2
, wxDouble y2
);
526 // stroke lines connecting each of the points
527 virtual void StrokeLines( size_t n
, const wxPoint2DDouble
*points
);
529 // stroke disconnected lines from begin to end points
530 virtual void StrokeLines( size_t n
, const wxPoint2DDouble
*beginPoints
, const wxPoint2DDouble
*endPoints
);
533 virtual void DrawLines( size_t n
, const wxPoint2DDouble
*points
, int fillStyle
= wxODDEVEN_RULE
);
536 virtual void DrawRectangle( wxDouble x
, wxDouble y
, wxDouble w
, wxDouble h
);
539 virtual void DrawEllipse( wxDouble x
, wxDouble y
, wxDouble w
, wxDouble h
);
541 // draws a rounded rectangle
542 virtual void DrawRoundedRectangle( wxDouble x
, wxDouble y
, wxDouble w
, wxDouble h
, wxDouble radius
);
544 // wrappers using wxPoint2DDouble TODO
546 // helper to determine if a 0.5 offset should be applied for the drawing operation
547 virtual bool ShouldOffset() const { return false; }
552 wxGraphicsBrush m_brush
;
553 wxGraphicsFont m_font
;
556 DECLARE_NO_COPY_CLASS(wxGraphicsContext
)
557 DECLARE_ABSTRACT_CLASS(wxGraphicsContext
)
563 // A graphics figure allows to cache path, pen etc creations, also will be a basis for layering/grouping elements
566 class WXDLLIMPEXP_CORE wxGraphicsFigure
: public wxGraphicsObject
569 wxGraphicsFigure(wxGraphicsRenderer
* renderer
) ;
571 virtual ~wxGraphicsFigure() ;
573 void SetPath( wxGraphicsMatrix
* matrix
);
575 void SetMatrix( wxGraphicsPath
* path
);
577 // draws this object on the context
578 virtual void Draw( wxGraphicsContext
* cg
);
580 // returns the path of this object
581 wxGraphicsPath
* GetPath() { return m_path
; }
583 // returns the transformation matrix of this object, may be null if there is no transformation necessary
584 wxGraphicsMatrix
* GetMatrix() { return m_matrix
; }
587 wxGraphicsMatrix
* m_matrix
;
588 wxGraphicsPath
* m_path
;
590 DECLARE_DYNAMIC_CLASS(wxGraphicsFigure
)
596 // The graphics renderer is the instance corresponding to the rendering engine used, eg there is ONE core graphics renderer
597 // instance on OSX. This instance is pointed back to by all objects created by it. Therefore you can create eg additional
598 // paths at any point from a given matrix etc.
601 class WXDLLIMPEXP_CORE wxGraphicsRenderer
: public wxObject
604 wxGraphicsRenderer() {}
606 virtual ~wxGraphicsRenderer() {}
608 static wxGraphicsRenderer
* GetDefaultRenderer();
612 virtual wxGraphicsContext
* CreateContext( const wxWindowDC
& dc
) = 0 ;
614 virtual wxGraphicsContext
* CreateContext( const wxMemoryDC
& dc
) = 0 ;
616 virtual wxGraphicsContext
* CreateContextFromNativeContext( void * context
) = 0;
618 virtual wxGraphicsContext
* CreateContextFromNativeWindow( void * window
) = 0;
620 virtual wxGraphicsContext
* CreateContext( wxWindow
* window
) = 0;
622 // create a context that can be used for measuring texts only, no drawing allowed
623 virtual wxGraphicsContext
* CreateMeasuringContext() = 0;
627 virtual wxGraphicsPath
CreatePath() = 0;
631 virtual wxGraphicsMatrix
CreateMatrix( wxDouble a
=1.0, wxDouble b
=0.0, wxDouble c
=0.0, wxDouble d
=1.0,
632 wxDouble tx
=0.0, wxDouble ty
=0.0) = 0;
636 virtual wxGraphicsPen
CreatePen(const wxPen
& pen
) = 0 ;
638 virtual wxGraphicsBrush
CreateBrush(const wxBrush
& brush
) = 0 ;
640 // sets the brush to a linear gradient, starting at (x1,y1) with color c1 to (x2,y2) with color c2
641 virtual wxGraphicsBrush
CreateLinearGradientBrush( wxDouble x1
, wxDouble y1
, wxDouble x2
, wxDouble y2
,
642 const wxColour
&c1
, const wxColour
&c2
) = 0;
644 // sets the brush to a radial gradient originating at (xo,yc) with color oColor and ends on a circle around (xc,yc)
645 // with radius r and color cColor
646 virtual wxGraphicsBrush
CreateRadialGradientBrush( wxDouble xo
, wxDouble yo
, wxDouble xc
, wxDouble yc
, wxDouble radius
,
647 const wxColour
&oColor
, const wxColour
&cColor
) = 0;
650 virtual wxGraphicsFont
CreateFont( const wxFont
&font
, const wxColour
&col
= *wxBLACK
) = 0;
653 DECLARE_NO_COPY_CLASS(wxGraphicsRenderer
)
654 DECLARE_ABSTRACT_CLASS(wxGraphicsRenderer
)
659 #endif // _WX_GRAPHICS_H_