Dashed and Stippled outlines in Tk8.2(.2)
The current Tk8.2(.2) release is missing some features, that hopefully appear
in future releases. The most important of them are dashed and stippled
outlines and postscript output for images and windows. This patch adds
the following enhancements:
* Advanced tag searching, written by John Ellson, <ellson@lucent.com>, 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 <phelps@CS.Berkeley.EDU>. This
makes the dash-patch compatible with TkMan 2.0.
* Support for John Ellson's <ellson@lucent.com> Tkspline extension
(ftp://ftp.tcltk.com/pub/ellson/Tkspline0.1.tar.gz). 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}
-dash - = -dash {6 2}
-dash -. = -dash {6 2 4 2}
-dash -.. = -dash {6 2 4 2 4 2}
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 .....). This
feature originally comes from Blt, which is written by George 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 <matt@starnix.com>) 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 (http://www.starnix.com/download/tcl/visrotate1.2.tar.gz).
* The entry validation patch, written by Jeffrey Hobbs <jeffrey.hobbs@scriptics.com>.
* 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.
* The options "-dash", "-activedash", "-disableddash", and "-dashoffset"
are added to Arcs, Lines, Rectangles, Ovals and Polygons to allow for
dashed outlines.
* 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. 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 Scriptics
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 has "-outlinestipple" in the core, but not its family members.
* 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).
==========================================================================
More information about the dash-patch:
http://purl.oclc.org/net/nijtmans/dash.html
Maintained by:
Jan Nijtmans, CMG (Computer Management Group) Arnhem B.V.
email: j.nijtmans@chello.nl (private)
jan.nijtmans@cmg.nl (work)
url: http://purl.oclc.org/net/nijtmans/