SPH
Public Member Functions | List of all members
IDrawingContext Class Referenceabstract

Abstraction of a drawing context. More...

#include <Plot.h>

Inheritance diagram for IDrawingContext:
Polymorphic GraphicsContext SvgContext TextContext

Public Member Functions

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

Detailed Description

Abstraction of a drawing context.

Object operates in plot coordinates.

Definition at line 34 of file Plot.h.

Member Function Documentation

◆ drawErrorPoint()

virtual void IDrawingContext::drawErrorPoint ( const ErrorPlotPoint point)
pure virtual

Adds a point with error bars to the plot.

Implemented in TextContext, SvgContext, and GraphicsContext.

◆ drawLine()

virtual void IDrawingContext::drawLine ( const PlotPoint from,
const PlotPoint to 
)
pure virtual

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.

Implemented in SvgContext, and GraphicsContext.

◆ drawPath()

virtual AutoPtr<IDrawPath> IDrawingContext::drawPath ( )
pure virtual

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.

Implemented in TextContext, SvgContext, and GraphicsContext.

◆ drawPoint()

virtual void IDrawingContext::drawPoint ( const PlotPoint point)
pure virtual

Adds a single point to the plot.

The plot is drawn by implementation-defined style.

Implemented in TextContext, SvgContext, and GraphicsContext.

◆ setStyle()

virtual void IDrawingContext::setStyle ( const Size  index)
pure virtual

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.

Implemented in GraphicsContext.

◆ setTransformMatrix()

virtual void IDrawingContext::setTransformMatrix ( const AffineMatrix2 matrix)
pure virtual

Applies the given tranformation matrix on all primitives.

This does not affect already drawn primitives.

Implemented in SvgContext, and GraphicsContext.


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