A diagram item that adds a polygon to the canvas. More...
Methods defined here: | |
def | __init__ |
Methods inherited from DiagramItem: | |
def | ClearHighlight |
def | ClearHover |
def | Draw |
def | Erase |
def | Highlight |
def | Hover |
Static methods inherited from DiagramItem: | |
def | CleanArgs |
Data and other attributes inherited from DiagramItem: | |
float | expansion_factor = 100.0 |
Additional Inherited Members | |
Public Member Functions inherited from diagram.DiagramBuilder.DiagramItem | |
Static Public Attributes inherited from diagram.DiagramBuilder.DiagramItem | |
float | expansion_factor = 100.0 |
A diagram item that adds a polygon to the canvas.
This class is a wrapper for the Tkinter.Canvas.create_polygon() function.
def diagram.DiagramBuilder.PolygonItem.__init__ | ( | args | ) |
Creates a new instance. Parameters: points: The list of vertices for the polygon to draw. The vertices are two element float tuples (i.e. x & y-coordinate pairs). args: The same arguments that are provided to Tkinter.Canvas.create_polygon 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.
Reimplemented in diagram.DiagramBuilder.Layout3DPolygonItem.
def diagram.DiagramBuilder.PolygonItem.CleanArgs | ( | args | ) |
CleanArgs(args)
Reimplemented from diagram.DiagramBuilder.DiagramItem.
Reimplemented in diagram.DiagramBuilder.Layout3DPolygonItem.
def diagram.DiagramBuilder.PolygonItem.ClearHighlight | ( | args | ) |
Returns the diagram item to its original color. Parameters: canvas: The canvas widget.
Reimplemented from diagram.DiagramBuilder.DiagramItem.
Reimplemented in diagram.DiagramBuilder.Layout3DPolygonItem.
def diagram.DiagramBuilder.PolygonItem.ClearHover | ( | args | ) |
ClearHover(args)
Reimplemented from diagram.DiagramBuilder.DiagramItem.
Reimplemented in diagram.DiagramBuilder.Layout3DPolygonItem.
def diagram.DiagramBuilder.PolygonItem.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.
Reimplemented in diagram.DiagramBuilder.Layout3DPolygonItem.
def diagram.DiagramBuilder.PolygonItem.Erase | ( | args | ) |
Erases the diagram item from the canvas. Parameters: canvas: The canvas widget.
Reimplemented from diagram.DiagramBuilder.DiagramItem.
Reimplemented in diagram.DiagramBuilder.Layout3DPolygonItem.
def diagram.DiagramBuilder.PolygonItem.Highlight | ( | args | ) |
Changes the diagram item to its highlight color. Parameters: canvas: The canvas widget.
Reimplemented from diagram.DiagramBuilder.DiagramItem.
Reimplemented in diagram.DiagramBuilder.Layout3DPolygonItem.
def diagram.DiagramBuilder.PolygonItem.Hover | ( | args | ) |
Hover(args)
Reimplemented from diagram.DiagramBuilder.DiagramItem.
Reimplemented in diagram.DiagramBuilder.Layout3DPolygonItem.
|
static |