Is there anyway to create an oval or round or any other shape button in TCL/TK? I am trying to use a canvas to do so, but I am not sure how to do it exactly. I'm pretty new to tcl so the simpler the better
An oval is defined by two sets of coordinates that define its bounding box. If the box is square, a circle is drawn. You can set the color of the interior of the oval as well as the outline of the oval. A sampler of ovals is shown in the next example.
Attributes for oval canvas items:
-fill color The color of the interior of the oval.
-outline color The color for the outline of the oval.
-stipple bitmap Stipple pattern for oval fill.
-tags tagList Set of tags for the oval item.
-width width The thickness of the outline.
Arcs
An arc is a section of an oval. The dimensions of the oval are determined by four coordinates that are its bounding box. The arc is then determined by two angles, the start angle and the extent. The region of the oval can be filled or unfilled, and there are three different ways to define the fill region. The pieslice style connects the arc with the center point of the oval. The chord style connects the two endpoints of the arc. The arc style just fills the arc itself and there is no outline.
Attributes for arc canvas items.
-extent degrees The length of the arc in the counter-clockwise direction.
-fill color The color of the interior of the arc region.
-outline color The color of the arc itself.
-start degrees The starting angle of the arc.
-stipple bitmap A stipple pattern for the fill.
-style style pieslice, chord, arc
-tags tagList List of tags for the arc item.
-width num Width, in canvas coordinates, of the arc and outline.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.