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

Provides an interface for classes that implement the conversion of Vis.Path2D objects into rendering backend specific path descriptions or drawing operations. More...

+ Inheritance diagram for CDPL.Vis.Path2DConverter:

Public Member Functions

None __init__ ()
 Initializes the Path2DConverter instance.
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
None moveTo (float x, float y)
 Called when a Vis.Path2D element created by a Vis.Path2D.moveTo() call is encountered. More...
 
None arcTo (float cx, float cy, float rx, float ry, float start_ang, float sweep)
 Called when a Vis.Path2D element created by a Vis.Path2D.arcTo() call is encountered. More...
 
None lineTo (float x, float y)
 Called when a Vis.Path2D element created by a Vis.Path2D.lineTo() call is encountered. More...
 
None closePath ()
 Called when a Vis.Path2D element created by a Vis.Path2D.closePath() call is encountered.
 

Properties

 objectID = property(getObjectID)
 

Detailed Description

Provides an interface for classes that implement the conversion of Vis.Path2D objects into rendering backend specific path descriptions or drawing operations.

See also
Vis.Renderer2D
Since
1.1

Member Function Documentation

◆ getObjectID()

int CDPL.Vis.Path2DConverter.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python Path2DConverter instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two Path2DConverter instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().

Returns
The numeric ID of the internally referenced C++ class instance.

◆ moveTo()

None CDPL.Vis.Path2DConverter.moveTo ( float  x,
float  y 
)

Called when a Vis.Path2D element created by a Vis.Path2D.moveTo() call is encountered.

Parameters
xThe x-coordinate of the newly set current position.
yThe y-coordinate of the newly set current position.

◆ arcTo()

None CDPL.Vis.Path2DConverter.arcTo ( float  cx,
float  cy,
float  rx,
float  ry,
float  start_ang,
float  sweep 
)

Called when a Vis.Path2D element created by a Vis.Path2D.arcTo() call is encountered.

Parameters
cxThe x-coordinate of the ellipse center.
cyThe y-coordinate of the ellipse center.
rxThe x-radius of the ellipse.
ryThe y-radius of the ellipse.
start_angThe start angle of the arg in degrees.
sweepThe length of the arg in degrees.

◆ lineTo()

None CDPL.Vis.Path2DConverter.lineTo ( float  x,
float  y 
)

Called when a Vis.Path2D element created by a Vis.Path2D.lineTo() call is encountered.

Parameters
xSpecifies the x-coordinate of the line's end point.
ySpecifies the y-coordinate of the line's end point.