Chemical Data Processing Library Python API - Version 1.2.0
|
A graphics primitive representing a text label. More...
Public Member Functions | |
None | __init__ () |
Construct an empty text label primitive at position (0, 0). | |
None | __init__ (TextLabelPrimitive2D prim) |
Initializes a copy of the TextLabelPrimitive2D instance prim. More... | |
TextLabelPrimitive2D | assign (TextLabelPrimitive2D prim) |
Replaces the current state of self with a copy of the state of the TextLabelPrimitive2D instance prim. More... | |
None | setText (str text) |
Sets the text of the label. More... | |
str | getText () |
Returns the text of the label. More... | |
None | setPosition (Math.Vector2D pos) |
Sets the position of the text label. More... | |
None | setPosition (float x, float y) |
Sets the position of the text label to (x, y). More... | |
Math.Vector2D | getPosition () |
Returns the position of the text label. More... | |
None | setPen (Pen pen) |
Sets the pen defining the color of the text label. More... | |
Pen | getPen () |
Returns the pen defining the color of the text label. More... | |
None | setFont (Font font) |
Sets the font of the text label. More... | |
Font | getFont () |
Returns the font of the text label. More... | |
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 | |
text = property(getText, setText) | |
position = property(getPosition, setPosition) | |
pen = property(getPen, setPen) | |
font = property(getFont, setFont) | |
Properties inherited from CDPL.Vis.GraphicsPrimitive2D | |
objectID = property(getObjectID) | |
A graphics primitive representing a text label.
None CDPL.Vis.TextLabelPrimitive2D.__init__ | ( | TextLabelPrimitive2D | prim | ) |
Initializes a copy of the TextLabelPrimitive2D instance prim.
prim | The TextLabelPrimitive2D instance to copy. |
TextLabelPrimitive2D CDPL.Vis.TextLabelPrimitive2D.assign | ( | TextLabelPrimitive2D | prim | ) |
Replaces the current state of self with a copy of the state of the TextLabelPrimitive2D instance prim.
prim | The TextLabelPrimitive2D instance to copy. |
None CDPL.Vis.TextLabelPrimitive2D.setText | ( | str | text | ) |
Sets the text of the label.
text | The text of the label. |
str CDPL.Vis.TextLabelPrimitive2D.getText | ( | ) |
Returns the text of the label.
None CDPL.Vis.TextLabelPrimitive2D.setPosition | ( | Math.Vector2D | pos | ) |
Sets the position of the text label.
pos | The baseline position of the text label. |
None CDPL.Vis.TextLabelPrimitive2D.setPosition | ( | float | x, |
float | y | ||
) |
Sets the position of the text label to (x, y).
x | The x-position of the text label. |
y | The y-position of the baseline. |
Math.Vector2D CDPL.Vis.TextLabelPrimitive2D.getPosition | ( | ) |
Returns the position of the text label.
None CDPL.Vis.TextLabelPrimitive2D.setPen | ( | Pen | pen | ) |
Sets the pen defining the color of the text label.
pen | The pen defining the color of the text label. |
Pen CDPL.Vis.TextLabelPrimitive2D.getPen | ( | ) |
Returns the pen defining the color of the text label.
None CDPL.Vis.TextLabelPrimitive2D.setFont | ( | Font | font | ) |
Sets the font of the text label.
font | The font of the text label. |
Font CDPL.Vis.TextLabelPrimitive2D.getFont | ( | ) |
Returns the font of the text label.