Class ::tycho::Solid


Inherits: ::tycho::Picture - Source File - Contents: public procs - public commons
A psuedo-3D polygon. This accepts all "standard" relief options: flat, raised, sunken, ridge, and groove. Because of some funnies with Tk's coordinates, the last two don't work too well with sharp angles (< 25 or so), but with moderate angles they look fine.

Reading Picture documentation.


Public constructs

Public Procs

construct id canvas slate tags args
Create a new item.
_borderwidth id canvas slate borderwidth
Update the -borderwidth configuration option. Just cause a redraw by calling the coords method with the current coordinates.

This could be made a lot faster by duplicating code.

_color id canvas slate color
Update the -color configuration option.
_relief id canvas slate relief
Update the -relief option.
coords id canvas slate args
Query or set the coordinates of the object. This procedure ensures that the last two points are the same as the first two.
ghost id canvas slate
Create and return a "ghost" of the item.

FIXME: Why do we need to provide this -- the Slate should do the right thing from the shape variable?

Public Commons

_borderwidth
The width of the relief border.
_color
The color of the frame.
_relief
The relief: raised, sunken, groove, ridge, or flat.
lit
The polygons that are "lit".
notlit
The polygons in the inside shadow (ridge and groove reliefs only).
shaded
The polygons that are "shaded".
notshaded
The polygons in the inside lit region (ridge and groove reliefs only).
surface
The polygonal surface.
colorShadesObject
The object used to get shades of color.
methodtable
All methods are looked up through a table.
optiondefault
All options have a default value.
shape polygon
The "shape" of items of this class.

Index of classes



Author: H. John Reekie
Version: @(#)Solid.itcl 1.18 12/13/96
Copyright: (c) 1996 The Regents of the University of California.