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).
*/
- void AddArcToPoint(wxDouble x1, wxDouble y1, wxDouble x2,
- wxDouble y2,
- wxDouble r);
+ virtual void AddArcToPoint(wxDouble x1, wxDouble y1, wxDouble x2,
+ wxDouble y2, wxDouble r);
/**
Appends a circle around (x,y) with radius r as a new closed subpath.
*/
- void AddCircle(wxDouble x, wxDouble y, wxDouble r);
+ virtual void AddCircle(wxDouble x, wxDouble y, wxDouble r);
//@{
/**
/**
Appends an ellipse fitting into the passed in rectangle.
*/
- void AddEllipse(wxDouble x, wxDouble y, wxDouble w, wxDouble h);
+ virtual void AddEllipse(wxDouble x, wxDouble y, wxDouble w, wxDouble h);
//@{
/**
/**
Adds another path.
*/
- void AddPath(const wxGraphicsPath& path);
+ virtual void AddPath(const wxGraphicsPath& path);
/**
Adds a quadratic Bezier curve from the current point, using a control point and
/**
Appends a rectangle as a new closed subpath.
*/
- void AddRectangle(wxDouble x, wxDouble y, wxDouble w, wxDouble h);
+ virtual void AddRectangle(wxDouble x, wxDouble y, wxDouble w, wxDouble h);
/**
Appends a rounded rectangle as a new closed subpath.
*/
- void AddRoundedRectangle(wxDouble x, wxDouble y, wxDouble w,
- wxDouble h,
- wxDouble radius);
+ virtual void AddRoundedRectangle(wxDouble x, wxDouble y, wxDouble w,
+ wxDouble h, wxDouble radius);
/**
Closes the current sub-path.
*/
- void CloseSubpath();
+ virtual void CloseSubpath();
//@{
/**
Returns the native path (CGPathRef for Core Graphics, Path pointer for GDIPlus
and a cairo_path_t pointer for cairo).
*/
- void* GetNativePath() const;
+ virtual void* GetNativePath() const;
//@{
/**
/**
Transforms each point of this path by the matrix.
*/
- void Transform(const wxGraphicsMatrix& matrix);
+ virtual void Transform(const wxGraphicsMatrix& matrix);
/**
Gives back the native path returned by GetNativePath() because there might be
some deallocations necessary (eg on cairo the native path returned by
GetNativePath is newly allocated each time).
*/
- void UnGetNativePath(void* p) const;
+ virtual void UnGetNativePath(void* p) const;
};
/**
Clips drawings to the region
*/
- void Clip(const wxRegion& region);
+ virtual void Clip(const wxRegion& region) = 0;
/**
Clips drawings to the rectangle.
*/
- void Clip(wxDouble x, wxDouble y, wxDouble w, wxDouble h);
+ virtual void Clip(wxDouble x, wxDouble y, wxDouble w, wxDouble h) = 0;
/**
Concatenates the passed in transform with the current transform of this context
*/
- void ConcatTransform(const wxGraphicsMatrix& matrix);
+ virtual void ConcatTransform(const wxGraphicsMatrix& matrix) = 0;
/**
Creates a native brush from a wxBrush.
*/
- wxGraphicsBrush CreateBrush(const wxBrush& brush) const;
+ virtual wxGraphicsBrush CreateBrush(const wxBrush& brush) const;
/**
Creates a native graphics font from a wxFont and a text colour.
@see wxGraphicsRenderer:: CreateContextFromNativeContext
*/
- wxGraphicsContext* CreateFromNative(void* context);
+ static wxGraphicsContext* CreateFromNative(void* context);
/**
Creates a wxGraphicsContext from a native window.
@see wxGraphicsRenderer:: CreateContextFromNativeWindow
*/
- wxGraphicsContext* CreateFromNativeWindow(void* window);
+ static wxGraphicsContext* CreateFromNativeWindow(void* window);
/**
Creates a native brush, having a linear gradient, starting at (x1,y1) with
/**
Creates a native pen from a wxPen.
*/
- wxGraphicsPen CreatePen(const wxPen& pen) const;
+ virtual wxGraphicsPen CreatePen(const wxPen& pen) const;
/**
Creates a native brush, having a radial gradient originating at (xo,yc) with
color oColour and ends on a circle around (xc,yc) with radius r and color cColour
*/
- wxGraphicsBrush CreateRadialGradientBrush(wxDouble xo,
- wxDouble yo,
- wxDouble xc,
- wxDouble yc,
- wxDouble radius,
- const wxColour& oColor,
- const wxColour& cColor) const;
+ virtual wxGraphicsBrush CreateRadialGradientBrush(wxDouble xo, wxDouble yo,
+ wxDouble xc, wxDouble yc,
+ wxDouble radius,
+ const wxColour& oColor,
+ const wxColour& cColor) const;
/**
Draws the bitmap. In case of a mono bitmap, this is treated as a mask and the
/**
Draws an ellipse.
*/
- void DrawEllipse(wxDouble x, wxDouble y, wxDouble w, wxDouble h);
+ virtual void DrawEllipse(wxDouble x, wxDouble y, wxDouble w, wxDouble h);
/**
Draws the icon.
/**
Draws a rounded rectangle.
*/
- void DrawRoundedRectangle(wxDouble x, wxDouble y, wxDouble w,
- wxDouble h,
- wxDouble radius);
+ virtual void DrawRoundedRectangle(wxDouble x, wxDouble y, wxDouble w,
+ wxDouble h, wxDouble radius);
//@{
/**
Returns the native context (CGContextRef for Core Graphics, Graphics pointer
for GDIPlus and cairo_t pointer for cairo).
*/
- void* GetNativeContext();
+ virtual void* GetNativeContext() = 0;
/**
Fills the @a widths array with the widths from the beginning of
descender, and @a externalLeading is any extra vertical space added
to the font by the font designer (usually is zero).
*/
- void GetTextExtent(const wxString& text, wxDouble* width,
- wxDouble* height,
- wxDouble* descent,
- wxDouble* externalLeading) const;
+ virtual void GetTextExtent(const wxString& text, wxDouble* width,
+ wxDouble* height, wxDouble* descent,
+ wxDouble* externalLeading) const = 0;
/**
Gets the current transformation matrix of this context.
*/
- wxGraphicsMatrix GetTransform() const;
+ virtual wxGraphicsMatrix GetTransform() const = 0;
/**
Resets the clipping to original shape.
*/
- void ResetClip();
+ virtual void ResetClip() = 0;
/**
Rotates the current transformation matrix (radians),
*/
- void Rotate(wxDouble angle);
+ virtual void Rotate(wxDouble angle) = 0;
/**
Scales the current transformation matrix.
*/
- void Scale(wxDouble xScale, wxDouble yScale);
+ virtual void Scale(wxDouble xScale, wxDouble yScale) = 0;
//@{
/**
/**
Sets the current transformation matrix of this context
*/
- void SetTransform(const wxGraphicsMatrix& matrix);
+ virtual void SetTransform(const wxGraphicsMatrix& matrix) = 0;
/**
Strokes a single line.
/**
Strokes along a path with the current pen.
*/
- void StrokePath(const wxGraphicsPath& path);
+ virtual void StrokePath(const wxGraphicsPath& path) = 0;
/**
Translates the current transformation matrix.
*/
- void Translate(wxDouble dx, wxDouble dy);
+ virtual void Translate(wxDouble dx, wxDouble dy) = 0;
};
/**
Creates a native brush from a wxBrush.
*/
- wxGraphicsBrush CreateBrush(const wxBrush& brush);
+ virtual wxGraphicsBrush CreateBrush(const wxBrush& brush) = 0;
/**
eg a CGContextRef for Core Graphics, a Graphics pointer for GDIPlus or a cairo_t
pointer for cairo.
*/
- wxGraphicsContext* CreateContextFromNativeContext(void* context);
+ virtual wxGraphicsContext* CreateContextFromNativeContext(void* context) = 0;
/**
Creates a wxGraphicsContext from a native window.
*/
- wxGraphicsContext* CreateContextFromNativeWindow(void* window);
+ virtual wxGraphicsContext* CreateContextFromNativeWindow(void* window) = 0;
/**
Creates a native graphics font from a wxFont and a text colour.
/**
Creates a native graphics path which is initially empty.
*/
- wxGraphicsPath CreatePath();
+ virtual wxGraphicsPath CreatePath() = 0;
/**
Creates a native pen from a wxPen.
*/
- wxGraphicsPen CreatePen(const wxPen& pen);
+ virtual wxGraphicsPen CreatePen(const wxPen& pen) = 0;
/**
Creates a native brush, having a radial gradient originating at (xo,yc) with
color oColour and ends on a circle around (xc,yc) with radius r and color cColour
*/
- wxGraphicsBrush CreateRadialGradientBrush(wxDouble xo,
- wxDouble yo,
- wxDouble xc,
- wxDouble yc,
- wxDouble radius,
- const wxColour& oColour,
- const wxColour& cColour);
+ virtual wxGraphicsBrush CreateRadialGradientBrush(wxDouble xo, wxDouble yo,
+ wxDouble xc, wxDouble yc,
+ wxDouble radius,
+ const wxColour& oColour,
+ const wxColour& cColour) = 0;
/**
Returns the default renderer on this platform. On OS X this is the Core
/**
Returns the component values of the matrix via the argument pointers.
*/
- void Get(wxDouble* a = NULL, wxDouble* b = NULL, wxDouble* c = NULL,
- wxDouble* d = NULL, wxDouble* tx = NULL,
- wxDouble* ty = NULL) const;
+ virtual void Get(wxDouble* a = NULL, wxDouble* b = NULL, wxDouble* c = NULL,
+ wxDouble* d = NULL, wxDouble* tx = NULL,
+ wxDouble* ty = NULL) const;
/**
Returns the native representation of the matrix. For CoreGraphics this is a
CFAffineMatrix pointer. For GDIPlus a Matrix Pointer and for Cairo a cairo_matrix_t pointer.
*/
- void* GetNativeMatrix() const;
+ virtual void* GetNativeMatrix() const;
/**
Inverts the matrix.
*/
- void Invert();
+ virtual void Invert();
/**
Returns @true if the elements of the transformation matrix are equal.
/**
Return @true if this is the identity matrix.
*/
- bool IsIdentity() const;
+ virtual bool IsIdentity() const;
/**
Rotates this matrix (radians).
*/
- void Rotate(wxDouble angle);
+ virtual void Rotate(wxDouble angle);
/**
Scales this matrix.
*/
- void Scale(wxDouble xScale, wxDouble yScale);
+ virtual void Scale(wxDouble xScale, wxDouble yScale);
/**
Sets the matrix to the respective values (default values are the identity
Applies this matrix to a distance (ie. performs all transforms except
translations)
*/
- void TransformDistance(wxDouble* dx, wxDouble* dy) const;
+ virtual void TransformDistance(wxDouble* dx, wxDouble* dy) const;
/**
Applies this matrix to a point.
*/
- void TransformPoint(wxDouble* x, wxDouble* y) const;
+ virtual void TransformPoint(wxDouble* x, wxDouble* y) const;
/**
Translates this matrix.
*/
- void Translate(wxDouble dx, wxDouble dy);
+ virtual void Translate(wxDouble dx, wxDouble dy);
};