A diagram item that adds a labeled arrow 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 a labeled arrow to the canvas.
Note: The dimension label 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 label display as desired.
Method resolution order
LabeledArrowItem
CompositeItem
DiagramItem
Constructor & Destructor Documentation
def diagram.DiagramBuilder.LabeledArrowItem.__init__ |
( |
|
args | ) |
|
Creates a new instance.
Parameters:
location: The 2D location (tuple) of the pointer of the arrow.
length: The length of the arrow.
pull_dir: A 2D vector (tuple) that gives the direction in which to pull
the arrow stem.
line_args: A dictionary that gives the Tk canvas agruments for the arrow.
These are the same arguments that are provided to
Tkinter.Canvas.create_line with the addition of the 'highlight' argument
for the highlight color. If the 'highlight' argument is not provided then
calls to highlight the arrow will be ignored.
label_args: A dictionary that gives the Tk canvas arguments for the label.
These are 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 the label will be ignored.
Reimplemented from diagram.DiagramBuilder.CompositeItem.
Member Function Documentation
def diagram.DiagramBuilder.LabeledArrowItem.CleanArgs |
( |
|
args | ) |
|
def diagram.DiagramBuilder.LabeledArrowItem.ClearHighlight |
( |
|
args | ) |
|
def diagram.DiagramBuilder.LabeledArrowItem.ClearHover |
( |
|
args | ) |
|
def diagram.DiagramBuilder.LabeledArrowItem.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.CompositeItem.
def diagram.DiagramBuilder.LabeledArrowItem.Erase |
( |
|
args | ) |
|
def diagram.DiagramBuilder.LabeledArrowItem.Highlight |
( |
|
args | ) |
|
def diagram.DiagramBuilder.LabeledArrowItem.Hover |
( |
|
args | ) |
|
Member Data Documentation
float diagram.DiagramBuilder.LabeledArrowItem.expansion_factor = 100.0 |
|
static |