Dashed and Stippled outlines in Tk8.0.5 and
Tk8.2(.3)
|
|
| references since November 1 1999 |
The Tk8.0.5 and Tk8.2(.3) releases are missing some features, which
for the most of them are available in Tk8.3 and later. The most important
of them are dashed and stippled outlines and postscript output for images and
windows.
Currently the following versions are available. They all have the same
functionality as described below:
Older versions are still available 'as is', but no long supported:
This patch adds the following enhancements:
- Memory leak discovered in advanced tag search. Fixed January 16,
2000.
- Objectiefied the "frame" and "toplevel". This feature caused a crash
when used together with Expect_tk. This bug, which was reported by David Engel is fixed November 6,
1999.
- Advanced tag searching, written by John Ellson, supports logical
expressions of tags anywhere "tagOrId" is accepted in the canvas.
Operators "&&", "||", "^", "!", and parenthesized subexpressions
are supported.
- The canvas now supports the new Tcl_Obj API. Makes things much
faster.
- Elide-patch, written by Tom
Phelps. This makes the dash-patch compatible with TkMan
2.0.
- The "-class" option now works for all widgets. (Origially implemented by
Leo Schubert; also known as the "class-patch")
- Support for John Ellson's Tkspline
extension. This allows the line and polygon canvas items to use additional
smooth methods.
- The options "-dash", "-activedash", "-disableddash", and "-dashoffset"
are added to Arcs, Lines, Rectangles, Ovals and Polygons to allow for
dashed outlines. The dash pattern can either be a list of integers or a
string. When the line width is 1, the following equivalency exists:
| -dash . |
-dash {2 4} |
dotted |
| -dash - |
-dash {6 2} |
dashed |
| -dash -. |
-dash {6 2 4 2} |
dash-dot |
| -dash -.. |
-dash {6 2 4 2 4 2} |
dash-dot-dot |
If the line width is greater than 1, all values in the dash list are
multiplied by the line width. So a "." will always look as a dot and "-"
always as a dash. Both old and new syntax are continued to be supported,
but only the above 4 examples are displayed correctly on Windows.
- Options "-tile", "-activetile", "-disabledtile", "-outlinetile",
"-activeoutlinetile" and "-disabledoutlinetile". Now you can use an image
for tiling. These options override the corresponding "-fill" and
"-stipple" options. It works for all canvas objects and for many widgets
(e.g. text, canvas, buttons, frames .....). The original code comes from
BLT, which is written by George A. Howlett
- Postscript output for images and windows in canvas (Written by Henry A
Rowley, originally distributed as tkImgPs.tar.gz)
- New option "-warp" for the "event generate" function. When this option
is set to "yes" (or "1" or "true"), not only an event is generated, but
also the mouse pointer is warped to the same location. For example: "event
generate . <Motion> -warp yes -x 10 -y 10" It can be used for Motion,
Button, ButtonRelease and Key events only.
- The visitors patch (by Matthew
Rice) is also included. This makes it possible to add new canvas
commands without making more changes in the Tcl/Tk core. An example is his
rotate visitor (visrotate1.2.tar.gz).
- The entry validation patch, written by Jeffrey Hobbs.
- The option "state" is added to all canvas objects and the canvas it
self. Many options are added to all canvas objects that are related to
this state.
- Indexing for coordinates of polygons and lines.
- All canvas objects now accept the coordinates in a single argument. This
works for both the "create" and the "coords" commands.
- The option "-joinstyle" is added to Polygons, and a small related bug is
corrected. Works the same as for lines, except that the default is "round"
and not "miter". In my opinion the default should be "miter", but
unfortunately John Ousterhout only implemented rounded outlines for
polygons now. It's easy to change in the future, anyway.
- The options "-outlinestipple", "-activeoutlinestipple", and
"-disabledoutlinestipple" are added to Rectangles, Ovals and Polygons.
(Arcs already have "-outlinestpple" in Tk4.1).
- The option "-updatecommand" specifies a command that should be executed
each time the canvas object is updated on the screen.
- The scan dragto widget scroll command now has an additional parameter
gain. You can override the default gain of 10 times by that. This works
for list boxes and text widgets too.
- Any widget that has the -state or -wrap options now accepts truncated
values. So you can use "-state n" as abbreviation of "-state normal" or
"-wrap w" as abbreviation of "-wrap word"
- The manual page (canvas.n) is adapted for all of the above. (Thanks to
John Ellson)
- Postscript output is adapted for all of the above changes, except for
the "-tile" option (and "-activetile" ...... of course).


| Written by: |
Updated: February 17, 2006 |
- Jan Nijtmans
LogicaCMG Arnhem B.V.
- email:
- jan.nijtmans@gmail.com
(private)
- jan.nijtmans@logicacmg.com
(work)
- url:
- http://purl.oclc.org/net/nijtmans/