Overview of Item Types

TCL Items

Items of type tcl are really a simple of way of having user-describable item. A Tcl item really consists of two Tcl scripts to render an item procedurally (one to render, and the other to compute the bounding box.) The render script can render by calling the pad widget with the various drawing routines (see drawline, drawtext, setcolor, setlinewidth.) Tcl's are created with widget commands of the following form:

pathName create tcl [option value option value ...]

There may be any number of option-value pairs, each of which sets one of the configuration options for the item. These same option-value pairs may be used in itemconfigure widget commands to change the item's configuration. The following options are supported for tcl objects:

[83] -bb boundingboxScript

(available only for KPL and TCL item types)

A Tcl script that will be evaluated to compute the bounding box of this item. It should return a 4 element list whose members are "x1 y1 x2 y2" which are the lower left and upper right corners of this items bounding box.


July 9, 1996 - 9 JUL 1996

Generated with Harlequin WebMaker

Web Accessibility