![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Implements the Renderer2D interface on top of the Cairo 2D Graphics Library. More...
#include <CairoRenderer2D.hpp>
Inheritance diagram for CDPL::Vis::CairoRenderer2D:Public Member Functions | |
| CairoRenderer2D (const CairoPointer< cairo_t > &cairo_ctxt) | |
| Constructs a renderer object that operates on the Cairo cdrawing ontext specified by cairo_ctxt. More... | |
| ~CairoRenderer2D () | |
| Destructor. More... | |
| void | saveState () |
| Pushes the current pen, brush, font, transformation and clip path onto an internal state stack. More... | |
| void | restoreState () |
| Pops the topmost stack entry and restores the renderer to the saved state. More... | |
| void | setTransform (const Math::Matrix3D &xform) |
| Replaces the current transformation matrix by xform. More... | |
| void | transform (const Math::Matrix3D &xform) |
| Right-multiplies the current transformation matrix by xform. More... | |
| void | setPen (const Pen &pen) |
| Sets the pen used for drawing outlines and lines. More... | |
| void | setBrush (const Brush &brush) |
| Sets the brush used for filling shapes. More... | |
| void | setFont (const Font &font) |
| Sets the font used for rendering text. More... | |
| void | drawRectangle (double x1, double y1, double x2, double y2) |
| Draws an axis-aligned rectangle from (x1, y1) to (x2, y2). More... | |
| void | drawPolygon (const Math::Vector2DArray &points) |
| Draws the (filled) polygon defined by the vertex sequence points. More... | |
| void | drawLine (double x1, double y1, double x2, double y2) |
| Draws a single line segment from (x1, y1) to (x2, y2). More... | |
| void | drawPolyline (const Math::Vector2DArray &points) |
| Draws the open polyline defined by the vertex sequence points. More... | |
| void | drawLineSegments (const Math::Vector2DArray &points) |
| Draws the disjoint line segments defined by consecutive vertex pairs in points. More... | |
| void | drawPoint (double x, double y) |
| Draws a single point at (x, y). More... | |
| void | drawText (double x, double y, const std::string &txt) |
| Draws the text txt with its baseline starting at (x, y). More... | |
| void | drawEllipse (double x, double y, double width, double height) |
| Draws an axis-aligned ellipse centered at (x, y) with the given width and height. More... | |
| void | drawPath (const Path2D &path) |
| Draws (strokes and fills) the 2D path path. More... | |
| void | setClipPath (const Path2D &path) |
| Sets the renderer's active clipping region to path. More... | |
| void | clearClipPath () |
| Disables any currently active clipping region. More... | |
Public Member Functions inherited from CDPL::Vis::Renderer2D | |
| virtual | ~Renderer2D () |
| Virtual destructor. More... | |
Implements the Renderer2D interface on top of the Cairo 2D Graphics Library.
For more information about the Cairo 2D Graphics Library see [CAIRO].
| CDPL::Vis::CairoRenderer2D::CairoRenderer2D | ( | const CairoPointer< cairo_t > & | cairo_ctxt | ) |
Constructs a renderer object that operates on the Cairo cdrawing ontext specified by cairo_ctxt.
| cairo_ctxt | The Cairo drawing context. |
| Base::NullPointerException | if cairo_ctxt is null. |
| CDPL::Vis::CairoRenderer2D::~CairoRenderer2D | ( | ) |
Destructor.
|
virtual |
Pushes the current pen, brush, font, transformation and clip path onto an internal state stack.
Implements CDPL::Vis::Renderer2D.
|
virtual |
Pops the topmost stack entry and restores the renderer to the saved state.
Implements CDPL::Vis::Renderer2D.
|
virtual |
Replaces the current transformation matrix by xform.
| xform | The new transformation matrix. |
Implements CDPL::Vis::Renderer2D.
|
virtual |
Right-multiplies the current transformation matrix by xform.
| xform | The transformation matrix to append. |
Implements CDPL::Vis::Renderer2D.
|
virtual |
Sets the pen used for drawing outlines and lines.
| pen | The new pen. |
Implements CDPL::Vis::Renderer2D.
|
virtual |
Sets the brush used for filling shapes.
| brush | The new brush. |
Implements CDPL::Vis::Renderer2D.
|
virtual |
Sets the font used for rendering text.
| font | The new font. |
Implements CDPL::Vis::Renderer2D.
|
virtual |
Draws an axis-aligned rectangle from (x1, y1) to (x2, y2).
| x1 | The x-coordinate of the first corner. |
| y1 | The y-coordinate of the first corner. |
| x2 | The x-coordinate of the opposing corner. |
| y2 | The y-coordinate of the opposing corner. |
Implements CDPL::Vis::Renderer2D.
|
virtual |
Draws the (filled) polygon defined by the vertex sequence points.
| points | The polygon's vertex sequence. |
Implements CDPL::Vis::Renderer2D.
|
virtual |
Draws a single line segment from (x1, y1) to (x2, y2).
| x1 | The x-coordinate of the line's start point. |
| y1 | The y-coordinate of the line's start point. |
| x2 | The x-coordinate of the line's end point. |
| y2 | The y-coordinate of the line's end point. |
Implements CDPL::Vis::Renderer2D.
|
virtual |
Draws the open polyline defined by the vertex sequence points.
| points | The polyline's vertex sequence. |
Implements CDPL::Vis::Renderer2D.
|
virtual |
Draws the disjoint line segments defined by consecutive vertex pairs in points.
| points | The vertex sequence (size must be even). |
Implements CDPL::Vis::Renderer2D.
|
virtual |
Draws a single point at (x, y).
| x | The point's x-coordinate. |
| y | The point's y-coordinate. |
Implements CDPL::Vis::Renderer2D.
|
virtual |
Draws the text txt with its baseline starting at (x, y).
| x | The baseline x-coordinate. |
| y | The baseline y-coordinate. |
| txt | The text to draw. |
Implements CDPL::Vis::Renderer2D.
|
virtual |
Draws an axis-aligned ellipse centered at (x, y) with the given width and height.
| x | The x-coordinate of the ellipse's center. |
| y | The y-coordinate of the ellipse's center. |
| width | The width of the ellipse. |
| height | The height of the ellipse. |
Implements CDPL::Vis::Renderer2D.
|
virtual |
Draws (strokes and fills) the 2D path path.
| path | The path to draw. |
Implements CDPL::Vis::Renderer2D.
|
virtual |
Sets the renderer's active clipping region to path.
| path | The path defining the new clipping region. |
Implements CDPL::Vis::Renderer2D.
|
virtual |
Disables any currently active clipping region.
Implements CDPL::Vis::Renderer2D.