![]() |
Chemical Data Processing Library Python API - Version 1.4.0
|
Implements the Renderer2D interface on top of the Cairo 2D Graphics Library. More...
Inheritance diagram for CDPL.Vis.CairoBackend.CairoRenderer2D:Public Member Functions | |
| None | __init__ (cairo.Context cairo_ctxt) |
| Constructs a renderer object that operates on the Cairo cdrawing ontext specified by cairo_ctxt. More... | |
| None | saveState () |
| Pushes the current pen, brush, font, transformation and clip path onto an internal state stack. | |
| None | restoreState () |
| Pops the topmost stack entry and restores the renderer to the saved state. | |
| None | setTransform (Math.Matrix3D xform) |
| Replaces the current transformation matrix by xform. More... | |
| None | transform (Math.Matrix3D xform) |
| Right-multiplies the current transformation matrix by xform. More... | |
| None | setPen (Vis.Pen pen) |
| Sets the pen used for drawing outlines and lines. More... | |
| None | setBrush (Vis.Brush brush) |
| Sets the brush used for filling shapes. More... | |
| None | setFont (Vis.Font font) |
| Sets the font used for rendering text. More... | |
| None | drawRectangle (float x, float y, float width, float height) |
| None | drawPolygon (Math.Vector2DArray points) |
| Draws the (filled) polygon defined by the vertex sequence points. More... | |
| None | drawLine (float x1, float y1, float x2, float y2) |
| Draws a single line segment from (x1, y1) to (x2, y2). More... | |
| None | drawPolyline (Math.Vector2DArray points) |
| Draws the open polyline defined by the vertex sequence points. More... | |
| None | drawLineSegments (Math.Vector2DArray points) |
| Draws the disjoint line segments defined by consecutive vertex pairs in points. More... | |
| None | drawPoint (float x, float y) |
| Draws a single point at (x, y). More... | |
| None | drawEllipse (float x, float y, float width, float height) |
| Draws an axis-aligned ellipse centered at (x, y) with the given width and height. More... | |
| None | drawText (float x, float y, str txt) |
| Draws the text txt with its baseline starting at (x, y). More... | |
| None | drawPath (Vis.Path2D path) |
| Draws (strokes and fills) the 2D path path. More... | |
| None | setClipPath (Vis.Path2D path) |
| Sets the renderer's active clipping region to path. More... | |
| None | clearClipPath () |
| Disables any currently active clipping region. | |
Public Member Functions inherited from CDPL.Vis.Renderer2D | |
| None | __init__ () |
Initializes the Renderer2D instance. | |
| int | getObjectID () |
| Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
| None | setPen (Pen pen) |
| Sets the pen to be used in subsequent drawing operations. More... | |
| None | setBrush (Brush brush) |
| Sets the brush to be used in subsequent drawing operations. More... | |
| None | setFont (Font font) |
| Sets the font to be used in subsequent text drawing operations. More... | |
| None | drawPath (Path2D path) |
| Draws the given path. More... | |
| None | setClipPath (Path2D path) |
| Enables clipping and establishes a new clip region. More... | |
Additional Inherited Members | |
Properties inherited from CDPL.Vis.Renderer2D | |
| objectID = property(getObjectID) | |
Implements the Renderer2D interface on top of the Cairo 2D Graphics Library.
For more information about the Cairo 2D Graphics Library see [CAIRO].
| None CDPL.Vis.CairoBackend.CairoRenderer2D.__init__ | ( | cairo.Context | 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 None. |
| None CDPL.Vis.CairoBackend.CairoRenderer2D.setTransform | ( | Math.Matrix3D | xform | ) |
Replaces the current transformation matrix by xform.
| xform | The new transformation matrix. |
Reimplemented from CDPL.Vis.Renderer2D.
| None CDPL.Vis.CairoBackend.CairoRenderer2D.transform | ( | Math.Matrix3D | xform | ) |
Right-multiplies the current transformation matrix by xform.
| xform | The transformation matrix to append. |
Reimplemented from CDPL.Vis.Renderer2D.
| None CDPL.Vis.CairoBackend.CairoRenderer2D.setPen | ( | Vis.Pen | pen | ) |
Sets the pen used for drawing outlines and lines.
| pen | The new pen. |
| None CDPL.Vis.CairoBackend.CairoRenderer2D.setBrush | ( | Vis.Brush | brush | ) |
Sets the brush used for filling shapes.
| brush | The new brush. |
| None CDPL.Vis.CairoBackend.CairoRenderer2D.setFont | ( | Vis.Font | font | ) |
Sets the font used for rendering text.
| font | The new font. |
| None CDPL.Vis.CairoBackend.CairoRenderer2D.drawRectangle | ( | float | x, |
| float | y, | ||
| float | width, | ||
| float | height | ||
| ) |
| x | |
| y | |
| width | |
| height |
Reimplemented from CDPL.Vis.Renderer2D.
| None CDPL.Vis.CairoBackend.CairoRenderer2D.drawPolygon | ( | Math.Vector2DArray | points | ) |
Draws the (filled) polygon defined by the vertex sequence points.
| points | The polygon's vertex sequence. |
Reimplemented from CDPL.Vis.Renderer2D.
| None CDPL.Vis.CairoBackend.CairoRenderer2D.drawLine | ( | float | x1, |
| float | y1, | ||
| float | x2, | ||
| float | y2 | ||
| ) |
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. |
Reimplemented from CDPL.Vis.Renderer2D.
| None CDPL.Vis.CairoBackend.CairoRenderer2D.drawPolyline | ( | Math.Vector2DArray | points | ) |
Draws the open polyline defined by the vertex sequence points.
| points | The polyline's vertex sequence. |
Reimplemented from CDPL.Vis.Renderer2D.
| None CDPL.Vis.CairoBackend.CairoRenderer2D.drawLineSegments | ( | Math.Vector2DArray | points | ) |
Draws the disjoint line segments defined by consecutive vertex pairs in points.
| points | The vertex sequence (size must be even). |
Reimplemented from CDPL.Vis.Renderer2D.
| None CDPL.Vis.CairoBackend.CairoRenderer2D.drawPoint | ( | float | x, |
| float | y | ||
| ) |
Draws a single point at (x, y).
| x | The point's x-coordinate. |
| y | The point's y-coordinate. |
Reimplemented from CDPL.Vis.Renderer2D.
| None CDPL.Vis.CairoBackend.CairoRenderer2D.drawEllipse | ( | float | x, |
| float | y, | ||
| float | width, | ||
| float | height | ||
| ) |
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. |
Reimplemented from CDPL.Vis.Renderer2D.
| None CDPL.Vis.CairoBackend.CairoRenderer2D.drawText | ( | float | x, |
| float | y, | ||
| str | txt | ||
| ) |
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. |
Reimplemented from CDPL.Vis.Renderer2D.
| None CDPL.Vis.CairoBackend.CairoRenderer2D.drawPath | ( | Vis.Path2D | path | ) |
Draws (strokes and fills) the 2D path path.
| path | The path to draw. |
| None CDPL.Vis.CairoBackend.CairoRenderer2D.setClipPath | ( | Vis.Path2D | path | ) |
Sets the renderer's active clipping region to path.
| path | The path defining the new clipping region. |