Abstract parent class for items added to a diagram. More...
Methods defined here: | |
def | ClearHighlight |
def | Draw |
def | Erase |
def | Highlight |
def | __init__ |
Data and other attributes defined here: | |
float | expansion_factor = 100.0 |
Abstract parent class for items added to a diagram.
Inheriting classes should override the _DrawCore() function. The Highlight and ClearHighlight functions may be overridden if their default behavior is not sufficient. See also CompositeItem for creating more complex diagram item types.
def diagram.DiagramBuilder.DiagramItem.__init__ | ( | args | ) |
__init__(args)
Reimplemented in diagram.DiagramBuilder.TextItem, diagram.DiagramBuilder.RectangleItem, diagram.DiagramBuilder.PolygonItem, diagram.DiagramBuilder.OvalItem, diagram.DiagramBuilder.LineItem, diagram.DiagramBuilder.Layout3DPolygonItem, diagram.DiagramBuilder.LabeledArrowItem, diagram.DiagramBuilder.DimensionItem, diagram.DiagramBuilder.CompositeItem, and diagram.DiagramBuilder.ArcItem.
def diagram.DiagramBuilder.DiagramItem.ClearHighlight | ( | args | ) |
Returns the diagram item to its original color. Parameters: canvas: The canvas widget.
Reimplemented in diagram.DiagramBuilder.TextItem, diagram.DiagramBuilder.RectangleItem, diagram.DiagramBuilder.PolygonItem, diagram.DiagramBuilder.OvalItem, diagram.DiagramBuilder.LineItem, diagram.DiagramBuilder.Layout3DPolygonItem, diagram.DiagramBuilder.LabeledArrowItem, diagram.DiagramBuilder.DimensionItem, diagram.DiagramBuilder.CompositeItem, and diagram.DiagramBuilder.ArcItem.
def diagram.DiagramBuilder.DiagramItem.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 in diagram.DiagramBuilder.TextItem, diagram.DiagramBuilder.RectangleItem, diagram.DiagramBuilder.PolygonItem, diagram.DiagramBuilder.OvalItem, diagram.DiagramBuilder.LineItem, diagram.DiagramBuilder.Layout3DPolygonItem, diagram.DiagramBuilder.LabeledArrowItem, diagram.DiagramBuilder.DimensionItem, diagram.DiagramBuilder.CompositeItem, and diagram.DiagramBuilder.ArcItem.
def diagram.DiagramBuilder.DiagramItem.Erase | ( | args | ) |
Erases the diagram item from the canvas. Parameters: canvas: The canvas widget.
Reimplemented in diagram.DiagramBuilder.TextItem, diagram.DiagramBuilder.RectangleItem, diagram.DiagramBuilder.PolygonItem, diagram.DiagramBuilder.OvalItem, diagram.DiagramBuilder.LineItem, diagram.DiagramBuilder.Layout3DPolygonItem, diagram.DiagramBuilder.LabeledArrowItem, diagram.DiagramBuilder.DimensionItem, diagram.DiagramBuilder.CompositeItem, and diagram.DiagramBuilder.ArcItem.
def diagram.DiagramBuilder.DiagramItem.Highlight | ( | args | ) |
Changes the diagram item to its highlight color. Parameters: canvas: The canvas widget.
Reimplemented in diagram.DiagramBuilder.TextItem, diagram.DiagramBuilder.RectangleItem, diagram.DiagramBuilder.PolygonItem, diagram.DiagramBuilder.OvalItem, diagram.DiagramBuilder.LineItem, diagram.DiagramBuilder.Layout3DPolygonItem, diagram.DiagramBuilder.LabeledArrowItem, diagram.DiagramBuilder.DimensionItem, diagram.DiagramBuilder.CompositeItem, and diagram.DiagramBuilder.ArcItem.
|
static |