SDS2 Parametric API
 All Classes Namespaces Functions Variables Pages
List of all members
diagram.DiagramBuilder.RectangleItem Class Reference

A diagram item that adds a rectangle to the canvas. More...

Inheritance diagram for diagram.DiagramBuilder.RectangleItem:
diagram.DiagramBuilder.DiagramItem

Methods defined here:

def __init__

Methods inherited from DiagramItem:

def ClearHighlight
def Draw
def Erase
def Highlight

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

Detailed Description

A diagram item that adds a rectangle to the canvas.

This class is a wrapper for the Tkinter.Canvas.create_rectangle() function.

Constructor & Destructor Documentation

def diagram.DiagramBuilder.RectangleItem.__init__ (   args)
 Creates a new instance.
 Parameters:  
 point1, point1: Two element float tuples that give the diagonally opposite
 corners that define the rectangle.        
 args: The same arguments that are provided to Tkinter.Canvas.create_rectangle 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.RectangleItem.ClearHighlight (   args)
 Returns the diagram item to its original color.
 Parameters:
 canvas: The canvas widget.

Reimplemented from diagram.DiagramBuilder.DiagramItem.

def diagram.DiagramBuilder.RectangleItem.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.RectangleItem.Erase (   args)
 Erases the diagram item from the canvas.
 Parameters:
 canvas: The canvas widget.

Reimplemented from diagram.DiagramBuilder.DiagramItem.

def diagram.DiagramBuilder.RectangleItem.Highlight (   args)
 Changes the diagram item to its highlight color.
 Parameters:
 canvas: The canvas widget.

Reimplemented from diagram.DiagramBuilder.DiagramItem.

Member Data Documentation

float diagram.DiagramBuilder.RectangleItem.expansion_factor = 100.0
static