SPH
Public Member Functions | List of all members
GraphicsContext Class Reference

Drawing context using wxWidgets implementation of Cairo backend. More...

#include <GraphicsContext.h>

Inheritance diagram for GraphicsContext:
IDrawingContext Polymorphic

Public Member Functions

 GraphicsContext (wxPaintDC &dc, const Rgba color)
 Constructs the drawing context from wxPaintDC. More...
 
 GraphicsContext (wxMemoryDC &dc, const Rgba color)
 Constructs the drawing context from wxMemoryDC. More...
 
virtual void drawPoint (const PlotPoint &point) override
 Adds a single point to the plot. More...
 
virtual void drawErrorPoint (const ErrorPlotPoint &point) override
 Adds a point with error bars to the plot. More...
 
virtual void drawLine (const PlotPoint &from, const PlotPoint &to) override
 Draws a line connecting two points. More...
 
virtual AutoPtr< IDrawPathdrawPath () override
 Draws a path connecting points. More...
 
virtual void setStyle (const Size index) override
 Changes the current drawing style. More...
 
virtual void setTransformMatrix (const AffineMatrix2 &m) override
 Applies the given tranformation matrix on all primitives. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Detailed Description

Drawing context using wxWidgets implementation of Cairo backend.

Definition at line 54 of file GraphicsContext.h.

Constructor & Destructor Documentation

◆ GraphicsContext() [1/2]

GraphicsContext::GraphicsContext ( wxPaintDC &  dc,
const Rgba  color 
)
inline

Constructs the drawing context from wxPaintDC.

Definition at line 69 of file GraphicsContext.h.

◆ GraphicsContext() [2/2]

GraphicsContext::GraphicsContext ( wxMemoryDC &  dc,
const Rgba  color 
)
inline

Constructs the drawing context from wxMemoryDC.

Definition at line 77 of file GraphicsContext.h.

Member Function Documentation

◆ drawErrorPoint()

virtual void GraphicsContext::drawErrorPoint ( const ErrorPlotPoint point)
inlineoverridevirtual

Adds a point with error bars to the plot.

Implements IDrawingContext.

Definition at line 90 of file GraphicsContext.h.

◆ drawLine()

virtual void GraphicsContext::drawLine ( const PlotPoint from,
const PlotPoint to 
)
inlineoverridevirtual

Draws a line connecting two points.

The ending points are not drawn; call drawPoint manually if you wish to draw both lines and the points.

Implements IDrawingContext.

Definition at line 94 of file GraphicsContext.h.

◆ drawPath()

virtual AutoPtr<IDrawPath> GraphicsContext::drawPath ( )
inlineoverridevirtual

Draws a path connecting points.

The path copies the state from the parent drawing context, so if a drawing style of the context changes, the change does not affect already existing paths.

Implements IDrawingContext.

Definition at line 102 of file GraphicsContext.h.

◆ drawPoint()

virtual void GraphicsContext::drawPoint ( const PlotPoint point)
inlineoverridevirtual

Adds a single point to the plot.

The plot is drawn by implementation-defined style.

Implements IDrawingContext.

Definition at line 84 of file GraphicsContext.h.

◆ setStyle()

virtual void GraphicsContext::setStyle ( const Size  index)
inlineoverridevirtual

Changes the current drawing style.

Interpretation of the style is implementation-defined. It is assumed that the derived classes will have a predefined set of drawing styles, this function will then selects the style with appropriate index.

Parameters
indexIndex of the selected style.

Implements IDrawingContext.

Definition at line 106 of file GraphicsContext.h.

◆ setTransformMatrix()

virtual void GraphicsContext::setTransformMatrix ( const AffineMatrix2 matrix)
inlineoverridevirtual

Applies the given tranformation matrix on all primitives.

This does not affect already drawn primitives.

Implements IDrawingContext.

Definition at line 120 of file GraphicsContext.h.


The documentation for this class was generated from the following file: