Recent Changes - Search:



Tkpath is a Tk canvas that adds these new SVG item types: path prect polyline ppolygon circle ellipse ptext group style.

Tkpath can be used as an enhanced drop-in replacement for the Tk canvas. It has also been extended to support image fills.

Image Fills

Tkpath now supports the use of images as arguments to the -fill option. This makes it possible to render complex shaped images. eg.

Image Generation

Shapes created with tkpath can be dumped to images. In the following, the top contains tkpath shapes while the bottom has buttons that use the resulting dumped images:

Blt Buttons

As well as being an enhanced drop-in replacement for the Tk canvas, tkpath can be used to generate images for use with the -bdimage option of Blt Buttons, eg.



tkpath can also be used to implement custom widgets. For example, Gui uses tkpath to implement progressbar:


Version 0.3.2 of tkpath has numerous bug fixes and additions:

  • Add support for tiled images in -fill option under Unix/Cairo and Windows/GDI.
  • Fix display bug when moving transformed items.
  • Add -compact paths, with commas and no spaces before/after command strings.
  • Add "itempath" command for returning path of items: eg. prect.
  • Add -compact and -relative options to "itempath".
  • Add "itemreconfigure" command clearing item option-modified flag.
  • Add "style reconfigure" command clearing style option-modified flag.
  • Support gradient -stops given just a list of colors.
  • Allow gradient to inherit opacity if not explicitly given in -stops.
  • Do not generate a "delete root error" when clearing with: ".p delete all".
  • Remove the unimplemented "-tagstyle" option.
  • Write a man page and preprocessed html document.
  • Create "demos/widgets" to provide users with an organized tour.
  • Create "demos/imagefill.tcl" demonstrating image tiles within shapes.
  • Support named styles and gradients.
  • Fix -strokedash crash on NULL bug


Note: tkpath was written by the late Mats Bengtsson.

Edit - History - Print - Recent Changes - Search
Page last modified on January 21, 2011, at 10:36 AM