Chemical Data Processing Library Python API - Version 1.1.1
Public Member Functions | Properties | List of all members
CDPL.Vis.PathPrimitive2D Class Reference

A graphics primitive representing an arbitrary path in 2D space. More...

+ Inheritance diagram for CDPL.Vis.PathPrimitive2D:

Public Member Functions

None __init__ ()
 Constructs an undefined path primitive.
 
None __init__ (PathPrimitive2D prim)
 Initializes a copy of the PathPrimitive2D instance prim. More...
 
PathPrimitive2D assign (PathPrimitive2D prim)
 Replaces the current state of self with a copy of the state of the PathPrimitive2D instance prim. More...
 
None setPen (Pen pen)
 Sets the pen defining the color, width, line style, cap style and join style of the path outline. More...
 
Pen getPen ()
 Returns the pen defining the color, width, line style, cap style and join style of the path outline. More...
 
None setBrush (Brush brush)
 Sets the brush defining the fill color and fill pattern. More...
 
Brush getBrush ()
 Returns the brush defining the fill color and fill pattern. More...
 
- Public Member Functions inherited from CDPL.Vis.Path2D
None __init__ (Path2D path)
 Constructs a copy of the Path2D instance path. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
Path2D assign (Path2D path)
 Assignment operator. More...
 
bool isEmpty ()
 Tells whether the Path2D instance does not contain any elements. More...
 
bool hasDrawingElements ()
 Tells whether the Path2D instance contains any elements representing drawing operations (lines and arcs). More...
 
None clear ()
 Deletes all path elements added so far and sets the fill rule to its default. More...
 
None setFillRule (FillRule rule)
 Sets the fill rule of the path to the specified value. More...
 
FillRule getFillRule ()
 Returns the currently set fill rule. More...
 
None moveTo (float x, float y)
 Sets the current position to (x, y) and starts a new subpath, implicitly closing the previous path. More...
 
None moveTo (Math.Vector2D pos)
 Sets the current position to pos and starts a new subpath, implicitly closing the previous path. More...
 
None arc (float cx, float cy, float rx, float ry, float start_ang, float sweep)
 Creates an elliptical arc centered at (cx, cy) with ellipse radii rx and ry beginning at the angle start_ang and extending sweep degrees clockwise. More...
 
None arc (Math.Vector2D ctr, float rx, float ry, float start_ang, float sweep)
 Creates an elliptical arc centered at ctr with ellipse radii rx and ry beginning at the angle start_ang and extending sweep degrees clockwise. More...
 
None arcTo (float cx, float cy, float rx, float ry, float start_ang, float sweep)
 Creates an elliptical arc centered at (cx, cy) with ellipse radii rx and ry beginning at the angle start_ang and extending sweep degrees clockwise. More...
 
None arcTo (Math.Vector2D ctr, float rx, float ry, float start_ang, float sweep)
 Creates an elliptical arc centered at ctr with ellipse radii rx and ry beginning at the angle start_ang and extending sweep degrees clockwise. More...
 
None lineTo (float x, float y)
 Adds a straight line from the current position to the point (x, y). More...
 
None lineTo (Math.Vector2D pos)
 Adds a straight line from the current position to the point (x, y). More...
 
None closePath ()
 Closes the current subpath by drawing a line to the beginning of the subpath, automatically starting a new path. More...
 
None getBounds (Rectangle2D bounds)
 Calculates the axis-aligned bounding box of the path. More...
 
None convert (Path2DConverter conv)
 Iterates over the stored path elements and calls the corresponding method of conv for each visited element. More...
 
None addEllipse (float x, float y, float width, float height)
 Creates an ellipse positioned at (x, y) with the specified width and height, and adds it to this path as a closed subpath. More...
 
None addEllipse (Math.Vector2D pos, float width, float height)
 Creates an ellipse positioned at pos with the specified width and height, and adds it to this path as a closed subpath. More...
 
None addRectangle (float x, float y, float width, float height)
 Creates a rectangle positioned at (x, y) with the specified width and height, and adds it to this path as a closed subpath. More...
 
None addRectangle (Math.Vector2D pos, float width, float height)
 Creates a rectangle positioned at pos with the specified width and height, and adds it to this path as a closed subpath. More...
 
Path2D __iadd__ (Path2D path)
 Performs the in-place addition operation self += path. More...
 
bool __eq__ (Path2D path)
 Equality comparison operator. More...
 
bool __ne__ (Path2D path)
 Non-equality comparison operator. More...
 
bool __bool__ ()
 
- Public Member Functions inherited from CDPL.Vis.GraphicsPrimitive2D
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
None render (Renderer2D renderer)
 Visualizes the graphics primitive by means of the Renderer2D instance renderer. More...
 
None getBounds (Rectangle2D bounds, FontMetrics font_metrics=0)
 Calculates the bounds of the graphics primitive. More...
 
GraphicsPrimitive2D clone ()
 Creates a dynamically allocated copy of the graphics primitive. More...
 

Properties

 pen = property(getPen, setPen)
 
 brush = property(getBrush, setBrush)
 
- Properties inherited from CDPL.Vis.Path2D
 objectID = property(getObjectID)
 
 empty = property(getEmpty)
 FIXME!
 
 hasDrawingElem = property(getHasDrawingElem)
 FIXME!
 
 fillRule = property(getFillRule, setFillRule)
 
- Properties inherited from CDPL.Vis.GraphicsPrimitive2D
 objectID = property(getObjectID)
 

Detailed Description

A graphics primitive representing an arbitrary path in 2D space.

Since
1.1

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Vis.PathPrimitive2D.__init__ ( PathPrimitive2D  prim)

Initializes a copy of the PathPrimitive2D instance prim.

Parameters
primThe PathPrimitive2D instance to copy.

Member Function Documentation

◆ assign()

PathPrimitive2D CDPL.Vis.PathPrimitive2D.assign ( PathPrimitive2D  prim)

Replaces the current state of self with a copy of the state of the PathPrimitive2D instance prim.

Parameters
primThe PathPrimitive2D instance to copy.
Returns
self

◆ setPen()

None CDPL.Vis.PathPrimitive2D.setPen ( Pen  pen)

Sets the pen defining the color, width, line style, cap style and join style of the path outline.

Parameters
penThe pen defining the color, width, line style, cap style and join style of the path outline.

◆ getPen()

Pen CDPL.Vis.PathPrimitive2D.getPen ( )

Returns the pen defining the color, width, line style, cap style and join style of the path outline.

Returns
The pen defining the color, width, line style, cap style and join style of the path outline.

◆ setBrush()

None CDPL.Vis.PathPrimitive2D.setBrush ( Brush  brush)

Sets the brush defining the fill color and fill pattern.

Parameters
brushThe brush defining the fill color and fill pattern.

◆ getBrush()

Brush CDPL.Vis.PathPrimitive2D.getBrush ( )

Returns the brush defining the fill color and fill pattern.

Returns
The brush defining the fill color and fill pattern.