29 #ifndef CDPL_VIS_QTRENDERER2D_HPP
30 #define CDPL_VIS_QTRENDERER2D_HPP
137 void drawLine(
double x1,
double y1,
double x2,
double y2);
164 void drawText(
double x,
double y,
const std::string& txt);
173 void drawEllipse(
double x,
double y,
double width,
double height);
196 std::unique_ptr<QPolygonF> qPolygon;
197 std::unique_ptr<QPainterPath> qPainterPath;
Definition of class CDPL::Vis::Renderer2D.
Definition of the preprocessor macro CDPL_VIS_API.
#define CDPL_VIS_QT_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Specifies the fill pattern and fill color of shapes.
Definition: Brush.hpp:50
Specifies a font for drawing text.
Definition: Font.hpp:54
Provides a container for painting operations, enabling arbitrary graphical shapes to be constructed a...
Definition: Path2D.hpp:78
Specifies how to draw lines and outlines of shapes.
Definition: Pen.hpp:53
Implements the Renderer2D interface on top of the Qt Toolkit.
Definition: QtRenderer2D.hpp:57
void transform(const Math::Matrix3D &xform)
Right-multiplies the current transformation matrix by xform.
void setTransform(const Math::Matrix3D &xform)
Replaces the current transformation matrix by xform.
void saveState()
Pushes the current pen, brush, font, transformation and clip path onto an internal state stack.
void drawPolyline(const Math::Vector2DArray &points)
Draws the open polyline defined by the vertex sequence points.
QtRenderer2D(QPainter &painter)
Constructs a renderer object which uses the QPainter instance painter for its drawing operations.
void restoreState()
Pops the topmost stack entry and restores the renderer to the saved state.
void drawLineSegments(const Math::Vector2DArray &points)
Draws the disjoint line segments defined by consecutive vertex pairs in points.
QtRenderer2D & operator=(const QtRenderer2D &)=delete
void setPen(const Pen &pen)
Sets the pen used for drawing outlines and lines.
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.
void drawPath(const Path2D &path)
Draws (strokes and fills) the 2D path path.
void drawLine(double x1, double y1, double x2, double y2)
Draws a single line segment from (x1, y1) to (x2, y2).
void clearClipPath()
Disables any currently active clipping region.
void drawPolygon(const Math::Vector2DArray &points)
Draws the (filled) polygon defined by the vertex sequence points.
void drawRectangle(double x1, double y1, double x2, double y2)
Draws an axis-aligned rectangle from (x1, y1) to (x2, y2).
void setBrush(const Brush &brush)
Sets the brush used for filling shapes.
QtRenderer2D(const QtRenderer2D &)=delete
void drawPoint(double x, double y)
Draws a single point at (x, y).
void drawText(double x, double y, const std::string &txt)
Draws the text txt with its baseline starting at (x, y).
void setFont(const Font &font)
Sets the font used for rendering text.
~QtRenderer2D()
Destructor.
void setClipPath(const Path2D &path)
Sets the renderer's active clipping region to path.
Interface providing methods for low level 2D drawing operations.
Definition: Renderer2D.hpp:86
VectorArray< Vector2D > Vector2DArray
Array storing vectors of type Math::Vector2D.
Definition: VectorArray.hpp:80
CMatrix< double, 3, 3 > Matrix3D
Bounded 3x3 matrix holding floating point values of type double.
Definition: Matrix.hpp:3180
The namespace of the Chemical Data Processing Library.