A diagram item that adds text to the canvas.
More...
Static methods inherited from DiagramItem: |
def | CleanArgs |
Data and other attributes inherited from DiagramItem: |
float | expansion_factor = 100.0 |
Detailed Description
A diagram item that adds text to the canvas.
This class is a wrapper for the Tkinter.Canvas.create_text() function.
Note: Text will not scale with the reset of the diagram. You will need to adjust the font size and possibly the DiagramBuilder's scale adjustment (see DiagramBuilder.SetScaleAdjustment()) to make the text display as desired.
Constructor & Destructor Documentation
def diagram.DiagramBuilder.TextItem.__init__ |
( |
|
args | ) |
|
Creates a new instance.
Parameters:
point: A two element float tuple that gives location for the text.
args: The same arguments that are provided to Tkinter.Canvas.create_text with
the addition of the 'highlight' argument for the highlight color. If the
'highlight' argument is not provided then calls to highlight this drawing item
will be ignored.
Reimplemented from diagram.DiagramBuilder.DiagramItem.
Member Function Documentation
def diagram.DiagramBuilder.TextItem.CleanArgs |
( |
|
args | ) |
|
def diagram.DiagramBuilder.TextItem.ClearHighlight |
( |
|
args | ) |
|
def diagram.DiagramBuilder.TextItem.ClearHover |
( |
|
args | ) |
|
def diagram.DiagramBuilder.TextItem.Draw |
( |
|
args | ) |
|
Draws the diagram item on the canvas.
Parameters:
canvas: The canvas widget.
Returns A list of ids of items added to the canvas.
Reimplemented from diagram.DiagramBuilder.DiagramItem.
def diagram.DiagramBuilder.TextItem.Erase |
( |
|
args | ) |
|
def diagram.DiagramBuilder.TextItem.GetAnchorByAngle |
( |
|
args | ) |
|
Gets the anchor direction based on the specified angle. The angle gives
the direction in which the label should be pulled.
builtin.classobj_cls_m Class Methods from builtin.classobj
def diagram.DiagramBuilder.TextItem.Highlight |
( |
|
args | ) |
|
def diagram.DiagramBuilder.TextItem.Hover |
( |
|
args | ) |
|
Member Data Documentation
float diagram.DiagramBuilder.TextItem.expansion_factor = 100.0 |
|
static |