head	1.46;
access;
symbols
	core-8-5-9:1.34.2.1
	core-8-5-8:1.34.2.1
	macosx-cocoa-merge:1.43
	macosx-cocoa-premerge:1.43
	macosx-carbon-freeze:1.43
	core-8-5-7:1.34
	core-8-5-6:1.34
	core-8-6-b1:1.40
	core-8-6-a3:1.38
	core-8-5-5:1.34
	core-8-6-a2:1.35
	core-8-5-4:1.34
	core-8-5-3:1.34
	core-8-6-a1:1.34
	core-8-4-19:1.13.2.4
	core-8-5-branch:1.34.0.2
	core-8-5-2:1.34
	core-8-4-18:1.13.2.4
	core-8-5-1:1.34
	core-8-4-17:1.13.2.4
	core-8-5-0:1.32
	core-8-5-b3:1.30
	core-8-5-b2:1.28
	core-8-4-16:1.13.2.3
	core-8-5-b1:1.25
	core-stablilizer-merge:1.25
	core-stabilizer-branch:1.24.0.2
	core-stabilizer-merge:1.34
	core-8-4-15:1.13.2.3
	core-8-5-a6:1.23
	core-8-5-a5:1.22
	core-8-4-14:1.13.2.3
	core-8-5-a4:1.22
	core-8-4-13:1.13.2.3
	core-8-4-12:1.13.2.2
	core-8-4-11:1.13.2.2
	core-8-5-a3:1.20
	core-8-4-10:1.13.2.2
	core-8-4-9-branch:1.13.2.1.0.2
	core-8-5-a2:1.18
	core-8-4-9:1.13.2.1
	core-8-4-8:1.13.2.1
	core-8-4-7:1.13
	core-8-5-a1:1.13
	core-8-4-6:1.13
	core-8-4-5:1.13
	mistachkin-dev-branch:1.13.0.4
	core-8-4-4:1.13
	core-8-4-3:1.13
	core-8-4-branch:1.13.0.2
	core-8-4-2:1.13
	core-8-4-1:1.13
	core-8-3-5:1.6.2.1
	core-8-4-0:1.13
	macosx-8-4-merge-2002-08-31-trunk:1.13
	macosx-8-4-premerge-2002-08-31-branch:1.12.2.1
	macosx-8-4-premerge-2002-08-31-trunk:1.13
	macosx-8-4-merge-2002-08-30-branch:1.12.2.1
	macosx-8-4-merge-2002-08-30-trunk:1.13
	macosx-8-4-merge-2002-08-20-branch:1.12.2.1
	macosx-8-4-merge-2002-08-20-trunk:1.13
	core-8-4-b2:1.13
	core-8-4-b1:1.12
	macosx-premerge-6-9-02:1.12
	core-8-4-a4:1.12
	core-8-3-4:1.6.2.1
	macosx-8-4-branch:1.12.0.2
	macosx-8-4-branchpoint:1.12
	core-8-4-a3:1.12
	core-8-3-3:1.6.2.1
	dgp-privates-into-namespace:1.11.0.4
	tclpro-1-5-0:1.6
	core-8-4-win-speedup:1.11.0.2
	core-8-4-a2:1.11
	tclpro-1-4-1:1.6
	tclpro-1-4-0:1.6
	core-8-3-2:1.6
	ajuba-ajuba2-2-1-base:1.6
	ajuba-ajuba2-2-0:1.6
	core-8-4-a1:1.8
	core-8-3-1-branch:1.6.0.2
	core-8-3-1:1.6
	scriptics-sc-2-0-b5:1.6
	scriptics-sc-2-0-fixed:1.6
	scriptics-sc-2-0-b2:1.6
	scriptics-sc-2-0-b1:1.6
	core-8-3-0:1.6
	core-8-3-b2:1.5
	core-8-3-b1:1.5
	scriptics-sc-1-1:1.3
	scriptics-sc-1-1-b1:1.3
	core-8-2-3:1.3
	scriptics-sc-1-1-branch:1.3.0.16
	scriptics-sc-1-1-base:1.3
	scriptics-sc-1-0:1.3
	scriptics-sc-1-0-branch:1.3.0.14
	scriptics-sc-1-0-base:1.3
	core-8-2-2:1.3
	core-8-2-1:1.3
	scriptics-bc-1-0-b1:1.3
	core-8-2-1-branch:1.3.0.12
	scriptics-tclpro-1-3-0:1.3
	core-8-2-0:1.3
	core-8-2-b3-branch:1.3.0.10
	core-8-2-b3-base:1.3
	scriptics-tclpro-1-3-b4:1.3
	core-8-2-b2:1.3
	scriptics-tclpro-1-3-b3:1.3
	core-8-2-b1:1.3
	scriptics-tclpro-1-3-b2:1.3
	merge-to-mainline-5/21/99:1.3
	scriptics-tclpro-1-3-b2-branch:1.3.0.8
	core-8-1-1:1.3
	scriptics-tclpro-1-3-b1:1.3
	core-8-1-1-base:1.3
	core-8-1-0:1.3
	merge-to-mainline-4-29-99:1.3
	merge-to-mainline-4-23-99:1.3
	core-8-1-branch-old:1.1.0.4
	core-8-0-6-branch:1.3.0.6
	core-8-0-6-base:1.3
	core-8-0-5:1.3
	core-8-1-b3:1.1.4.2
	core-8-1-b2:1.1.4.2
	dev-8-1-stubs-branch:1.1.4.2.0.2
	dev-stubs-branch:1.3.0.4
	scriptics-tclpro-1-2:1.3
	scriptics-tclpro-1-2-b2:1.3
	core-8-1-merge-2/10/99:1.3
	core-8-0-5-branch:1.3.0.2
	core-8-0-5-base:1.3
	scriptics-tclpro-1-2-b1:1.3
	scriptics-tclpro-1-2-a1:1.3
	core-8-1-b1:1.1.4.2
	core-8-0-4:1.3
	core-8-1-a2:1.1
	core-8-0-2:1.1
	core-8-0-3:1.2;
locks; strict;
comment	@# @;


1.46
date	2010.01.13.09.34.17;	author dkf;	state Exp;
branches;
next	1.45;

1.45
date	2009.07.26.19.40.26;	author dkf;	state Exp;
branches;
next	1.44;

1.44
date	2009.07.14.08.38.13;	author dkf;	state Exp;
branches;
next	1.43;

1.43
date	2009.05.05.09.18.08;	author dkf;	state Exp;
branches;
next	1.42;

1.42
date	2009.01.03.14.41.51;	author dkf;	state Exp;
branches;
next	1.41;

1.41
date	2008.12.21.20.31.35;	author dkf;	state Exp;
branches;
next	1.40;

1.40
date	2008.11.22.20.16.43;	author dkf;	state Exp;
branches;
next	1.39;

1.39
date	2008.11.01.16.14.30;	author dkf;	state Exp;
branches;
next	1.38;

1.38
date	2008.10.02.19.13.35;	author mistachkin;	state Exp;
branches;
next	1.37;

1.37
date	2008.09.30.23.54.46;	author dkf;	state Exp;
branches;
next	1.36;

1.36
date	2008.09.23.13.36.37;	author dkf;	state Exp;
branches;
next	1.35;

1.35
date	2008.06.30.22.57.02;	author dkf;	state Exp;
branches;
next	1.34;

1.34
date	2008.01.30.12.00.38;	author dkf;	state Exp;
branches
	1.34.2.1;
next	1.33;

1.33
date	2007.12.30.23.35.05;	author dkf;	state Exp;
branches;
next	1.32;

1.32
date	2007.12.17.15.24.45;	author dkf;	state Exp;
branches;
next	1.31;

1.31
date	2007.12.13.15.23.43;	author dgp;	state Exp;
branches;
next	1.30;

1.30
date	2007.10.30.21.29.58;	author dkf;	state Exp;
branches;
next	1.29;

1.29
date	2007.10.29.16.04.13;	author dkf;	state Exp;
branches;
next	1.28;

1.28
date	2007.10.26.20.13.23;	author dgp;	state Exp;
branches;
next	1.27;

1.27
date	2007.10.24.14.32.57;	author dkf;	state Exp;
branches;
next	1.26;

1.26
date	2007.10.23.15.44.35;	author dkf;	state Exp;
branches;
next	1.25;

1.25
date	2007.05.25.22.15.42;	author dkf;	state Exp;
branches;
next	1.24;

1.24
date	2007.05.03.23.55.29;	author dkf;	state Exp;
branches
	1.24.2.1;
next	1.23;

1.23
date	2007.04.23.21.19.51;	author das;	state Exp;
branches;
next	1.22;

1.22
date	2006.03.07.22.30.55;	author dkf;	state Exp;
branches;
next	1.21;

1.21
date	2006.01.12.13.38.22;	author dkf;	state Exp;
branches;
next	1.20;

1.20
date	2005.05.12.22.51.03;	author dgp;	state Exp;
branches;
next	1.19;

1.19
date	2005.04.06.21.11.54;	author dkf;	state Exp;
branches;
next	1.18;

1.18
date	2004.10.28.10.22.51;	author dkf;	state Exp;
branches;
next	1.17;

1.17
date	2004.09.19.16.05.36;	author dkf;	state Exp;
branches;
next	1.16;

1.16
date	2004.08.19.14.41.52;	author dkf;	state Exp;
branches;
next	1.15;

1.15
date	2004.08.16.08.24.45;	author dkf;	state Exp;
branches;
next	1.14;

1.14
date	2004.07.07.09.27.10;	author dkf;	state Exp;
branches;
next	1.13;

1.13
date	2002.08.08.04.54.01;	author hobbs;	state Exp;
branches
	1.13.2.1;
next	1.12;

1.12
date	2001.03.30.00.15.53;	author hobbs;	state Exp;
branches
	1.12.2.1;
next	1.11;

1.11
date	2000.09.07.00.23.35;	author hobbs;	state Exp;
branches
	1.11.2.1
	1.11.4.1;
next	1.10;

1.10
date	2000.08.25.06.58.31;	author ericm;	state Exp;
branches;
next	1.9;

1.9
date	2000.07.25.21.14.34;	author jenglish;	state Exp;
branches;
next	1.8;

1.8
date	2000.06.05.23.31.34;	author ericm;	state Exp;
branches;
next	1.7;

1.7
date	2000.05.23.00.31.36;	author hobbs;	state Exp;
branches;
next	1.6;

1.6
date	2000.01.21.03.54.20;	author hobbs;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	99.12.22.23.01.33;	author hobbs;	state Exp;
branches;
next	1.4;

1.4
date	99.12.14.06.51.44;	author hobbs;	state Exp;
branches;
next	1.3;

1.3
date	98.10.16.00.46.18;	author rjohnson;	state Exp;
branches;
next	1.2;

1.2
date	98.09.14.18.22.55;	author stanton;	state Exp;
branches;
next	1.1;

1.1
date	98.04.01.09.39.49;	author rjohnson;	state Exp;
branches
	1.1.4.1;
next	;

1.1.4.1
date	98.09.30.02.16.12;	author stanton;	state Exp;
branches;
next	1.1.4.2;

1.1.4.2
date	98.11.25.21.16.29;	author stanton;	state Exp;
branches;
next	;

1.6.2.1
date	2001.04.04.07.23.48;	author hobbs;	state Exp;
branches;
next	;

1.11.2.1
date	2002.04.02.20.57.53;	author hobbs;	state Exp;
branches;
next	;

1.11.4.1
date	2001.07.03.20.01.07;	author dgp;	state Exp;
branches;
next	;

1.12.2.1
date	2002.08.20.20.27.00;	author das;	state Exp;
branches;
next	;

1.13.2.1
date	2004.10.28.10.19.29;	author dkf;	state Exp;
branches;
next	1.13.2.2;

1.13.2.2
date	2005.05.12.22.50.59;	author dgp;	state Exp;
branches;
next	1.13.2.3;

1.13.2.3
date	2006.03.07.22.30.31;	author dkf;	state Exp;
branches;
next	1.13.2.4;

1.13.2.4
date	2007.11.05.17.21.58;	author dgp;	state Exp;
branches;
next	;

1.24.2.1
date	2007.05.26.04.06.06;	author dgp;	state Exp;
branches;
next	1.24.2.2;

1.24.2.2
date	2007.10.24.12.59.30;	author dgp;	state Exp;
branches;
next	1.24.2.3;

1.24.2.3
date	2007.10.27.04.23.13;	author dgp;	state Exp;
branches;
next	1.24.2.4;

1.24.2.4
date	2007.11.01.16.37.14;	author dgp;	state Exp;
branches;
next	1.24.2.5;

1.24.2.5
date	2008.01.23.16.39.11;	author dgp;	state Exp;
branches;
next	1.24.2.6;

1.24.2.6
date	2008.01.31.02.59.18;	author dgp;	state Exp;
branches;
next	;

1.34.2.1
date	2009.07.14.08.40.43;	author dkf;	state Exp;
branches;
next	;


desc
@@


1.46
log
@Changes to make this convert better
@
text
@'\"
'\" Copyright (c) 1992-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\" Copyright (c) 1997-1999 Scriptics Corporation.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" RCS: @@(#) $Id: canvas.n,v 1.45 2009/07/26 19:40:26 dkf Exp $
'\"
.so man.macros
.TH canvas n 8.3 Tk "Tk Built-In Commands"
.BS
'\" Note:  do not modify the .SH NAME line immediately below!
.SH NAME
canvas \- Create and manipulate canvas widgets
.SH SYNOPSIS
\fBcanvas\fR \fIpathName \fR?\fIoptions\fR?
.SO
\-background	\-borderwidth	\-cursor
\-highlightbackground	\-highlightcolor	\-highlightthickness
\-insertbackground	\-insertborderwidth	\-insertofftime
\-insertontime	\-insertwidth	\-relief
\-selectbackground	\-selectborderwidth	\-selectforeground
\-takefocus	\-xscrollcommand	\-yscrollcommand
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-closeenough closeEnough CloseEnough
Specifies a floating-point value indicating how close the mouse cursor
must be to an item before it is considered to be
.QW inside
the item. Defaults to 1.0.
.OP \-confine confine Confine
Specifies a boolean value that indicates whether or not it should be
allowable to set the canvas's view outside the region defined by the
\fBscrollRegion\fR argument.
Defaults to true, which means that the view will
be constrained within the scroll region.
.OP \-height height Height
Specifies a desired window height that the canvas widget should request from
its geometry manager. The value may be specified in any
of the forms described in the \fBCOORDINATES\fR section below.
.OP \-scrollregion scrollRegion ScrollRegion
Specifies a list with four coordinates describing the left, top, right, and
bottom coordinates of a rectangular region.
This region is used for scrolling purposes and is considered to be
the boundary of the information in the canvas.
Each of the coordinates may be specified
in any of the forms given in the \fBCOORDINATES\fR section below.
.OP \-state state State
Modifies the default state of the canvas where \fIstate\fR may be set to
one of: \fBnormal\fR, \fBdisabled\fR, or \fBhidden\fR. Individual canvas
objects all have their own state option which may override the default
state. Many options can take separate specifications such that the
appearance of the item can be different in different situations. The
options that start with \fBactive\fR control the appearance when the mouse
pointer is over it, while the option starting with \fBdisabled\fR controls
the appearance when the state is disabled. Canvas items which are
\fBdisabled\fR will not react to canvas bindings.
.OP \-width width width
Specifies a desired window width that the canvas widget should request from
its geometry manager. The value may be specified in any
of the forms described in the \fBCOORDINATES\fR section below.
.OP \-xscrollincrement xScrollIncrement ScrollIncrement
Specifies an increment for horizontal scrolling, in any of the usual forms
permitted for screen distances. If the value of this option is greater
than zero, the horizontal view in the window will be constrained so that
the canvas x coordinate at the left edge of the window is always an even
multiple of \fBxScrollIncrement\fR; furthermore, the units for scrolling
(e.g., the change in view when the left and right arrows of a scrollbar
are selected) will also be \fBxScrollIncrement\fR. If the value of
this option is less than or equal to zero, then horizontal scrolling
is unconstrained.
.OP \-yscrollincrement yScrollIncrement ScrollIncrement
Specifies an increment for vertical scrolling, in any of the usual forms
permitted for screen distances. If the value of this option is greater
than zero, the vertical view in the window will be constrained so that
the canvas y coordinate at the top edge of the window is always an even
multiple of \fByScrollIncrement\fR; furthermore, the units for scrolling
(e.g., the change in view when the top and bottom arrows of a scrollbar
are selected) will also be \fByScrollIncrement\fR. If the value of
this option is less than or equal to zero, then vertical scrolling
is unconstrained.
.BE
.SH INTRODUCTION
.PP
The \fBcanvas\fR command creates a new window (given
by the \fIpathName\fR argument) and makes it into a canvas widget.
Additional options, described above, may be specified on the
command line or in the option database
to configure aspects of the canvas such as its colors and 3-D relief.
The \fBcanvas\fR command returns its
\fIpathName\fR argument. At the time this command is invoked,
there must not exist a window named \fIpathName\fR, but
\fIpathName\fR's parent must exist.
.PP
Canvas widgets implement structured graphics.
A canvas displays any number of \fIitems\fR, which may be things like
rectangles, circles, lines, and text.
Items may be manipulated (e.g. moved or re-colored) and commands may
be associated with items in much the same way that the \fBbind\fR
command allows commands to be bound to widgets. For example,
a particular command may be associated with the <Button-1> event
so that the command is invoked whenever button 1 is pressed with
the mouse cursor over an item.
This means that items in a canvas can have behaviors defined by
the Tcl scripts bound to them.
.SH "DISPLAY LIST"
.PP
The items in a canvas are ordered for purposes of display,
with the first item in the display list being displayed
first, followed by the next item in the list, and so on.
Items later in the display list obscure those that are
earlier in the display list and are sometimes referred to as being
.QW "on top"
of earlier items.
When a new item is created it is placed at the end of the
display list, on top of everything else.
Widget commands may be used to re-arrange the order of the
display list.
.PP
Window items are an exception to the above rules. The underlying
window systems require them always to be drawn on top of other items.
In addition, the stacking order of window items
is not affected by any of the canvas widget commands; you must use
the Tk \fBraise\fR command and \fBlower\fR command instead.
.SH "ITEM IDS AND TAGS"
.PP
Items in a canvas widget may be named in either of two ways:
by id or by tag.
Each item has a unique identifying number, which is assigned to
that item when it is created. The id of an item never changes
and id numbers are never re-used within the lifetime of a
canvas widget.
.PP
Each item may also have any number of \fItags\fR associated
with it. A tag is just a string of characters, and it may
take any form except that of an integer.
For example,
.QW x123
is OK but
.QW 123
is not.
The same tag may be associated with many different items.
This is commonly done to group items in various interesting
ways; for example, all selected items might be given the tag
.QW selected .
.PP
The tag \fBall\fR is implicitly associated with every item
in the canvas; it may be used to invoke operations on
all the items in the canvas.
.PP
The tag \fBcurrent\fR is managed automatically by Tk;
it applies to the \fIcurrent item\fR, which is the
topmost item whose drawn area covers the position of
the mouse cursor (different item types interpret this in varying ways; see the
individual item type documentation for details).
If the mouse is not in the canvas widget or is not over
an item, then no item has the \fBcurrent\fR tag.
.PP
When specifying items in canvas widget commands, if the
specifier is an integer then it is assumed to refer to
the single item with that id.
If the specifier is not an integer, then it is assumed to
refer to all of the items in the canvas that have a tag
matching the specifier.
The symbol \fItagOrId\fR is used below to indicate that
an argument specifies either an id that selects a single
item or a tag that selects zero or more items.
.PP
\fItagOrId\fR may contain a logical expressions of
tags by using operators:
.QW \fB&&\fR ,
.QW \fB||\fR ,
.QW \fB^\fR ,
.QW \fB!\fR ,
and parenthesized subexpressions. For example:
.CS
      .c find withtag {(a&&!b)||(!a&&b)}
.CE
or equivalently:
.CS
      .c find withtag {a^b}
.CE
will find only those items with either
.QW a
or
.QW b
tags, but not both.
.PP
Some widget commands only operate on a single item at a
time; if \fItagOrId\fR is specified in a way that
names multiple items, then the normal behavior is for
the command to use the first (lowest) of these items in
the display list that is suitable for the command.
Exceptions are noted in the widget command descriptions
below.
.SH "COORDINATES"
.PP
All coordinates related to canvases are stored as floating-point
numbers.
Coordinates and distances are specified in screen units,
which are floating-point numbers optionally followed
by one of several letters.
If no letter is supplied then the distance is in pixels.
If the letter is \fBm\fR then the distance is in millimeters on
the screen; if it is \fBc\fR then the distance is in centimeters;
\fBi\fR means inches, and \fBp\fR means printers points (1/72 inch).
Larger y-coordinates refer to points lower on the screen; larger
x-coordinates refer to points farther to the right.
Coordinates can be specified either as an even number of parameters,
or as a single list parameter containing an even number of x and y
coordinate values.
.SS TRANSFORMATIONS
.PP
Normally the origin of the canvas coordinate system is at the
upper-left corner of the window containing the canvas.
It is possible to adjust the origin of the canvas
coordinate system relative to the origin of the window using the
\fBxview\fR and \fByview\fR widget commands; this is typically used
for scrolling.
Canvases do not support scaling or rotation of the canvas coordinate
system relative to the window coordinate system.
.PP
Individual items may be moved or scaled using widget commands
described below, but they may not be rotated.
.PP
Note that the default origin of the canvas's visible area is
coincident with the origin for the whole window as that makes bindings
using the mouse position easier to work with; you only need to use the
\fBcanvasx\fR and \fBcanvasy\fR widget commands if you adjust the
origin of the visible area. However, this also means that any focus
ring (as controlled by the \fB\-highlightthickness\fR option) and
window border (as controlled by the \fB\-borderwidth\fR option) must
be taken into account before you get to the visible area of the
canvas.
.SH "INDICES"
.PP
Text items support the notion of an \fIindex\fR for identifying
particular positions within the item.
In a similar fashion, line and polygon items support \fIindex\fR for
identifying, inserting and deleting subsets of their coordinates.
Indices are used for commands such as inserting or deleting
a range of characters or coordinates, and setting the insertion
cursor position. An index may be specified in any of a number
of ways, and different types of items may support different forms
for specifying indices.
Text items support the following forms for an index; if you
define new types of text-like items, it would be advisable to
support as many of these forms as practical.
Note that it is possible to refer to the character just after
the last one in the text item; this is necessary for such
tasks as inserting new text at the end of the item.
Lines and Polygons do not support the insertion cursor
and the selection. Their indices are supposed to be even
always, because coordinates always appear in pairs.
.TP 10
\fInumber\fR
.
A decimal number giving the position of the desired character
within the text item.
0 refers to the first character, 1 to the next character, and
so on. If indexes are odd for lines and polygons, they will be
automatically decremented by one.
A number less than 0 is treated as if it were zero, and a
number greater than the length of the text item is treated
as if it were equal to the length of the text item. For
polygons, numbers less than 0 or greater then the length
of the coordinate list will be adjusted by adding or subtracting
the length until the result is between zero and the length,
inclusive.
.TP 10
\fBend\fR
.
Refers to the character or coordinate just after the last one
in the item (same as the number of characters or coordinates
in the item).
.TP 10
\fBinsert\fR
.
Refers to the character just before which the insertion cursor
is drawn in this item. Not valid for lines and polygons.
.TP 10
\fBsel.first\fR
.
Refers to the first selected character in the item.
If the selection is not in this item then this form is illegal.
.TP 10
\fBsel.last\fR
.
Refers to the last selected character in the item.
If the selection is not in this item then this form is illegal.
.TP 10
\fB@@\fIx,y\fR
.
Refers to the character or coordinate at the point given by \fIx\fR and
\fIy\fR, where \fIx\fR and \fIy\fR are specified in the coordinate
system of the canvas.
If \fIx\fR and \fIy\fR lie outside the coordinates covered by the
text item, then they refer to the first or last character in the
line that is closest to the given point.
.SH "DASH PATTERNS"
.PP
Many items support the notion of a dash pattern for outlines.
.PP
The first possible syntax is a list of integers. Each element
represents the number of pixels of a line segment. Only the odd
segments are drawn using the
.QW outline
color. The other segments are drawn transparent.
.PP
The second possible syntax is a character list containing only
5 possible characters
.QW "\fB.,-_ \fR" .
The space can be used
to enlarge the space between other line elements, and cannot
occur as the first position in the string. Some examples:
.CS
\-dash .     \(-> \-dash {2 4}
\-dash -     \(-> \-dash {6 4}
\-dash -.    \(-> \-dash {6 4 2 4}
\-dash -..   \(-> \-dash {6 4 2 4 2 4}
\-dash {. }  \(-> \-dash {2 8}
\-dash ,     \(-> \-dash {4 4}
.CE
.PP
The main difference of this syntax with the previous is that it
is shape-conserving. This means that all values in the dash
list will be multiplied by the line width before display. This
assures that
.QW .
will always be displayed as a dot and
.QW -
always as a dash regardless of the line width.
.PP
On systems which support only a limited set of dash patterns, the dash
pattern will be displayed as the closest dash pattern that is available.
For example, on Windows only the first 4 of the above examples are
available. The last 2 examples will be displayed identically to the first
one.
.SH "WIDGET COMMAND"
.PP
The \fBcanvas\fR command creates a new Tcl command whose
name is \fIpathName\fR. This
command may be used to invoke various
operations on the widget. It has the following general form:
.CS
\fIpathName option \fR?\fIarg arg ...\fR?
.CE
\fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command.
The following widget commands are possible for canvas widgets:
.TP
\fIpathName \fBaddtag \fItag searchSpec \fR?\fIarg arg ...\fR?
.
For each item that meets the constraints specified by
\fIsearchSpec\fR and the \fIarg\fRs, add
\fItag\fR to the list of tags associated with the item if it
is not already present on that list.
It is possible that no items will satisfy the constraints
given by \fIsearchSpec\fR and \fIarg\fRs, in which case the
command has no effect.
This command returns an empty string as result.
\fISearchSpec\fR and \fIarg\fR's may take any of the following
forms:
.RS
.TP
\fBabove \fItagOrId\fR
.
Selects the item just after (above) the one given by \fItagOrId\fR
in the display list.
If \fItagOrId\fR denotes more than one item, then the last (topmost)
of these items in the display list is used.
.TP
\fBall\fR
.
Selects all the items in the canvas.
.TP
\fBbelow \fItagOrId\fR
.
Selects the item just before (below) the one given by \fItagOrId\fR
in the display list.
If \fItagOrId\fR denotes more than one item, then the first (lowest)
of these items in the display list is used.
.TP
\fBclosest \fIx y \fR?\fIhalo\fR? ?\fIstart\fR?
.
Selects the item closest to the point given by \fIx\fR and \fIy\fR.
If more than one item is at the same closest distance (e.g. two
items overlap the point), then the top-most of these items (the
last one in the display list) is used.
If \fIhalo\fR is specified, then it must be a non-negative
value.
Any item closer than \fIhalo\fR to the point is considered to
overlap it.
The \fIstart\fR argument may be used to step circularly through
all the closest items.
If \fIstart\fR is specified, it names an item using a tag or id
(if by tag, it selects the first item in the display list with
the given tag).
Instead of selecting the topmost closest item, this form will
select the topmost closest item that is below \fIstart\fR in
the display list; if no such item exists, then the selection
behaves as if the \fIstart\fR argument had not been specified.
.TP
\fBenclosed\fR \fIx1\fR \fIy1\fR \fIx2\fR \fIy2\fR
.
Selects all the items completely enclosed within the rectangular
region given by \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR.
\fIX1\fR must be no greater then \fIx2\fR and \fIy1\fR must be
no greater than \fIy2\fR.
.TP
\fBoverlapping\fR \fIx1\fR \fIy1\fR \fIx2\fR \fIy2\fR
.
Selects all the items that overlap or are enclosed within the
rectangular region given by \fIx1\fR, \fIy1\fR, \fIx2\fR,
and \fIy2\fR.
\fIX1\fR must be no greater then \fIx2\fR and \fIy1\fR must be
no greater than \fIy2\fR.
.TP
\fBwithtag \fItagOrId\fR
.
Selects all the items given by \fItagOrId\fR.
.RE
.TP
\fIpathName \fBbbox \fItagOrId\fR ?\fItagOrId tagOrId ...\fR?
.
Returns a list with four elements giving an approximate bounding box
for all the items named by the \fItagOrId\fR arguments.
The list has the form
.QW "\fIx1 y1 x2 y2\fR"
such that the drawn
areas of all the named elements are within the region bounded by
\fIx1\fR on the left, \fIx2\fR on the right, \fIy1\fR on the top,
and \fIy2\fR on the bottom.
The return value may overestimate the actual bounding box by
a few pixels.
If no items match any of the \fItagOrId\fR arguments or if the
matching items have empty bounding boxes (i.e. they have nothing
to display)
then an empty string is returned.
.TP
\fIpathName \fBbind \fItagOrId\fR ?\fIsequence\fR? ?\fIcommand\fR?
.
This command associates \fIcommand\fR with all the items given by
\fItagOrId\fR such that whenever the event sequence given by
\fIsequence\fR occurs for one of the items the command will
be invoked.
This widget command is similar to the \fBbind\fR command except that
it operates on items in a canvas rather than entire widgets.
See the \fBbind\fR manual entry for complete details
on the syntax of \fIsequence\fR and the substitutions performed
on \fIcommand\fR before invoking it.
If all arguments are specified then a new binding is created, replacing
any existing binding for the same \fIsequence\fR and \fItagOrId\fR
(if the first character of \fIcommand\fR is
.QW +
then \fIcommand\fR augments an existing binding rather than replacing it).
In this case the return value is an empty string.
If \fIcommand\fR is omitted then the command returns the \fIcommand\fR
associated with \fItagOrId\fR and \fIsequence\fR (an error occurs
if there is no such binding).
If both \fIcommand\fR and \fIsequence\fR are omitted then the command
returns a list of all the sequences for which bindings have been
defined for \fItagOrId\fR.
.RS
.PP
The only events for which bindings may be specified are those related to
the mouse and keyboard (such as \fBEnter\fR, \fBLeave\fR,
\fBButtonPress\fR, \fBMotion\fR, and \fBKeyPress\fR) or virtual events.
The handling of events in canvases uses the current item defined in
\fBITEM IDS AND TAGS\fR above. \fBEnter\fR and \fBLeave\fR events
trigger for an
item when it becomes the current item or ceases to be the current item;
note that these events are different than \fBEnter\fR and \fBLeave\fR
events for windows. Mouse-related events are directed to the current
item, if any. Keyboard-related events are directed to the focus item, if
any (see the \fBfocus\fR widget command below for more on this). If a
virtual event is used in a binding, that binding can trigger only if the
virtual event is defined by an underlying mouse-related or
keyboard-related event.
.PP
It is possible for multiple bindings to match a particular event.
This could occur, for example, if one binding is associated with the
item's id and another is associated with one of the item's tags.
When this occurs, all of the matching bindings are invoked.
A binding associated with the \fBall\fR tag is invoked first,
followed by one binding for each of the item's tags (in order),
followed by a binding associated with the item's id.
If there are multiple matching bindings for a single tag,
then only the most specific binding is invoked.
A \fBcontinue\fR command in a binding script terminates that
script, and a \fBbreak\fR command terminates that script
and skips any remaining scripts for the event, just as for the
\fBbind\fR command.
.PP
If bindings have been created for a canvas window using the \fBbind\fR
command, then they are invoked in addition to bindings created for
the canvas's items using the \fBbind\fR widget command.
The bindings for items will be invoked before any of the bindings
for the window as a whole.
.RE
.TP
\fIpathName \fBcanvasx \fIscreenx\fR ?\fIgridspacing\fR?
.
Given a window x-coordinate in the canvas \fIscreenx\fR, this command returns
the canvas x-coordinate that is displayed at that location.
If \fIgridspacing\fR is specified, then the canvas coordinate is
rounded to the nearest multiple of \fIgridspacing\fR units.
.TP
\fIpathName \fBcanvasy \fIscreeny\fR ?\fIgridspacing\fR?
.
Given a window y-coordinate in the canvas \fIscreeny\fR this command returns
the canvas y-coordinate that is displayed at that location.
If \fIgridspacing\fR is specified, then the canvas coordinate is
rounded to the nearest multiple of \fIgridspacing\fR units.
.TP
\fIpathName \fBcget\fR \fIoption\fR
.
Returns the current value of the configuration option given
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBcanvas\fR
command.
.TP
\fIpathName \fBconfigure ?\fIoption\fR? ?\fIvalue\fR? ?\fIoption value ...\fR?
.
Query or modify the configuration options of the widget.
If no \fIoption\fR is specified, returns a list describing all of
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
information on the format of this list). If \fIoption\fR is specified
with no \fIvalue\fR, then the command returns a list describing the
one named option (this list will be identical to the corresponding
sublist of the value returned if no \fIoption\fR is specified). If
one or more \fIoption\-value\fR pairs are specified, then the command
modifies the given widget option(s) to have the given value(s); in
this case the command returns an empty string.
\fIOption\fR may have any of the values accepted by the \fBcanvas\fR
command.
.TP
\fIpathName\fR \fBcoords \fItagOrId \fR?\fIx0 y0 ...\fR?
.TP
\fIpathName\fR \fBcoords \fItagOrId \fR?\fIcoordList\fR?
.
Query or modify the coordinates that define an item.
If no coordinates are specified, this command returns a list
whose elements are the coordinates of the item named by
\fItagOrId\fR.
If coordinates are specified, then they replace the current
coordinates for the named item.
If \fItagOrId\fR refers to multiple items, then
the first one in the display list is used.
.TP
\fIpathName \fBcreate \fItype x y \fR?\fIx y ...\fR? ?\fIoption value ...\fR?
.TP
\fIpathName \fBcreate \fItype coordList \fR?\fIoption value ...\fR?
.
Create a new item in \fIpathName\fR of type \fItype\fR.
The exact format of the arguments after \fItype\fR depends
on \fItype\fR, but usually they consist of the coordinates for
one or more points, followed by specifications for zero or
more item options.
See the subsections on individual item types below for more
on the syntax of this command.
This command returns the id for the new item.
.TP
\fIpathName \fBdchars \fItagOrId first \fR?\fIlast\fR?
.
For each item given by \fItagOrId\fR, delete the characters, or coordinates,
in the range given by \fIfirst\fR and \fIlast\fR, inclusive.
If some of the items given by \fItagOrId\fR do not support
indexing operations then they ignore this operation.
Text items interpret \fIfirst\fR and \fIlast\fR as indices to a character,
line and polygon items interpret them as indices to a coordinate (an x,y pair).
Indices are described in \fBINDICES\fR above.
If \fIlast\fR is omitted, it defaults to \fIfirst\fR.
This command returns an empty string.
.TP
\fIpathName \fBdelete \fR?\fItagOrId tagOrId ...\fR?
.
Delete each of the items given by each \fItagOrId\fR, and return
an empty string.
.TP
\fIpathName \fBdtag \fItagOrId \fR?\fItagToDelete\fR?
.
For each of the items given by \fItagOrId\fR, delete the
tag given by \fItagToDelete\fR from the list of those
associated with the item.
If an item does not have the tag \fItagToDelete\fR then
the item is unaffected by the command.
If \fItagToDelete\fR is omitted then it defaults to \fItagOrId\fR.
This command returns an empty string.
.TP
\fIpathName \fBfind \fIsearchCommand \fR?\fIarg arg ...\fR?
.
This command returns a list consisting of all the items that
meet the constraints specified by \fIsearchCommand\fR and
\fIarg\fR's.
\fISearchCommand\fR and \fIargs\fR have any of the forms
accepted by the \fBaddtag\fR command.
The items are returned in stacking order, with the lowest item first.
.TP
\fIpathName \fBfocus \fR?\fItagOrId\fR?
.
Set the keyboard focus for the canvas widget to the item given by
\fItagOrId\fR.
If \fItagOrId\fR refers to several items, then the focus is set
to the first such item in the display list that supports the
insertion cursor.
If \fItagOrId\fR does not refer to any items, or if none of them
support the insertion cursor, then the focus is not changed.
If \fItagOrId\fR is an empty
string, then the focus item is reset so that no item has the focus.
If \fItagOrId\fR is not specified then the command returns the
id for the item that currently has the focus, or an empty string
if no item has the focus.
.RS
.PP
Once the focus has been set to an item, the item will display
the insertion cursor and all keyboard events will be directed
to that item.
The focus item within a canvas and the focus window on the
screen (set with the \fBfocus\fR command) are totally independent:
a given item does not actually have the input focus unless (a)
its canvas is the focus window and (b) the item is the focus item
within the canvas.
In most cases it is advisable to follow the \fBfocus\fR widget
command with the \fBfocus\fR command to set the focus window to
the canvas (if it was not there already).
.RE
.TP
\fIpathName \fBgettags\fR \fItagOrId\fR
.
Return a list whose elements are the tags associated with the
item given by \fItagOrId\fR.
If \fItagOrId\fR refers to more than one item, then the tags
are returned from the first such item in the display list.
If \fItagOrId\fR does not refer to any items, or if the item
contains no tags, then an empty string is returned.
.TP
\fIpathName \fBicursor \fItagOrId index\fR
.
Set the position of the insertion cursor for the item(s) given by \fItagOrId\fR
to just before the character whose position is given by \fIindex\fR.
If some or all of the items given by \fItagOrId\fR do not support
an insertion cursor then this command has no effect on them.
See \fBINDICES\fR above for a description of the
legal forms for \fIindex\fR.
Note: the insertion cursor is only displayed in an item if
that item currently has the keyboard focus (see the \fBfocus\fR widget
command, above), but the cursor position may
be set even when the item does not have the focus.
This command returns an empty string.
.TP
\fIpathName \fBimove \fItagOrId index x y\fR
.VS 8.6
This command causes the \fIindex\fR'th coordinate of each of the items
indicated by \fItagOrId\fR to be relocated to the location (\fIx\fR,\fIy\fR).
Each item interprets \fIindex\fR independently according to the rules
described in \fBINDICES\fR above. Out of the standard set of items, only line
and polygon items may have their coordinates relocated this way.
.VE 8.6
.TP
\fIpathName \fBindex \fItagOrId index\fR
.
This command returns a decimal string giving the numerical index
within \fItagOrId\fR corresponding to \fIindex\fR.
\fIIndex\fR gives a textual description of the desired position
as described in \fBINDICES\fR above.
Text items interpret \fIindex\fR as an index to a character,
line and polygon items interpret it as an index to a coordinate (an x,y pair).
The return value is guaranteed to lie between 0 and the number
of characters, or coordinates, within the item, inclusive.
If \fItagOrId\fR refers to multiple items, then the index
is processed in the first of these items that supports indexing
operations (in display list order).
.TP
\fIpathName \fBinsert \fItagOrId beforeThis string\fR
.
For each of the items given by \fItagOrId\fR, if the item supports
text or coordinate, insertion then \fIstring\fR is inserted into the item's
text just before the character, or coordinate, whose index is \fIbeforeThis\fR.
Text items interpret \fIbeforeThis\fR as an index to a character,
line and polygon items interpret it as an index to a coordinate (an x,y pair).
For lines and polygons the \fIstring\fR must be a valid coordinate
sequence.
See \fBINDICES\fR above for information about the forms allowed
for \fIbeforeThis\fR.
This command returns an empty string.
.TP
\fIpathName \fBitemcget\fR \fItagOrId\fR \fIoption\fR
.
Returns the current value of the configuration option for the
item given by \fItagOrId\fR whose name is \fIoption\fR.
This command is similar to the \fBcget\fR widget command except that
it applies to a particular item rather than the widget as a whole.
\fIOption\fR may have any of the values accepted by the \fBcreate\fR
widget command when the item was created.
If \fItagOrId\fR is a tag that refers to more than one item,
the first (lowest) such item is used.
.TP
\fIpathName \fBitemconfigure \fItagOrId\fR ?\fIoption\fR? ?\fIvalue\fR? ?\fIoption value ...\fR?
.
This command is similar to the \fBconfigure\fR widget command except
that it modifies item-specific options for the items given by
\fItagOrId\fR instead of modifying options for the overall
canvas widget.
If no \fIoption\fR is specified, returns a list describing all of
the available options for the first item given by \fItagOrId\fR
(see \fBTk_ConfigureInfo\fR for
information on the format of this list). If \fIoption\fR is specified
with no \fIvalue\fR, then the command returns a list describing the
one named option (this list will be identical to the corresponding
sublist of the value returned if no \fIoption\fR is specified). If
one or more \fIoption\-value\fR pairs are specified, then the command
modifies the given widget option(s) to have the given value(s) in
each of the items given by \fItagOrId\fR; in
this case the command returns an empty string.
The \fIoption\fRs and \fIvalue\fRs are the same as those permissible
in the \fBcreate\fR widget command when the item(s) were created;
see the sections describing individual item types below for details
on the legal options.
.TP
\fIpathName \fBlower \fItagOrId \fR?\fIbelowThis\fR?
.
Move all of the items given by \fItagOrId\fR to a new position
in the display list just before the item given by \fIbelowThis\fR.
If \fItagOrId\fR refers to more than one item then all are moved
but the relative order of the moved items will not be changed.
\fIBelowThis\fR is a tag or id; if it refers to more than one
item then the first (lowest) of these items in the display list is used
as the destination location for the moved items.
Note: this command has no effect on window items. Window items always
obscure other item types, and the stacking order of window items is
determined by the \fBraise\fR command and \fBlower\fR command, not the
\fBraise\fR widget command and \fBlower\fR widget command for canvases.
This command returns an empty string.
.TP
\fIpathName \fBmove \fItagOrId xAmount yAmount\fR
.
Move each of the items given by \fItagOrId\fR in the canvas coordinate
space by adding \fIxAmount\fR to the x-coordinate of each point
associated with the item and \fIyAmount\fR to the y-coordinate of
each point associated with the item.
This command returns an empty string.
.TP
\fIpathName \fBmoveto \fItagOrId xPos yPos\fR
.VS 8.6
Move the items given by \fItagOrId\fR in the canvas coordinate
space so that the first coordinate pair of the bottommost item with
tag \fItagOrId\fR is located at
position (\fIxPos\fR,\fIyPos\fR). \fIxPos\fR and \fIyPos\fR may be
the empty string, in which case the corresponding coordinate
will be unchanged. All items matching
\fItagOrId\fR remain in the same positions relative to each other.
This command returns an empty string.
.VE 8.6
.TP
\fIpathName \fBpostscript \fR?\fIoption value option value ...\fR?
.
Generate a Postscript representation for part or all of the canvas.
If the \fB\-file\fR option is specified then the Postscript is written
to a file and an empty string is returned; otherwise the Postscript
is returned as the result of the command.
If the interpreter that owns the canvas is marked as safe, the operation
will fail because safe interpreters are not allowed to write files.
If the \fB\-channel\fR option is specified, the argument denotes the name
of a channel already opened for writing. The Postscript is written to
that channel, and the channel is left open for further writing at the end
of the operation.
The Postscript is created in Encapsulated Postscript form using
version 3.0 of the Document Structuring Conventions.
Note: by default Postscript is only generated for information that
appears in the canvas's window on the screen. If the canvas is
freshly created it may still have its initial size of 1x1 pixel
so nothing will appear in the Postscript. To get around this problem
either invoke the \fBupdate\fR command to wait for the canvas window
to reach its final size, or else use the \fB\-width\fR and \fB\-height\fR
options to specify the area of the canvas to print.
The \fIoption\fR\-\fIvalue\fR argument pairs provide additional
information to control the generation of Postscript. The following
options are supported:
.RS
.TP
\fB\-channel \fIchannelName\fR
.
Specifies the name of the channel to which to write the Postscript.
If this option and the \fB\-file\fR option are
not specified then the Postscript is returned as the
result of the command.
.TP
\fB\-colormap \fIvarName\fR
.
\fIVarName\fR must be the name of an array variable
that specifies a color mapping to use in the Postscript.
Each element of \fIvarName\fR must consist of Postscript
code to set a particular color value (e.g.
.QW "\fB1.0 1.0 0.0 setrgbcolor\fR" ).
When outputting color information in the Postscript, Tk checks
to see if there is an element of \fIvarName\fR with the same
name as the color.
If so, Tk uses the value of the element as the Postscript command
to set the color.
If this option has not been specified, or if there is no entry
in \fIvarName\fR for a given color, then Tk uses the red, green,
and blue intensities from the X color.
.TP
\fB\-colormode \fImode\fR
.
Specifies how to output color information. \fIMode\fR must be either
\fBcolor\fR (for full color output), \fBgray\fR (convert all colors
to their gray-scale equivalents) or \fBmono\fR (convert all colors
to black or white).
.TP
\fB\-file \fIfileName\fR
.
Specifies the name of the file in which to write the Postscript.
If this option and the \fB\-channel\fR option are
not specified then the Postscript is returned as the
result of the command.
.TP
\fB\-fontmap \fIvarName\fR
.
\fIVarName\fR must be the name of an array variable
that specifies a font mapping to use in the Postscript.
Each element of \fIvarName\fR must consist of a Tcl list with
two elements, which are the name and point size of a Postscript font.
When outputting Postscript commands for a particular font, Tk
checks to see if \fIvarName\fR contains an element with the same
name as the font.
If there is such an element, then the font information contained in
that element is used in the Postscript.
Otherwise Tk attempts to guess what Postscript font to use.
Tk's guesses generally only work for well-known fonts such as
Times and Helvetica and Courier, and only if the X font name does not
omit any dashes up through the point size.
For example, \fB\-*\-Courier\-Bold\-R\-Normal\-\-*\-120\-*\fR will work but
\fB*Courier\-Bold\-R\-Normal*120*\fR will not; Tk needs the dashes to
parse the font name).
.TP
\fB\-height \fIsize\fR
.
Specifies the height of the area of the canvas to print.
Defaults to the height of the canvas window.
.TP
\fB\-pageanchor \fIanchor\fR
.
Specifies which point of the printed area of the canvas should appear over
the positioning point on the page (which is given by the \fB\-pagex\fR
and \fB\-pagey\fR options).
For example, \fB\-pageanchor n\fR means that the top center of the
area of the canvas being printed (as it appears in the canvas window)
should be over the positioning point. Defaults to \fBcenter\fR.
.TP
\fB\-pageheight \fIsize\fR
.
Specifies that the Postscript should be scaled in both x and y so
that the printed area is \fIsize\fR high on the Postscript page.
\fISize\fR consists of a floating-point number followed by
\fBc\fR for centimeters, \fBi\fR for inches, \fBm\fR for millimeters,
or \fBp\fR or nothing for printer's points (1/72 inch).
Defaults to the height of the printed area on the screen.
If both \fB\-pageheight\fR and \fB\-pagewidth\fR are specified then
the scale factor from \fB\-pagewidth\fR is used (non-uniform scaling
is not implemented).
.TP
\fB\-pagewidth \fIsize\fR
.
Specifies that the Postscript should be scaled in both x and y so
that the printed area is \fIsize\fR wide on the Postscript page.
\fISize\fR has the same form as for \fB\-pageheight\fR.
Defaults to the width of the printed area on the screen.
If both \fB\-pageheight\fR and \fB\-pagewidth\fR are specified then
the scale factor from \fB\-pagewidth\fR is used (non-uniform scaling
is not implemented).
.TP
\fB\-pagex \fIposition\fR
.
\fIPosition\fR gives the x-coordinate of the positioning point on
the Postscript page, using any of the forms allowed for \fB\-pageheight\fR.
Used in conjunction with the \fB\-pagey\fR and \fB\-pageanchor\fR options
to determine where the printed area appears on the Postscript page.
Defaults to the center of the page.
.TP
\fB\-pagey \fIposition\fR
.
\fIPosition\fR gives the y-coordinate of the positioning point on
the Postscript page, using any of the forms allowed for \fB\-pageheight\fR.
Used in conjunction with the \fB\-pagex\fR and \fB\-pageanchor\fR options
to determine where the printed area appears on the Postscript page.
Defaults to the center of the page.
.TP
\fB\-rotate \fIboolean\fR
.
\fIBoolean\fR specifies whether the printed area is to be rotated 90
degrees.
In non-rotated output the x-axis of the printed area runs along
the short dimension of the page
.PQ portrait " orientation" ;
in rotated output the x-axis runs along the long dimension of the page
.PQ landscape " orientation" .
Defaults to non-rotated.
.TP
\fB\-width \fIsize\fR
.
Specifies the width of the area of the canvas to print.
Defaults to the width of the canvas window.
.TP
\fB\-x \fIposition\fR
.
Specifies the x-coordinate of the left edge of the area of the
canvas that is to be printed, in canvas coordinates, not window
coordinates.
Defaults to the coordinate of the left edge of the window.
.TP
\fB\-y \fIposition\fR
.
Specifies the y-coordinate of the top edge of the area of the
canvas that is to be printed, in canvas coordinates, not window
coordinates.
Defaults to the coordinate of the top edge of the window.
.RE
.TP
\fIpathName \fBraise \fItagOrId \fR?\fIaboveThis\fR?
.
Move all of the items given by \fItagOrId\fR to a new position
in the display list just after the item given by \fIaboveThis\fR.
If \fItagOrId\fR refers to more than one item then all are moved
but the relative order of the moved items will not be changed.
\fIAboveThis\fR is a tag or id; if it refers to more than one
item then the last (topmost) of these items in the display list is used
as the destination location for the moved items.
This command returns an empty string.
.RS
.PP
Note: this command has no effect on window items. Window items always
obscure other item types, and the stacking order of window items is
determined by the \fBraise\fR command and \fBlower\fR command, not the
\fBraise\fR widget command and \fBlower\fR widget command for canvases.
.RE
.TP
\fIpathName \fBrchars \fItagOrId first last string\fR
.VS 8.6
This command causes the text or coordinates between \fIfirst\fR and \fIlast\fR
for each of the items indicated by \fItagOrId\fR to be replaced by
\fIstring\fR. Each item interprets \fIfirst\fR and \fIlast\fR independently
according to the rules described in \fBINDICES\fR above. Out of the standard
set of items, text items support this operation by altering their text as
directed, and line and polygon items support this operation by altering their
coordinate list (in which case \fIstring\fR should be a list of coordinates to
use as a replacement). The other items ignore this operation.
.VE 8.6
.TP
\fIpathName \fBscale \fItagOrId xOrigin yOrigin xScale yScale\fR
.
Rescale the coordinates of all of the items given by \fItagOrId\fR in canvas
coordinate space.
\fIXOrigin\fR and \fIyOrigin\fR identify the origin for the scaling
operation and \fIxScale\fR and \fIyScale\fR identify the scale
factors for x- and y-coordinates, respectively (a scale factor of
1.0 implies no change to that coordinate).
For each of the points defining each item, the x-coordinate is
adjusted to change the distance from \fIxOrigin\fR by a factor
of \fIxScale\fR.
Similarly, each y-coordinate is adjusted to change the distance
from \fIyOrigin\fR by a factor of \fIyScale\fR.
This command returns an empty string.
.RS
.PP
Note that some items have only a single pair of coordinates (e.g., text,
images and windows) and so scaling of them by this command can only move them
around.
.RE
.TP
\fIpathName \fBscan\fR \fIoption args\fR
.
This command is used to implement scanning on canvases. It has
two forms, depending on \fIoption\fR:
.RS
.TP
\fIpathName \fBscan mark \fIx y\fR
.
Records \fIx\fR and \fIy\fR and the canvas's current view; used
in conjunction with later \fBscan dragto\fR commands.
Typically this command is associated with a mouse button press in
the widget and \fIx\fR and \fIy\fR are the coordinates of the
mouse. It returns an empty string.
.TP
\fIpathName \fBscan dragto \fIx y ?gain?\fR
.
This command computes the difference between its \fIx\fR and \fIy\fR
arguments (which are typically mouse coordinates) and the \fIx\fR and
\fIy\fR arguments to the last \fBscan mark\fR command for the widget.
It then adjusts the view by \fIgain\fR times the
difference in coordinates, where \fIgain\fR defaults to 10.
This command is typically associated
with mouse motion events in the widget, to produce the effect of
dragging the canvas at high speed through its window. The return
value is an empty string.
.RE
.TP
\fIpathName \fBselect \fIoption\fR ?\fItagOrId arg\fR?
.
Manipulates the selection in one of several ways, depending on
\fIoption\fR.
The command may take any of the forms described below.
In all of the descriptions below, \fItagOrId\fR must refer to
an item that supports indexing and selection; if it refers to
multiple items then the first of
these that supports indexing and the selection is used.
\fIIndex\fR gives a textual description of a position
within \fItagOrId\fR, as described in \fBINDICES\fR above.
.RS
.TP
\fIpathName \fBselect adjust \fItagOrId index\fR
.
Locate the end of the selection in \fItagOrId\fR nearest
to the character given by \fIindex\fR, and adjust that
end of the selection to be at \fIindex\fR (i.e. including
but not going beyond \fIindex\fR).
The other end of the selection is made the anchor point
for future \fBselect to\fR commands.
If the selection is not currently in \fItagOrId\fR then
this command behaves the same as the \fBselect to\fR widget
command.
Returns an empty string.
.TP
\fIpathName \fBselect clear\fR
.
Clear the selection if it is in this widget.
If the selection is not in this widget then the command
has no effect.
Returns an empty string.
.TP
\fIpathName \fBselect from \fItagOrId index\fR
.
Set the selection anchor point for the widget to be just
before the character
given by \fIindex\fR in the item given by \fItagOrId\fR.
This command does not change the selection; it just sets
the fixed end of the selection for future \fBselect to\fR
commands.
Returns an empty string.
.TP
\fIpathName \fBselect item\fR
.
Returns the id of the selected item, if the selection is in an
item in this canvas.
If the selection is not in this canvas then an empty string
is returned.
.TP
\fIpathName \fBselect to \fItagOrId index\fR
.
Set the selection to consist of those characters of \fItagOrId\fR
between the selection anchor point and
\fIindex\fR.
The new selection will include the character given by \fIindex\fR;
it will include the character given by the anchor point only if
\fIindex\fR is greater than or equal to the anchor point.
The anchor point is determined by the most recent \fBselect adjust\fR
or \fBselect from\fR command for this widget.
If the selection anchor point for the widget is not currently in
\fItagOrId\fR, then it is set to the same character given
by \fIindex\fR.
Returns an empty string.
.RE
.TP
\fIpathName \fBtype\fI tagOrId\fR
.
Returns the type of the item given by \fItagOrId\fR, such as
\fBrectangle\fR or \fBtext\fR.
If \fItagOrId\fR refers to more than one item, then the type
of the first item in the display list is returned.
If \fItagOrId\fR does not refer to any items at all then
an empty string is returned.
.TP
\fIpathName \fBxview \fR?\fIargs\fR?
.
This command is used to query and change the horizontal position of the
information displayed in the canvas's window.
It can take any of the following forms:
.RS
.TP
\fIpathName \fBxview\fR
.
Returns a list containing two elements.
Each element is a real fraction between 0 and 1; together they describe
the horizontal span that is visible in the window.
For example, if the first element is .2 and the second element is .6,
20% of the canvas's area (as defined by the \fB\-scrollregion\fR option)
is off-screen to the left, the middle 40% is visible
in the window, and 40% of the canvas is off-screen to the right.
These are the same values passed to scrollbars via the \fB\-xscrollcommand\fR
option.
.TP
\fIpathName \fBxview moveto\fI fraction\fR
.
Adjusts the view in the window so that \fIfraction\fR of the
total width of the canvas is off-screen to the left.
\fIFraction\fR must be a fraction between 0 and 1.
.TP
\fIpathName \fBxview scroll \fInumber what\fR
.
This command shifts the view in the window left or right according to
\fInumber\fR and \fIwhat\fR.
\fINumber\fR must be an integer.
\fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an abbreviation
of one of these.
If \fIwhat\fR is \fBunits\fR, the view adjusts left or right in units
of the \fBxScrollIncrement\fR option, if it is greater than zero,
or in units of one-tenth the window's width otherwise.
If \fIwhat is \fBpages\fR then the view
adjusts in units of nine-tenths the window's width.
If \fInumber\fR is negative then information farther to the left
becomes visible; if it is positive then information farther to the right
becomes visible.
.RE
.TP
\fIpathName \fByview \fI?args\fR?
.
This command is used to query and change the vertical position of the
information displayed in the canvas's window.
It can take any of the following forms:
.RS
.TP
\fIpathName \fByview\fR
.
Returns a list containing two elements.
Each element is a real fraction between 0 and 1; together they describe
the vertical span that is visible in the window.
For example, if the first element is .6 and the second element is 1.0,
the lowest 40% of the canvas's area (as defined by the \fB\-scrollregion\fR
option) is visible in the window.
These are the same values passed to scrollbars via the \fB\-yscrollcommand\fR
option.
.TP
\fIpathName \fByview moveto\fI fraction\fR
.
Adjusts the view in the window so that \fIfraction\fR of the canvas's
area is off-screen to the top.
\fIFraction\fR is a fraction between 0 and 1.
.TP
\fIpathName \fByview scroll \fInumber what\fR
.
This command adjusts the view in the window up or down according to
\fInumber\fR and \fIwhat\fR.
\fINumber\fR must be an integer.
\fIWhat\fR must be either \fBunits\fR or \fBpages\fR.
If \fIwhat\fR is \fBunits\fR, the view adjusts up or down in units
of the \fByScrollIncrement\fR option, if it is greater than zero,
or in units of one-tenth the window's height otherwise.
If \fIwhat\fR is \fBpages\fR then
the view adjusts in units of nine-tenths the window's height.
If \fInumber\fR is negative then higher information becomes
visible; if it is positive then lower information
becomes visible.
.RE
.SH "OVERVIEW OF ITEM TYPES"
.PP
The sections below describe the various types of items supported
by canvas widgets. Each item type is characterized by two things:
first, the form of the \fBcreate\fR command used to create
instances of the type; and second, a set of configuration options
for items of that type, which may be used in the
\fBcreate\fR and \fBitemconfigure\fR widget commands.
Most items do not support indexing or selection or the commands
related to them, such as \fBindex\fR and \fBinsert\fR.
Where items do support these facilities, it is noted explicitly
in the descriptions below.
At present, text, line and polygon items provide this support.
For lines and polygons the indexing facility is used to manipulate
the coordinates of the item.
.SS "COMMON ITEM OPTIONS"
.PP
Many items share a common set of options. These options are
explained here, and then referred to be each widget type for brevity.
.TP
\fB\-anchor \fIanchorPos\fR
.
\fIAnchorPos\fR tells how to position the item relative to the
positioning point for the item; it may have any of the forms
accepted by \fBTk_GetAnchor\fR. For example, if \fIanchorPos\fR
is \fBcenter\fR then the item is centered on the point; if
\fIanchorPos\fR is \fBn\fR then the item will be drawn so that
its top center point is at the positioning point.
This option defaults to \fBcenter\fR.
.TP
\fB\-dash \fIpattern\fR
.TP
\fB\-activedash \fIpattern\fR
.TP
\fB\-disableddash \fIpattern\fR
.
This option specifies dash patterns for the normal, active
state, and disabled state of an item.
\fIpattern\fR may have any of the forms accepted by \fBTk_GetDash\fR.
If the dash options are omitted then the default is a solid outline.
See \fBDASH PATTERNS\fR for more information.
.TP
\fB\-dashoffset \fIoffset\fR
.
The starting \fIoffset\fR in pixels into the pattern provided by the
\fB\-dash\fR option. \fB\-dashoffset\fR is ignored if there is no
\fB\-dash\fR pattern. The \fIoffset\fR may have any of the forms described
in the \fBCOORDINATES\fR section above.
.TP
\fB\-fill \fIcolor\fR
.TP
\fB\-activefill \fIcolor\fR
.TP
\fB\-disabledfill \fIcolor\fR
.
Specifies the color to be used to fill item's area.
in its normal, active, and disabled states,
\fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR.
If \fIcolor\fR is an empty string (the default),
then the item will not be filled.
For the line item, it specifies the color of the line drawn.
For the text item, it specifies the foreground color of the text.
.TP
\fB\-outline \fIcolor\fR
.TP
\fB\-activeoutline \fIcolor\fR
.TP
\fB\-disabledoutline \fIcolor\fR
.
This option specifies the color that should be used to draw the
outline of the item in its normal, active and disabled states.
\fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR.
This option defaults to \fBblack\fR. If \fIcolor\fR is specified
as an empty string then no outline is drawn for the item.
.TP
\fB\-offset \fIoffset\fR
.
Specifies the offset of stipples. The offset value can be of the form
\fBx,y\fR or \fIside\fR, where side can be \fBn\fR, \fBne\fR, \fBe\fR,
\fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR. In the
first case the origin is the origin of the toplevel of the current window.
For the canvas itself and canvas objects the origin is the canvas origin,
but putting \fB#\fR in front of the coordinate pair indicates using the
toplevel origin instead. For canvas objects, the \fB\-offset\fR option is
used for stippling as well. For the line and polygon canvas items you can
also specify an index as argument, which connects the stipple origin to one
of the coordinate points of the line/polygon. Note that stipple offsets are
\fIonly supported on X11\fR; they are silently ignored on other platforms.
.TP
\fB\-outlinestipple \fIbitmap\fR
.TP
\fB\-activeoutlinestipple \fIbitmap\fR
.TP
\fB\-disabledoutlinestipple \fIbitmap\fR
.
This option specifies stipple patterns that should be used to draw the
outline of the item in its normal, active and disabled states.
Indicates that the outline for the item should be drawn with a stipple pattern;
\fIbitmap\fR specifies the stipple pattern to use, in any of the
forms accepted by \fBTk_GetBitmap\fR.
If the \fB\-outline\fR option has not been specified then this option
has no effect.
If \fIbitmap\fR is an empty string (the default), then the outline is drawn
in a solid fashion.
\fINote that stipples are not well supported on platforms that do not
use X11 as their drawing API.\fR
.TP
\fB\-outlineoffset \fIoffset\fR
.
Specifies the offset of the stipple pattern used for outlines, in the same way
that the \fB\-outline\fR option controls fill stipples. (See the
\fB\-outline\fR option for a description of the syntax of \fIoffset\fR.)
.TP
\fB\-stipple \fIbitmap\fR
.TP
\fB\-activestipple \fIbitmap\fR
.TP
\fB\-disabledstipple \fIbitmap\fR
.
This option specifies stipple patterns that should be used to fill
the item in its normal, active and disabled states.
\fIbitmap\fR specifies the stipple pattern to use, in any of the
forms accepted by \fBTk_GetBitmap\fR.
If the \fB\-fill\fR option has not been specified then this option
has no effect.
If \fIbitmap\fR is an empty string (the default), then filling is done
in a solid fashion.
For the text item, it affects the actual text.
\fINote that stipples are not well supported on platforms that do not
use X11 as their drawing API.\fR
.TP
\fB\-state \fIstate\fR
.
This allows an item to override the canvas widget's global \fIstate\fR
option. It takes the same values:
\fInormal\fR, \fIdisabled\fR or \fIhidden\fR.
.TP
\fB\-tags \fItagList\fR
.
Specifies a set of tags to apply to the item.
\fITagList\fR consists of a list of tag names, which replace any
existing tags for the item. \fITagList\fR may be an empty list.
.TP
\fB\-width \fIoutlineWidth\fR
.TP
\fB\-activewidth \fIoutlineWidth\fR
.TP
\fB\-disabledwidth \fIoutlineWidth\fR
.
Specifies the width of the outline to be drawn around
the item's region, in its normal, active and disabled states.
\fIoutlineWidth\fR may be in any of the forms described in the
\fBCOORDINATES\fR section above.
If the \fB\-outline\fR option has been specified as an empty string then
this option has no effect. This option defaults to 1.0.
For arcs, wide outlines will be drawn centered on the edges of the
arc's region.
.SH "STANDARD ITEM TYPES"
.SS "ARC ITEMS"
.PP
Items of type \fBarc\fR appear on the display as arc-shaped regions.
An arc is a section of an oval delimited by two angles (specified
by the \fB\-start\fR and \fB\-extent\fR options) and displayed in
one of several ways (specified by the \fB\-style\fR option).
Arcs are created with widget commands of the following form:
.CS
\fIpathName \fBcreate arc \fIx1 y1 x2 y2 \fR?\fIoption value ...\fR?
\fIpathName \fBcreate arc \fIcoordList\fR ?\fIoption value ...\fR?
.CE
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR or \fIcoordList\fR give
the coordinates of two diagonally opposite corners of a
rectangular region enclosing the oval that defines the arc.
After the coordinates there may be any number of \fIoption\fR\-\fIvalue\fR
pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration. An arc item becomes the current item when the mouse pointer is
over any part that is painted or (when fully transparent) that would be
painted if both the \fB\-fill\fR and \fB\-outline\fR options were non-empty.
.PP
The following standard options are supported by arcs:
.DS
.ta 3i
\fB\-dash\fR	\fB\-activedash\fR
\fB\-disableddash\fR	\fB\-dashoffset\fR
\fB\-fill\fR	\fB\-activefill\fR
\fB\-disabledfill\fR	\fB\-offset\fR
\fB\-outline\fR	\fB\-activeoutline\fR
\fB\-disabledoutline\fR	\fB\-outlineoffset\fR
\fB\-outlinestipple\fR	\fB\-activeoutlinestipple\fR
\fB\-disabledoutlinestipple\fR	\fB\-stipple\fR
\fB\-activestipple\fR	\fB\-disabledstipple\fR
\fB\-state\fR	\fB\-tags\fR
\fB\-width\fR	\fB\-activewidth\fR
\fB\-disabledwidth\fR
.DE
The following extra options are supported for arcs:
.TP
\fB\-extent \fIdegrees\fR
Specifies the size of the angular range occupied by the arc.
The arc's range extends for \fIdegrees\fR degrees counter-clockwise
from the starting angle given by the \fB\-start\fR option.
\fIDegrees\fR may be negative.
If it is greater than 360 or less than \-360, then \fIdegrees\fR
modulo 360 is used as the extent.
.TP
\fB\-start \fIdegrees\fR
Specifies the beginning of the angular range occupied by the
arc.
\fIDegrees\fR is given in units of degrees measured counter-clockwise
from the 3-o'clock position; it may be either positive or negative.
.TP
\fB\-style \fItype\fR
Specifies how to draw the arc. If \fItype\fR is \fBpieslice\fR
(the default) then the arc's region is defined by a section
of the oval's perimeter plus two line segments, one between the center
of the oval and each end of the perimeter section.
If \fItype\fR is \fBchord\fR then the arc's region is defined
by a section of the oval's perimeter plus a single line segment
connecting the two end points of the perimeter section.
If \fItype\fR is \fBarc\fR then the arc's region consists of
a section of the perimeter alone.
In this last case the \fB\-fill\fR option is ignored.
.SS "BITMAP ITEMS"
.PP
Items of type \fBbitmap\fR appear on the display as images with
two colors, foreground and background.
Bitmaps are created with widget commands of the following form:
.CS
\fIpathName \fBcreate bitmap \fIx y \fR?\fIoption value ...\fR?
\fIpathName \fBcreate bitmap \fIcoordList\fR ?\fIoption value ...\fR?
.CE
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR (which must have two
elements) specify the coordinates of a
point used to position the bitmap on the display, as controlled by the
\fB\-anchor\fR option.
After the coordinates there may be any number of \fIoption\fR\-\fIvalue\fR
pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration. A bitmap item becomes the current item when the mouse pointer
is over any part of its bounding box.
.PP
The following standard options are supported by bitmaps:
.DS
.ta 3i
\fB\-anchor\fR	\fB\-state\fR
\fB\-tags\fR
.DE
The following extra options are supported for bitmaps:
.TP
\fB\-background \fIcolor\fR
.TP
\fB\-activebackground \fIbitmap\fR
.TP
\fB\-disabledbackground \fIbitmap\fR
Specifies the color to use for each of the bitmap's
.QW 0
valued pixels in its normal, active and disabled states.
\fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR.
If this option is not specified, or if it is specified as an empty
string, then nothing is displayed where the bitmap pixels are 0; this
produces a transparent effect.
.TP
\fB\-bitmap \fIbitmap\fR
.TP
\fB\-activebitmap \fIbitmap\fR
.TP
\fB\-disabledbitmap \fIbitmap\fR
Specifies the bitmaps to display in the item in its normal, active and
disabled states.
\fIBitmap\fR may have any of the forms accepted by \fBTk_GetBitmap\fR.
.TP
\fB\-foreground \fIcolor\fR
.TP
\fB\-activeforeground \fIbitmap\fR
.TP
\fB\-disabledforeground \fIbitmap\fR
Specifies the color to use for each of the bitmap's
.QW 1
valued pixels in its normal, active and disabled states.
\fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR and
defaults to \fBblack\fR.
.SS "IMAGE ITEMS"
.PP
Items of type \fBimage\fR are used to display images on a
canvas.
Images are created with widget commands of the following form:
.CS
\fIpathName \fBcreate image \fIx y \fR?\fIoption value ...\fR?
\fIpathName \fBcreate image \fIcoordList\fR ?\fIoption value ...\fR?
.CE
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR specify the coordinates of a
point used to position the image on the display, as controlled by the
\fB\-anchor\fR option.
After the coordinates there may be any number of \fIoption\fR\-\fIvalue\fR
pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration. An image item becomes the current item when the mouse pointer
is over any part of its bounding box.
.PP
The following standard options are supported by images:
.DS
.ta 3i
\fB\-anchor\fR	\fB\-state\fR
\fB\-tags\fR
.DE
The following extra options are supported for images:
.TP
\fB\-image \fIname\fR
.TP
\fB\-activeimage \fIname\fR
.TP
\fB\-disabledimage \fIname\fR
Specifies the name of the images to display in the item in is normal,
active and disabled states.
This image must have been created previously with the
\fBimage create\fR command.
.SS "LINE ITEMS"
.PP
Items of type \fBline\fR appear on the display as one or more connected
line segments or curves.
Line items support coordinate indexing operations using the \fBdchars\fR,
\fBindex\fR and \fBinsert\fR widget commands.
Lines are created with widget commands of the following form:
.CS
\fIpathName \fBcreate line \fIx1 y1... xn yn \fR?\fIoption value ...\fR?
\fIpathName \fBcreate line \fIcoordList\fR ?\fIoption value ...\fR?
.CE
The arguments \fIx1\fR through \fIyn\fR or \fIcoordList\fR give
the coordinates for a series of two or more points that describe
a series of connected line segments.
After the coordinates there may be any number of \fIoption\fR\-\fIvalue\fR
pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration. A line item is the current item whenever the mouse pointer is
over any segment of the line, whether drawn or not and whether or not the line
is smoothed.
.PP
The following standard options are supported by lines:
.DS
.ta 3i
\fB\-dash\fR	\fB\-activedash\fR
\fB\-disableddash\fR	\fB\-dashoffset\fR
\fB\-fill\fR	\fB\-activefill\fR
\fB\-disabledfill\fR	\fB\-stipple\fR
\fB\-activestipple\fR	\fB\-disabledstipple\fR
\fB\-state\fR	\fB\-tags\fR
\fB\-width\fR	\fB\-activewidth\fR
\fB\-disabledwidth\fR
.DE
The following extra options are supported for lines:
.TP
\fB\-arrow \fIwhere\fR
Indicates whether or not arrowheads are to be drawn at one or both
ends of the line.
\fIWhere\fR must have one of the values \fBnone\fR (for no arrowheads),
\fBfirst\fR (for an arrowhead at the first point of the line),
\fBlast\fR (for an arrowhead at the last point of the line), or
\fBboth\fR (for arrowheads at both ends).
This option defaults to \fBnone\fR.
.TP
\fB\-arrowshape \fIshape\fR
This option indicates how to draw arrowheads.
The \fIshape\fR argument must be a list with three elements, each
specifying a distance in any of the forms described in
the \fBCOORDINATES\fR section above.
The first element of the list gives the distance along the line
from the neck of the arrowhead to its tip.
The second element gives the distance along the line from the
trailing points of the arrowhead to the tip, and the third
element gives the distance from the outside edge of the line to the
trailing points.
If this option is not specified then Tk picks a
.QW reasonable
shape.
.TP
\fB\-capstyle \fIstyle\fR
Specifies the ways in which caps are to be drawn at the endpoints
of the line.
\fIStyle\fR may have any of the forms accepted by \fBTk_GetCapStyle\fR
(\fBbutt\fR, \fBprojecting\fR, or \fBround\fR).
If this option is not specified then it defaults to \fBbutt\fR.
Where arrowheads are drawn the cap style is ignored.
.TP
\fB\-joinstyle \fIstyle\fR
Specifies the ways in which joints are to be drawn at the vertices
of the line.
\fIStyle\fR may have any of the forms accepted by \fBTk_GetJoinStyle\fR
(\fBbevel\fR, \fBmiter\fR, or \fBround\fR).
If this option is not specified then it defaults to \fBround\fR.
If the line only contains two points then this option is
irrelevant.
.TP
\fB\-smooth \fIsmoothMethod\fR
\fIsmoothMethod\fR must have one of the forms accepted by
\fBTcl_GetBoolean\fR or a line smoothing method.
Only \fBtrue\fR and \fBraw\fR are
supported in the core (with \fBbezier\fR being an alias for \fBtrue\fR), but more can be added at runtime. If a boolean
false value or empty string is given, no smoothing is applied. A boolean
truth value assumes \fBtrue\fR smoothing.
If the smoothing method is \fBtrue\fR, this indicates that the line
should be drawn as a curve, rendered as a set of quadratic splines: one spline
is drawn for the first and second line segments, one for the second
and third, and so on. Straight-line segments can be generated within
a curve by duplicating the end-points of the desired line segment.
If the smoothing method is \fBraw\fR, this indicates that the line
should also be drawn as a curve but where the list of coordinates is
such that the first coordinate pair (and every third coordinate pair
thereafter) is a knot point on a cubic Bezier curve, and the other
coordinates are control points on the cubic Bezier curve. Straight
line segments can be generated within a curve by making control points
equal to their neighbouring knot points. If the last point is a
control point and not a knot point, the point is repeated (one or two
times) so that it also becomes a knot point.
.TP
\fB\-splinesteps \fInumber\fR
Specifies the degree of smoothness desired for curves: each spline
will be approximated with \fInumber\fR line segments. This
option is ignored unless the \fB\-smooth\fR option is true or \fBraw\fR.
.SS "OVAL ITEMS"
.PP
Items of type \fBoval\fR appear as circular or oval regions on
the display. Each oval may have an outline, a fill, or
both. Ovals are created with widget commands of the
following form:
.CS
\fIpathName \fBcreate oval \fIx1 y1 x2 y2 \fR?\fIoption value ...\fR?
\fIpathName \fBcreate oval \fIcoordList\fR ?\fIoption value ...\fR?
.CE
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR or \fIcoordList\fR give
the coordinates of two diagonally opposite corners of a
rectangular region enclosing the oval.
The oval will include the top and left edges of the rectangle
not the lower or right edges.
If the region is square then the resulting oval is circular;
otherwise it is elongated in shape.
After the coordinates there may be any number of \fIoption\fR\-\fIvalue\fR
pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration. An oval item becomes the current item when the mouse pointer is
over any part that is painted or (when fully transparent) that would be
painted if both the \fB\-fill\fR and \fB\-outline\fR options were non-empty.
.PP
The following standard options are supported by ovals:
.DS
.ta 3i
\fB\-dash\fR	\fB\-activedash\fR
\fB\-disableddash\fR	\fB\-dashoffset\fR
\fB\-fill\fR	\fB\-activefill\fR
\fB\-disabledfill\fR	\fB\-offset\fR
\fB\-outline\fR	\fB\-activeoutline\fR
\fB\-disabledoutline\fR	\fB\-outlineoffset\fR
\fB\-outlinestipple\fR	\fB\-activeoutlinestipple\fR
\fB\-disabledoutlinestipple\fR	\fB\-stipple\fR
\fB\-activestipple\fR	\fB\-disabledstipple\fR
\fB\-state\fR	\fB\-tags\fR
\fB\-width\fR	\fB\-activewidth\fR
\fB\-disabledwidth\fR
.DE
There are no oval-specific options.
.SS "POLYGON ITEMS"
.PP
Items of type \fBpolygon\fR appear as polygonal or curved filled regions
on the display.
Polygon items support coordinate indexing operations using the \fBdchars\fR,
\fBindex\fR and \fBinsert\fR widget commands.
Polygons are created with widget commands of the following form:
.CS
\fIpathName \fBcreate polygon \fIx1 y1 ... xn yn \fR?\fIoption value ...\fR?
\fIpathName \fBcreate polygon \fIcoordList\fR ?\fIoption value ...\fR?
.CE
The arguments \fIx1\fR through \fIyn\fR or \fIcoordList\fR specify the coordinates for
three or more points that define a polygon.
The first point should not be repeated as the last to
close the shape; Tk will automatically close the periphery between
the first and last points.
After the coordinates there may be any number of \fIoption\fR\-\fIvalue\fR
pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration. A polygon item is the current item whenever the mouse pointer
is over any part of the polygon, whether drawn or not and whether or not the
outline is smoothed.
.PP
The following standard options are supported by polygons:
.DS
.ta 3i
\fB\-dash\fR	\fB\-activedash\fR
\fB\-disableddash\fR	\fB\-dashoffset\fR
\fB\-fill\fR	\fB\-activefill\fR
\fB\-disabledfill\fR	\fB\-offset\fR
\fB\-outline\fR	\fB\-activeoutline\fR
\fB\-disabledoutline\fR	\fB\-outlineoffset\fR
\fB\-outlinestipple\fR	\fB\-activeoutlinestipple\fR
\fB\-disabledoutlinestipple\fR	\fB\-stipple\fR
\fB\-activestipple\fR	\fB\-disabledstipple\fR
\fB\-state\fR	\fB\-tags\fR
\fB\-width\fR	\fB\-activewidth\fR
\fB\-disabledwidth\fR
.DE
The following extra options are supported for polygons:
.TP
\fB\-joinstyle \fIstyle\fR
Specifies the ways in which joints are to be drawn at the vertices
of the outline.
\fIStyle\fR may have any of the forms accepted by \fBTk_GetJoinStyle\fR
(\fBbevel\fR, \fBmiter\fR, or \fBround\fR).
If this option is not specified then it defaults to \fBround\fR.
.TP
\fB\-smooth \fIboolean\fR
\fIBoolean\fR must have one of the forms accepted by \fBTcl_GetBoolean\fR
or a line smoothing method. Only \fBtrue\fR and \fBraw\fR are
supported in the core (with \fBbezier\fR being an alias for \fBtrue\fR), but more can be added at runtime. If a boolean
false value or empty string is given, no smoothing is applied. A boolean
truth value assumes \fBtrue\fR smoothing.
If the smoothing method is \fBtrue\fR, this indicates that the polygon
should be drawn as a curve, rendered as a set of quadratic splines: one spline
is drawn for the first and second line segments, one for the second
and third, and so on. Straight-line segments can be generated within
a curve by duplicating the end-points of the desired line segment.
If the smoothing method is \fBraw\fR, this indicates that the polygon
should also be drawn as a curve but where the list of coordinates is
such that the first coordinate pair (and every third coordinate pair
thereafter) is a knot point on a cubic Bezier curve, and the other
coordinates are control points on the cubic Bezier curve. Straight
line segments can be venerated within a curve by making control points
equal to their neighbouring knot points. If the last point is not the
second point of a pair of control points, the point is repeated (one or two
times) so that it also becomes the second point of a pair of control
points (the associated knot point will be the first control point).
.TP
\fB\-splinesteps \fInumber\fR
Specifies the degree of smoothness desired for curves: each spline
will be approximated with \fInumber\fR line segments. This
option is ignored unless the \fB\-smooth\fR option is true or \fBraw\fR.
.PP
Polygon items are different from other items such as rectangles, ovals
and arcs in that interior points are considered to be
.QW inside
a polygon (e.g. for purposes of the \fBfind closest\fR and
\fBfind overlapping\fR widget commands) even if it is not filled.
For most other item types, an
interior point is considered to be inside the item only if the item
is filled or if it has neither a fill nor an outline. If you would
like an unfilled polygon whose interior points are not considered
to be inside the polygon, use a line item instead.
.SS "RECTANGLE ITEMS"
.PP
Items of type \fBrectangle\fR appear as rectangular regions on
the display. Each rectangle may have an outline, a fill, or
both. Rectangles are created with widget commands of the
following form:
.CS
\fIpathName \fBcreate rectangle \fIx1 y1 x2 y2 \fR?\fIoption value ...\fR?
\fIpathName \fBcreate rectangle \fIcoordList\fR ?\fIoption value ...\fR?
.CE
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR or \fIcoordList\fR
(which must have four elements) give
the coordinates of two diagonally opposite corners of the rectangle
(the rectangle will include its upper and left edges but not
its lower or right edges).
After the coordinates there may be any number of \fIoption\fR\-\fIvalue\fR
pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration. A rectangle item becomes the current item when the mouse
pointer is over any part that is painted or (when fully transparent) that
would be painted if both the \fB\-fill\fR and \fB\-outline\fR options were
non-empty.
.PP
The following standard options are supported by rectangles:
.DS
.ta 3i
\fB\-dash\fR	\fB\-activedash\fR
\fB\-disableddash\fR	\fB\-dashoffset\fR
\fB\-fill\fR	\fB\-activefill\fR
\fB\-disabledfill\fR	\fB\-offset\fR
\fB\-outline\fR	\fB\-activeoutline\fR
\fB\-disabledoutline\fR	\fB\-outlineoffset\fR
\fB\-outlinestipple\fR	\fB\-activeoutlinestipple\fR
\fB\-disabledoutlinestipple\fR	\fB\-stipple\fR
\fB\-activestipple\fR	\fB\-disabledstipple\fR
\fB\-state\fR	\fB\-tags\fR
\fB\-width\fR	\fB\-activewidth\fR
\fB\-disabledwidth\fR
.DE
There are no rectangle-specific options.
.SS "TEXT ITEMS"
.PP
A text item displays a string of characters on the screen in one
or more lines.
Text items support indexing, editing and selection through the \fBdchars\fR
widget command, the \fBfocus\fR widget command, the \fBicursor\fR widget
command, the \fBindex\fR widget command, the \fBinsert\fR widget command, and
the \fBselect\fR widget command.
Text items are created with widget commands of the following
form:
.CS
\fIpathName \fBcreate text \fIx y \fR?\fIoption value ...\fR?
\fIpathName \fBcreate text \fIcoordList\fR ?\fIoption value ...\fR?
.CE
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR (which must have two
elements) specify the coordinates of a
point used to position the text on the display (see the options
below for more information on how text is displayed).
After the coordinates there may be any number of \fIoption\fR\-\fIvalue\fR
pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration. A text item becomes the current item when the mouse pointer
is over any part of its bounding box.
.PP
The following standard options are supported by text items:
.DS
.ta 3i
\fB\-anchor\fR	\fB\-fill\fR
\fB\-activefill\fR	\fB\-disabledfill\fR
\fB\-stipple\fR	\fB\-activestipple\fR
\fB\-disabledstipple\fR	\fB\-state\fR
\fB\-tags\fR
.DE
The following extra options are supported for text items:
.TP
\fB\-angle \fIrotationDegrees\fR
.VS 8.6
\fIRotationDegrees\fR tells how many degrees to rotate the text anticlockwise
about the positioning point for the text; it may have any floating-point value
from 0.0 to 360.0. For example, if \fIrotationDegrees\fR is \fB90\fR, then the
text will be drawn vertically from bottom to top.
This option defaults to \fB0.0\fR.
.VE 8.6
.TP
\fB\-font \fIfontName\fR
Specifies the font to use for the text item.
\fIFontName\fR may be any string acceptable to \fBTk_GetFont\fR.
If this option is not specified, it defaults to a system-dependent
font.
.TP
\fB\-justify \fIhow\fR
Specifies how to justify the text within its bounding region.
\fIHow\fR must be one of the values \fBleft\fR, \fBright\fR,
or \fBcenter\fR.
This option will only matter if the text is displayed as multiple
lines.
If the option is omitted, it defaults to \fBleft\fR.
.TP
\fB\-text \fIstring\fR
\fIString\fR specifies the characters to be displayed in the text item.
Newline characters cause line breaks.
The characters in the item may also be changed with the
\fBinsert\fR and \fBdelete\fR widget commands.
This option defaults to an empty string.
.TP
\fB\-underline \fI\fR
Specifies the integer index of a character within the text to be
underlined. 0 corresponds to the first character of the text
displayed, 1 to the next character, and so on. \-1 means that no
underline should be drawn (if the whole text item is to be underlined,
the appropriate font should be used instead).
.TP
\fB\-width \fIlineLength\fR
Specifies a maximum line length for the text, in any of the forms
described in the \fBCOORDINATES\fR section above.
If this option is zero (the default) the text is broken into
lines only at newline characters.
However, if this option is non-zero then any line that would
be longer than \fIlineLength\fR is broken just before a space
character to make the line shorter than \fIlineLength\fR; the
space character is treated as if it were a newline
character.
.SS "WINDOW ITEMS"
.PP
Items of type \fBwindow\fR cause a particular window to be displayed
at a given position on the canvas.
Window items are created with widget commands of the following form:
.CS
\fIpathName \fBcreate window \fIx y \fR?\fIoption value ...\fR?
\fIpathName \fBcreate window \fIcoordList\fR ?\fIoption value ...\fR?
.CE
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR (which must have two
elements) specify the coordinates of a
point used to position the window on the display, as controlled by the
\fB\-anchor\fR option.
After the coordinates there may be any number of \fIoption\fR\-\fIvalue\fR
pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
used in \fBitemconfigure\fR widget commands to change the item's
configuration. Theoretically, a window item becomes the current item when the
mouse pointer is over any part of its bounding box, but in practice this
typically does not happen because the mouse pointer ceases to be over the
canvas at that point.
.PP
The following standard options are supported by window items:
.DS
.ta 3i
\fB\-anchor\fR	\fB\-state\fR
\fB\-tags\fR
.DE
The following extra options are supported for window items:
.TP
\fB\-height \fIpixels\fR
.
Specifies the height to assign to the item's window.
\fIPixels\fR may have any of the
forms described in the \fBCOORDINATES\fR section above.
If this option is not specified, or if it is specified as zero,
then the window is given whatever height it requests internally.
.TP
\fB\-width \fIpixels\fR
.
Specifies the width to assign to the item's window.
\fIPixels\fR may have any of the
forms described in the \fBCOORDINATES\fR section above.
If this option is not specified, or if it is specified as zero,
then the window is given whatever width it requests internally.
.TP
\fB\-window \fIpathName\fR
.
Specifies the window to associate with this item.
The window specified by \fIpathName\fR must either be a child of
the canvas widget or a child of some ancestor of the canvas widget.
\fIPathName\fR may not refer to a top-level window.
.PP
Note: due to restrictions in the ways that windows are managed, it is not
possible to draw other graphical items (such as lines and images) on top
of window items. A window item always obscures any graphics that
overlap it, regardless of their order in the display list. Also note that
window items, unlike other canvas items, are not clipped for display by their
containing canvas's border, and are instead clipped by the parent widget of
the window specified by the \fB\-window\fR option; when the parent widget is
the canvas, this means that the window item can overlap the canvas's border.
.SH "APPLICATION-DEFINED ITEM TYPES"
.PP
It is possible for individual applications to define new item
types for canvas widgets using C code.
See the documentation for \fBTk_CreateItemType\fR.
.SH BINDINGS
.PP
In the current implementation, new canvases are not given any
default behavior: you will have to execute explicit Tcl commands
to give the canvas its behavior.
.SH CREDITS
.PP
Tk's canvas widget is a blatant ripoff of ideas from Joel Bartlett's
\fIezd\fR program. \fIEzd\fR provides structured graphics in a Scheme
environment and preceded canvases by a year or two. Its simple
mechanisms for placing and animating graphical objects inspired the
functions of canvases.
.SH "SEE ALSO"
bind(n), font(n), image(n), scrollbar(n)
.SH KEYWORDS
canvas, widget
'\" Local Variables:
'\" mode: nroff
'\" fill-column: 78
'\" End:
@


1.45
log
@Corrected description of acceptable join styles. Spotted by Emiliano Gavilan.
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.44 2009/07/14 08:38:13 dkf Exp $
d126 1
a126 1
the \fBraise\fR and \fBlower\fR Tk commands instead.
d314 1
a314 1
.QW "\fB.,\-_ \fR" .
d320 3
a322 3
\-dash \-     \(-> \-dash {6 4}
\-dash \-.    \(-> \-dash {6 4 2 4}
\-dash \-..   \(-> \-dash {6 4 2 4 2 4}
d333 1
a333 1
.QW \-
d558 2
a559 2
The exact format of the arguments after \fBtype\fR depends
on \fBtype\fR, but usually they consist of the coordinates for
d649 2
a650 2
that item currently has the keyboard focus (see the widget
command \fBfocus\fR, below), but the cursor position may
d734 2
a735 2
determined by the \fBraise\fR and \fBlower\fR commands, not the
\fBraise\fR and \fBlower\fR widget commands for canvases.
d932 3
d937 3
a939 3
determined by the \fBraise\fR and \fBlower\fR commands, not the
\fBraise\fR and \fBlower\fR widget commands for canvases.
This command returns an empty string.
d1480 2
a1481 2
Line items support coordinate indexing operations using the canvas
widget commands: \fBdchars, index, insert.\fR
d1625 2
a1626 2
Polygon items support coordinate indexing operations using the canvas
widget commands: \fBdchars, index, insert.\fR
d1752 4
a1755 4
Text items support indexing and selection, along with the
following text-related canvas widget commands: \fBdchars\fR,
\fBfocus\fR, \fBicursor\fR, \fBindex\fR, \fBinsert\fR,
\fBselect\fR.
@


1.44
log
@Corrected definition of -height and -width for canvas' window items. [2326602]
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.43 2009/05/05 09:18:08 dkf Exp $
d1544 1
a1544 1
\fIStyle\fR may have any of the forms accepted by \fBTk_GetCapStyle\fR
d1663 1
a1663 1
\fIStyle\fR may have any of the forms accepted by \fBTk_GetCapStyle\fR
@


1.43
log
@Fix [Bug 1832015].
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.42 2009/01/03 14:41:51 dkf Exp $
d1863 2
a1864 2
If this option is not specified, or if it is specified as an empty
string, then the window is given whatever height it requests internally.
d1871 2
a1872 2
If this option is not specified, or if it is specified as an empty
string, then the window is given whatever width it requests internally.
@


1.42
log
@Improve documentation of -offset and -outlineoffset item options. [Bug 1836621]
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.41 2008/12/21 20:31:35 dkf Exp $
d952 2
a953 2
Rescale all of the items given by \fItagOrId\fR in canvas coordinate
space.
d964 6
d1912 1
@


1.41
log
@Regularized doc of postscript subcommand's -channel option.
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.40 2008/11/22 20:16:43 dkf Exp $
d41 1
a41 1
its geometry manager.  The value may be specified in any
d54 1
a54 1
state.  Many options can take separate specifications such that the
d58 1
a58 1
the appearance when the state is disabled.  Canvas items which are
d62 1
a62 1
its geometry manager.  The value may be specified in any
d66 1
a66 1
permitted for screen distances.  If the value of this option is greater
d69 1
a69 1
multiple of \fBxScrollIncrement\fR;  furthermore, the units for scrolling
d71 1
a71 1
are selected) will also be \fBxScrollIncrement\fR.  If the value of
d76 1
a76 1
permitted for screen distances.  If the value of this option is greater
d79 1
a79 1
multiple of \fByScrollIncrement\fR;  furthermore, the units for scrolling
d81 1
a81 1
are selected) will also be \fByScrollIncrement\fR.  If the value of
d93 1
a93 1
\fIpathName\fR argument.  At the time this command is invoked,
d102 1
a102 1
command allows commands to be bound to widgets.  For example,
d122 1
a122 1
Window items are an exception to the above rules.  The underlying
d132 1
a132 1
that item when it is created.  The id of an item never changes
d137 1
a137 1
with it.  A tag is just a string of characters, and it may
d146 1
a146 1
ways;  for example, all selected items might be given the tag
d150 1
a150 1
in the canvas;  it may be used to invoke operations on
d177 1
a177 1
and parenthesized subexpressions.  For example:
d192 1
a192 1
time;  if \fItagOrId\fR is specified in a way that
d207 1
a207 1
the screen;  if it is \fBc\fR then the distance is in centimeters;
d209 1
a209 1
Larger y-coordinates refer to points lower on the screen;  larger
d220 1
a220 1
\fBxview\fR and \fByview\fR widget commands;  this is typically used
d232 1
a232 1
origin of the visible area.  However, this also means that any focus
d248 1
a248 1
Text items support the following forms for an index;  if you
d252 1
a252 1
the last one in the text item;  this is necessary for such
d339 1
a339 1
available.  The last 2 examples will be displayed identically to the first
d344 1
a344 1
name is \fIpathName\fR.  This
d346 1
a346 1
operations on the widget.  It has the following general form:
d403 1
a403 1
the display list;  if no such item exists, then the selection
d472 1
a472 1
\fBITEM IDS AND TAGS\fR above.  \fBEnter\fR and \fBLeave\fR events
d476 3
a478 3
events for windows.  Mouse-related events are directed to the current
item, if any.  Keyboard-related events are directed to the focus item, if
any (see the \fBfocus\fR widget command below for more on this).  If a
d530 1
a530 1
information on the format of this list).  If \fIoption\fR is specified
d533 1
a533 1
sublist of the value returned if no \fIoption\fR is specified).  If
d535 1
a535 1
modifies the given widget option(s) to have the given value(s);  in
d648 1
a648 1
Note:  the insertion cursor is only displayed in an item if
d669 1
a669 1
Text items interpret \fIindex\fR as an index to a  character,
d682 1
a682 1
Text items interpret \fIbeforeThis\fR as an index to a  character,
d710 1
a710 1
information on the format of this list).  If \fIoption\fR is specified
d713 1
a713 1
sublist of the value returned if no \fIoption\fR is specified).  If
d716 1
a716 1
each of the items given by \fItagOrId\fR;  in
d729 1
a729 1
\fIBelowThis\fR is a tag or id;  if it refers to more than one
d732 1
a732 1
Note: this command has no effect on window items.  Window items always
d762 1
a762 1
to a file and an empty string is returned;  otherwise the Postscript
d773 1
a773 1
appears in the canvas's window on the screen.  If the canvas is
d775 1
a775 1
so nothing will appear in the Postscript.  To get around this problem
d780 1
a780 1
information to control the generation of Postscript.  The following
d809 1
a809 1
Specifies how to output color information.  \fIMode\fR must be either
d837 1
a837 1
\fB*Courier\-Bold\-R\-Normal*120*\fR will not;  Tk needs the dashes to
d873 1
a873 1
the scale factor from \fB\-pagewidth\fR  is used (non-uniform scaling
d898 1
a898 1
.PQ portrait orientation ;
d900 1
a900 1
.PQ landscape orientation .
d929 1
a929 1
\fIAboveThis\fR is a tag or id;  if it refers to more than one
d932 1
a932 1
Note: this command has no effect on window items.  Window items always
d967 1
a967 1
This command is used to implement scanning on canvases.  It has
d973 1
a973 1
Records \fIx\fR and \fIy\fR and the canvas's current view;  used
d977 1
a977 1
mouse.  It returns an empty string.
d988 1
a988 1
dragging the canvas at high speed through its window.  The return
d998 1
a998 1
an item that supports indexing and selection;  if it refers to
d1030 1
a1030 1
This command does not change the selection;  it just sets
d1067 1
a1067 1
\fIpathName \fBxview  \fR?\fIargs\fR?
d1077 1
a1077 1
Each element is a real fraction between 0 and 1;  together they describe
d1105 1
a1105 1
becomes visible;  if it is positive then information farther to the right
d1119 1
a1119 1
Each element is a real fraction between 0 and 1;  together they describe
d1145 1
a1145 1
visible;  if it is positive then lower information
d1151 1
a1151 1
by canvas widgets.  Each item type is characterized by two things:
d1153 1
a1153 1
instances of the type;  and second, a set of configuration options
d1165 1
a1165 1
Many items share a common set of options.  These options are
d1167 10
a1176 1
.PP
d1183 1
d1191 1
d1193 2
a1194 2
\fB\-dash\fR option.  \fB\-dashoffset\fR is ignored if there is no
\fB\-dash\fR pattern.  The \fIoffset\fR may have any of the forms described
d1202 1
d1216 1
d1220 1
a1220 1
This option defaults to \fBblack\fR.  If \fIcolor\fR is specified
d1224 3
a1226 2
Specifies the offset of stipples.  The offset value can be of the form
\fBx,y\fR or \fBside\fR, where side can be \fBn\fR, \fBne\fR, \fBe\fR,
d1232 1
a1232 1
used for stippling as well.  For the line and polygon canvas items you can
d1234 2
a1235 1
of the coordinate points of the line/polygon.
d1242 1
d1257 3
a1259 8
Specifies the offset of the stipple pattern used for outlines. The
offset value can be of the form
.QW \fIx\fB,\fIy\fR
or the description of a side (one of \fBn\fR, \fBne\fR, \fBe\fR,
\fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR). This
option only has an effect when the outline is drawn as a stipple
pattern, and is only supported under X11.
.\" TODO: What does this actually do? What do the acceptable forms mean?!
d1266 1
d1280 1
d1282 1
a1282 1
option.  It takes the same values:
d1286 1
d1289 1
a1289 1
existing tags for the item.  \fITagList\fR may be an empty list.
d1296 1
d1302 1
a1302 1
this option has no effect.  This option defaults to 1.0.
d1305 2
a1306 1
.SH "ARC ITEMS"
d1314 2
a1315 2
\fIpathName \fBcreate arc \fIx1 y1 x2 y2 \fR?\fIoption value option value ...\fR?
\fIpathName \fBcreate arc \fIcoordList\fR ?\fIoption value option value ...\fR?
d1322 1
a1322 1
for the item.  These same \fIoption\fR\-\fIvalue\fR pairs may be
d1329 15
a1343 25
.CS
\-dash
\-activedash
\-disableddash
\-dashoffset
\-fill
\-activefill
\-disabledfill
\-offset
\-outline
\-activeoutline
\-disabledoutline
\-outlineoffset
\-outlinestipple
\-activeoutlinestipple
\-disabledoutlinestipple
\-stipple
\-activestipple
\-disabledstipple
\-state
\-tags
\-width
\-activewidth
\-disabledwidth
.CE
d1358 1
a1358 1
from the 3-o'clock position;  it may be either positive or negative.
d1361 1
a1361 1
Specifies how to draw the arc.  If \fItype\fR is \fBpieslice\fR
d1371 1
a1371 1
.SH "BITMAP ITEMS"
d1377 2
a1378 2
\fIpathName \fBcreate bitmap \fIx y \fR?\fIoption value option value ...\fR?
\fIpathName \fBcreate bitmap \fIcoordList\fR ?\fIoption value option value ...\fR?
d1382 2
a1383 2
point used to position the bitmap on the display (see the \fB\-anchor\fR
option below for more information on how bitmaps are displayed).
d1386 1
a1386 1
for the item.  These same \fIoption\fR\-\fIvalue\fR pairs may be
d1392 5
a1396 4
.CS
\-state
\-tags
.CE
a1398 9
\fB\-anchor \fIanchorPos\fR
\fIAnchorPos\fR tells how to position the bitmap relative to the
positioning point for the item;  it may have any of the forms
accepted by \fBTk_GetAnchor\fR.  For example, if \fIanchorPos\fR
is \fBcenter\fR then the bitmap is centered on the point;  if
\fIanchorPos\fR is \fBn\fR then the bitmap will be drawn so that
its top center point is at the positioning point.
This option defaults to \fBcenter\fR.
.TP
d1409 1
a1409 1
string, then nothing is displayed where the bitmap pixels are 0;  this
d1431 1
a1431 1
.SH "IMAGE ITEMS"
d1437 2
a1438 2
\fIpathName \fBcreate image \fIx y \fR?\fIoption value option value ...\fR?
\fIpathName \fBcreate image \fIcoordList\fR ?\fIoption value option value ...\fR?
d1441 2
a1442 2
point used to position the image on the display (see the \fB\-anchor\fR
option below for more information).
d1445 1
a1445 1
for the item.  These same \fIoption\fR\-\fIvalue\fR pairs may be
d1451 5
a1455 4
.CS
\-state
\-tags
.CE
a1457 9
\fB\-anchor \fIanchorPos\fR
\fIAnchorPos\fR tells how to position the image relative to the
positioning point for the item;  it may have any of the forms
accepted by \fBTk_GetAnchor\fR.  For example, if \fIanchorPos\fR
is \fBcenter\fR then the image is centered on the point;  if
\fIanchorPos\fR is \fBn\fR then the image will be drawn so that
its top center point is at the positioning point.
This option defaults to \fBcenter\fR.
.TP
d1467 1
a1467 1
.SH "LINE ITEMS"
d1475 2
a1476 2
\fIpathName \fBcreate line \fIx1 y1... xn yn \fR?\fIoption value option value ...\fR?
\fIpathName \fBcreate line \fIcoordList\fR ?\fIoption value option value ...\fR?
d1483 1
a1483 1
for the item.  These same \fIoption\fR\-\fIvalue\fR pairs may be
d1490 11
a1500 17
.CS
\-dash
\-activedash
\-disableddash
\-dashoffset
\-fill
\-activefill
\-disabledfill
\-stipple
\-activestipple
\-disabledstipple
\-state
\-tags
\-width
\-activewidth
\-disabledwidth
.CE
d1548 2
a1549 2
supported in the core (with \fBbezier\fR being an alias for \fBtrue\fR), but more can be added at runtime.  If a boolean
false value or empty string is given, no smoothing is applied.  A boolean
d1554 1
a1554 1
and third, and so on.  Straight-line segments can be generated within
d1560 1
a1560 1
coordinates are control points on the cubic Bezier curve.  Straight
d1562 1
a1562 1
equal to their neighbouring knot points.  If the last point is a
d1567 2
a1568 2
Specifies the degree of smoothness desired for curves:  each spline
will be approximated with \fInumber\fR line segments.  This
d1570 1
a1570 1
.SH "OVAL ITEMS"
d1573 2
a1574 2
the display.  Each oval may have an outline, a fill, or
both.  Ovals are created with widget commands of the
d1577 2
a1578 2
\fIpathName \fBcreate oval \fIx1 y1 x2 y2 \fR?\fIoption value option value ...\fR?
\fIpathName \fBcreate oval \fIcoordList\fR ?\fIoption value option value ...\fR?
d1589 1
a1589 1
for the item.  These same \fIoption\fR\-\fIvalue\fR pairs may be
d1596 17
a1612 26
.CS
\-dash
\-activedash
\-disableddash
\-dashoffset
\-fill
\-activefill
\-disabledfill
\-offset
\-outline
\-activeoutline
\-disabledoutline
\-outlineoffset
\-outlinestipple
\-activeoutlinestipple
\-disabledoutlinestipple
\-stipple
\-activestipple
\-disabledstipple
\-state
\-tags
\-width
\-activewidth
\-disabledwidth
.CE
.SH "POLYGON ITEMS"
d1620 2
a1621 2
\fIpathName \fBcreate polygon \fIx1 y1 ... xn yn \fR?\fIoption value option value ...\fR?
\fIpathName \fBcreate polygon \fIcoordList\fR ?\fIoption value option value ...\fR?
d1630 1
a1630 1
for the item.  These same \fIoption\fR\-\fIvalue\fR pairs may be
d1637 15
a1651 24
.CS
\-dash
\-activedash
\-disableddash
\-dashoffset
\-fill
\-activefill
\-disabledfill
\-offset
\-outline
\-activeoutline
\-disabledoutline
\-outlinestipple
\-activeoutlinestipple
\-disabledoutlinestipple
\-stipple
\-activestipple
\-disabledstipple
\-state
\-tags
\-width
\-activewidth
\-disabledwidth
.CE
d1664 2
a1665 2
supported in the core (with \fBbezier\fR being an alias for \fBtrue\fR), but more can be added at runtime.  If a boolean
false value or empty string is given, no smoothing is applied.  A boolean
d1670 1
a1670 1
and third, and so on.  Straight-line segments can be generated within
d1676 1
a1676 1
coordinates are control points on the cubic Bezier curve.  Straight
d1678 1
a1678 1
equal to their neighbouring knot points.  If the last point is not the
d1684 2
a1685 2
Specifies the degree of smoothness desired for curves:  each spline
will be approximated with \fInumber\fR line segments.  This
d1695 1
a1695 1
is filled or if it has neither a fill nor an outline.  If you would
d1698 1
a1698 1
.SH "RECTANGLE ITEMS"
d1701 2
a1702 2
the display.  Each rectangle may have an outline, a fill, or
both.  Rectangles are created with widget commands of the
d1705 2
a1706 2
\fIpathName \fBcreate rectangle \fIx1 y1 x2 y2 \fR?\fIoption value option value ...\fR?
\fIpathName \fBcreate rectangle \fIcoordList\fR ?\fIoption value option value ...\fR?
d1715 1
a1715 1
for the item.  These same \fIoption\fR\-\fIvalue\fR pairs may be
d1723 17
a1739 26
.CS
\-dash
\-activedash
\-disableddash
\-dashoffset
\-fill
\-activefill
\-disabledfill
\-offset
\-outline
\-activeoutline
\-disabledoutline
\-outlineoffset
\-outlinestipple
\-activeoutlinestipple
\-disabledoutlinestipple
\-stipple
\-activestipple
\-disabledstipple
\-state
\-tags
\-width
\-activewidth
\-disabledwidth
.CE
.SH "TEXT ITEMS"
d1744 1
a1744 1
following text-related canvas widget commands:  \fBdchars\fR,
d1750 2
a1751 2
\fIpathName \fBcreate text \fIx y \fR?\fIoption value option value ...\fR?
\fIpathName \fBcreate text \fIcoordList\fR ?\fIoption value option value ...\fR?
d1759 1
a1759 1
for the item.  These same \fIoption\fR\-\fIvalue\fR pairs may be
d1765 8
a1772 10
.CS
\-fill
\-activefill
\-disabledfill
\-stipple
\-activestipple
\-disabledstipple
\-state
\-tags
.CE
a1774 10
\fB\-anchor \fIanchorPos\fR
\fIAnchorPos\fR tells how to position the text relative to the
positioning point for the text;  it may have any of the forms
accepted by \fBTk_GetAnchor\fR.  For example, if \fIanchorPos\fR
is \fBcenter\fR then the text is centered on the point;  if
\fIanchorPos\fR is \fBn\fR then the text will be drawn such that
the top center point of the rectangular region occupied by the
text will be at the positioning point.
This option defaults to \fBcenter\fR.
.TP
d1819 1
a1819 1
character to make the line shorter than \fIlineLength\fR;  the
d1822 1
a1822 1
.SH "WINDOW ITEMS"
d1828 2
a1829 2
\fIpathName \fBcreate window \fIx y \fR?\fIoption value option value ...\fR?
\fIpathName \fBcreate window \fIcoordList\fR ?\fIoption value option value ...\fR?
d1833 2
a1834 2
point used to position the window on the display (see the \fB\-anchor\fR
option below for more information on how bitmaps are displayed).
d1837 1
a1837 1
for the item.  These same \fIoption\fR\-\fIvalue\fR pairs may be
d1845 5
a1849 4
.CS
\-state
\-tags
.CE
a1851 10
\fB\-anchor \fIanchorPos\fR
.
\fIAnchorPos\fR tells how to position the window relative to the
positioning point for the item;  it may have any of the forms
accepted by \fBTk_GetAnchor\fR.  For example, if \fIanchorPos\fR
is \fBcenter\fR then the window is centered on the point;  if
\fIanchorPos\fR is \fBn\fR then the window will be drawn so that
its top center point is at the positioning point.
This option defaults to \fBcenter\fR.
.TP
d1875 1
a1875 1
Note:  due to restrictions in the ways that windows are managed, it is not
d1877 1
a1877 1
of window items.  A window item always obscures any graphics that
d1891 1
a1891 1
default behavior:  you will have to execute explicit Tcl commands
d1896 2
a1897 2
\fIezd\fR program.  \fIEzd\fR provides structured graphics in a Scheme
environment and preceded canvases by a year or two.  Its simple
@


1.40
log
@Added documentation on the -angle option for text items
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.39 2008/11/01 16:14:30 dkf Exp $
d784 7
d817 3
a819 2
If this option is not specified then the Postscript is returned as the
result of the command instead of being written to a file.
@


1.39
log
@Implementation of TIP 97 - canvas imove and rchars methods.
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.38 2008/10/02 19:13:35 mistachkin Exp $
d1822 9
@


1.38
log
@doc fixes
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.37 2008/09/30 23:54:46 dkf Exp $
d571 1
a571 1
indexing operations then they ignore dchars.
d573 1
a573 1
line and polygon items interpret them indices to a coordinate (an x,y pair).
d654 9
d930 12
@


1.37
log
@Implemented TIP #236 from patch by Neil McKay.
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.36 2008/09/23 13:36:37 dkf Exp $
d737 1
a737 1
\fIpathName \fBmoveto \fItagOrId xPos yPos
@


1.36
log
@Fix [Bug 2118116]
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.35 2008/06/30 22:57:02 dkf Exp $
d259 1
d274 1
d280 1
d285 1
d290 1
d295 1
d355 1
d369 1
d376 1
d380 1
d387 1
d407 1
d414 1
d422 1
d427 1
d444 1
d505 1
d512 1
d519 1
d526 1
d543 1
d556 1
d567 1
d579 1
d584 1
d594 1
d603 1
d632 1
d641 1
d655 1
d669 1
d682 1
d693 1
d715 1
d730 1
d737 12
d750 1
d776 1
d792 1
d799 1
d805 1
d824 1
d829 1
d838 1
d850 1
d860 1
d868 1
d876 1
d887 1
d892 1
d899 1
d907 1
d922 1
d937 1
d943 1
d950 2
a951 1
\fIpathName \fBscan dragto \fIx y ?gain?\fR.
d964 1
d977 1
d990 1
d997 1
d1007 1
d1014 1
d1030 1
d1039 1
d1046 1
d1058 1
d1064 1
d1081 1
d1088 1
d1099 1
d1105 1
d1869 1
d1879 1
d1887 1
d1895 1
@


1.35
log
@Minor doc updates (removing out of date changebars, improving typedef formatting,
 etc.)
@
text
@a0 1
'\" -*- nroff -*-
d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.34 2008/01/30 12:00:38 dkf Exp $
d1844 3
@


1.34
log
@Fix erroneous listing of "standard" options. [Bug 1882495]
@
text
@d1 1
d10 1
a10 1
'\" RCS: @@(#) $Id: canvas.n,v 1.33 2007/12/30 23:35:05 dkf Exp $
a1452 1
.VS 8.5
a1470 1
.VE 8.5
a1586 1
.VS 8.5
a1605 1
.VE 8.5
a1739 1
.VS 8.5
a1746 1
.VE 8.5
@


1.34.2.1
log
@Corrected definition of -height and -width for canvas' window items. [2326602]
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.34 2008/01/30 12:00:38 dkf Exp $
a1792 1
.
a1801 1
.
d1805 2
a1806 2
If this option is not specified, or if it is specified as zero,
then the window is given whatever height it requests internally.
a1808 1
.
d1812 2
a1813 2
If this option is not specified, or if it is specified as zero,
then the window is given whatever width it requests internally.
a1815 1
.
@


1.33
log
@Document canvas current item/clipping behaviour more precisely. [Bug 1774593]
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.32 2007/12/17 15:24:45 dkf Exp $
d20 6
a25 7
\-background	\-insertborderwidth	\-selectborderwidth
\-borderwidth	\-insertofftime	\-selectforeground
\-cursor	\-insertontime	\-takefocus
\-highlightbackground	\-insertwidth	\-xscrollcommand
\-highlightcolor	\-relief	\-yscrollcommand
\-highlightthickness	\-state
\-insertbackground	\-selectbackground
a84 1

a1845 1

a1847 1

@


1.32
log
@Documented -outlineoffset item option. [Bug 1836621]
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.31 2007/12/13 15:23:43 dgp Exp $
d158 2
a159 1
the mouse cursor.
d1199 3
a1201 1
configuration.
d1265 2
a1266 1
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR specify the coordinates of a
d1273 2
a1274 1
configuration.
d1340 2
a1341 1
configuration.
d1386 3
a1388 1
configuration.
d1500 3
a1502 1
configuration.
d1550 3
a1552 1
configuration.
d1637 2
a1638 1
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR or \fIcoordList\fR give
d1646 4
a1649 1
configuration.
d1691 2
a1692 1
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR specify the coordinates of a
d1699 2
a1700 1
configuration.
d1774 2
a1775 1
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR specify the coordinates of a
d1782 4
a1785 1
configuration.
d1826 5
a1830 1
overlap it, regardless of their order in the display list.
@


1.31
log
@merge stable branch onto HEAD
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.24.2.4 2007/11/01 16:37:14 dgp Exp $
d1129 11
d1213 1
d1507 1
d1648 1
@


1.30
log
@More documentation improvements
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.29 2007/10/29 16:04:13 dkf Exp $
@


1.29
log
@Lots more GOOBE stuff. Now works with 'make html'!
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.28 2007/10/26 20:13:23 dgp Exp $
d308 4
a311 2
5 possible characters \fB[.,\-_ ]\fR. The space can be used
to enlarge the space between other line elements, and can not
d314 6
a319 6
    \-dash .     = \-dash {2 4}
    \-dash \-     = \-dash {6 4}
    \-dash \-.    = \-dash {6 4 2 4}
    \-dash \-..   = \-dash {6 4 2 4 2 4}
    \-dash {. }  = \-dash {2 8}
    \-dash ,     = \-dash {4 4}
d1188 1
a1188 1
.br
d1258 1
a1258 1
.br
d1324 1
a1324 1
.br
d1369 1
a1369 1
.br
d1481 1
a1481 1
.br
d1528 1
a1528 1
.br
d1621 1
a1621 1
.br
d1669 1
a1669 1
.br
d1750 1
a1750 1
.br
@


1.28
log
@        * doc/*.1:              Revert doc changes that broke
        * doc/*.3:              `make html` so we can get the release
        * doc/*.n:              out the door.
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.25 2007/05/25 22:15:42 dkf Exp $
d31 3
a33 2
must be to an item before it is considered to be ``inside'' the item.
Defaults to 1.0.
d116 3
a118 2
earlier in the display list and are sometimes referred to
as being ``on top'' of earlier items.
d141 5
a145 1
For example, ``x123'' is OK but ``123'' isn't.
d148 2
a149 2
ways;  for example, all selected items might be given the
tag ``selected''.
d173 6
a178 2
tags by using operators: '&&', '||', '^' '!', and parenthesized
subexpressions.  For example:
d186 5
a190 1
will find only those items with either "a" or "b" tags, but not both.
d255 1
a255 1
Lines and Polygons don't support the insertion cursor
d284 1
a284 1
If the selection isn't in this item then this form is illegal.
d288 1
a288 1
If the selection isn't in this item then this form is illegal.
d303 3
a305 2
segments are drawn using the "outline" color. The other segments
are drawn transparent.
d308 1
a308 1
5 possible characters \fB[.,-_ ]\fR. The space can be used
d311 8
a318 6
    -dash .	= -dash {2 4}
    -dash -     = -dash {6 4}
    -dash -.    = -dash {6 4 2 4}
    -dash -..   = -dash {6 4 2 4 2 4}
    -dash {. }  = -dash {2 8}
    -dash ,	= -dash {4 4}
d323 4
a326 1
assures that "." will always be displayed as a dot and "-"
d351 1
a351 1
isn't already present on that list.
d414 3
a416 1
The list has the form ``\fIx1 y1 x2 y2\fR'' such that the drawn
d439 3
a441 2
(if the first character of \fIcommand\fR is ``+'' then \fIcommand\fR
augments an existing binding rather than replacing it).
d454 3
a456 2
The handling of events in canvases uses the current item defined in ITEM
IDS AND TAGS above.  \fBEnter\fR and \fBLeave\fR events trigger for an
d546 1
a546 1
If some of the items given by \fItagOrId\fR don't support
d550 1
a550 1
Indices are described in INDICES above.
d562 1
a562 1
If an item doesn't have the tag \fItagToDelete\fR then
d581 2
a582 2
If \fItagOrId\fR doesn't refer to any items, or if none of them
support the insertion cursor, then the focus isn't changed.
d595 1
a595 1
a given item doesn't actually have the input focus unless (a)
d600 1
a600 1
the canvas (if it wasn't there already).
d608 1
a608 1
If \fItagOrId\fR doesn't refer to any items, or if the item
d614 1
a614 1
If some or all of the items given by \fItagOrId\fR don't support
d616 1
a616 1
See INDICES above for a description of the
d621 1
a621 1
be set even when the item doesn't have the focus.
d628 1
a628 1
as described in INDICES above.
d645 1
a645 1
See INDICES above for information about the forms allowed
d718 1
a718 1
either invoke the "update" command to wait for the canvas window
d730 2
a731 1
code to set a particular color value (e.g. ``\fB1.0 1.0 0.0 setrgbcolor\fR'').
d737 1
a737 1
If this option hasn't been specified, or if there isn't an entry
d749 1
a749 1
If this option isn't specified then the Postscript is returned as the
d820 4
a823 3
the short dimension of the page (``portrait'' orientation);
in rotated output the x-axis runs along the long dimension of the
page (``landscape'' orientation).
d904 1
a904 1
within \fItagOrId\fR, as described in INDICES above.
d914 1
a914 1
If the selection isn't currently in \fItagOrId\fR then
d921 1
a921 1
If the selection isn't in this widget then the command
d929 1
a929 1
This command doesn't change the selection;  it just sets
d949 1
a949 1
If the selection anchor point for the widget isn't currently in
d960 1
a960 1
If \fItagOrId\fR doesn't refer to any items at all then
d1044 1
a1044 1
Most items don't support indexing or selection or the commands
d1066 1
a1066 1
See "DASH PATTERNS" for more information.
d1071 1
a1071 1
\fB-dash\fR pattern.  The \fIoffset\fR may have any of the forms described
d1105 1
a1105 1
toplevel origin instead. For canvas objects, the \fB-offset\fR option is
d1120 1
a1120 1
If the \fB\-outline\fR option hasn't been specified then this option
d1136 1
a1136 1
If the \fB\-fill\fR option hasn't been specified then this option
d1219 1
a1219 1
If it is greater than 360 or less than -360, then \fIdegrees\fR
d1278 3
a1280 2
Specifies the color to use for each of the bitmap's '0' valued pixels
in its normal, active and disabled states.
d1282 1
a1282 1
If this option isn't specified, or if it is specified as an empty
d1300 3
a1302 2
Specifies the color to use for each of the bitmap's '1' valued pixels
in its normal, active and disabled states.
d1408 3
a1410 1
If this option isn't specified then Tk picks a ``reasonable'' shape.
d1417 1
a1417 1
If this option isn't specified then it defaults to \fBbutt\fR.
d1425 1
a1425 1
If this option isn't specified then it defaults to \fBround\fR.
d1559 1
a1559 1
If this option isn't specified then it defaults to \fBround\fR.
d1591 3
a1593 2
and arcs in that interior points are considered to be ``inside'' a
polygon (e.g. for purposes of the \fBfind closest\fR and
d1694 1
a1694 1
If this option isn't specified, it defaults to a system-dependent
d1769 1
a1769 1
If this option isn't specified, or if it is specified as an empty
d1776 1
a1776 1
If this option isn't specified, or if it is specified as an empty
d1797 1
a1797 1
default behavior:  you'll have to execute explicit Tcl commands
@


1.27
log
@Lots of improvements to look and feel of manual pages
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.26 2007/10/23 15:44:35 dkf Exp $
d31 2
a32 3
must be to an item before it is considered to be
.QW inside
the item. Defaults to 1.0.
d116 1
a116 3
as being
.QW "on top"
of earlier items.
d139 1
a139 5
For example,
.QW x123
is OK but
.QW 123
isn't.
d143 1
a143 2
tag
.QW selected .
d394 1
a394 3
The list has the form
.QW "\fIx1 y1 x2 y2\fR"
such that the drawn
d417 2
a418 3
(if the first character of \fIcommand\fR is
.QW +
then \fIcommand\fR augments an existing binding rather than replacing it).
d706 1
a706 2
code to set a particular color value (e.g.
.QW "\fB1.0 1.0 0.0 setrgbcolor\fR" ).
d795 4
a798 6
the short dimension of the page (i.e.
.QW portrait
orientation); in rotated output the x-axis runs along the long
dimension of the page (i.e.
.QW landscape
orientation). Defaults to non-rotated.
d1029 1
d1160 1
a1160 1
.PP
d1230 1
a1230 1
.PP
d1294 1
a1294 1
.PP
d1339 1
a1339 1
.PP
d1380 1
a1380 3
If this option isn't specified then Tk picks a
.QW reasonable
shape.
d1449 1
a1449 1
.PP
d1496 1
a1496 1
.PP
d1561 2
a1562 3
and arcs in that interior points are considered to be
.QW inside
a polygon (e.g. for purposes of the \fBfind closest\fR and
d1588 1
a1588 1
.PP
d1636 1
a1636 1
.PP
d1717 1
a1717 1
.PP
@


1.26
log
@Rendering-with-groff GOOBE.
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.25 2007/05/25 22:15:42 dkf Exp $
d31 3
a33 2
must be to an item before it is considered to be ``inside'' the item.
Defaults to 1.0.
d117 3
a119 1
as being ``on top'' of earlier items.
d142 5
a146 1
For example, ``x123'' is OK but ``123'' isn't.
d150 2
a151 1
tag ``selected''.
d402 3
a404 1
The list has the form ``\fIx1 y1 x2 y2\fR'' such that the drawn
d427 3
a429 2
(if the first character of \fIcommand\fR is ``+'' then \fIcommand\fR
augments an existing binding rather than replacing it).
d717 2
a718 1
code to set a particular color value (e.g. ``\fB1.0 1.0 0.0 setrgbcolor\fR'').
d807 6
a812 4
the short dimension of the page (``portrait'' orientation);
in rotated output the x-axis runs along the long dimension of the
page (``landscape'' orientation).
Defaults to non-rotated.
d1393 3
a1395 1
If this option isn't specified then Tk picks a ``reasonable'' shape.
d1576 3
a1578 2
and arcs in that interior points are considered to be ``inside'' a
polygon (e.g. for purposes of the \fBfind closest\fR and
@


1.25
log
@Fixed documentation of default -joinstyle option values for line and polygon items. [Bug 1725782]
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.24 2007/05/03 23:55:29 dkf Exp $
a1028 1
.PP
d1159 1
a1159 1
.br
d1229 1
a1229 1
.br
d1293 1
a1293 1
.br
d1338 1
a1338 1
.br
d1448 1
a1448 1
.br
d1495 1
a1495 1
.br
d1587 1
a1587 1
.br
d1635 1
a1635 1
.br
d1716 1
a1716 1
.br
@


1.24
log
@Spelling fixes. [Bug 1686210]
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.23 2007/04/23 21:19:51 das Exp $
d1395 1
a1395 1
If this option isn't specified then it defaults to \fBmiter\fR.
d1529 1
a1529 1
If this option isn't specified then it defaults to \fBmiter\fR.
@


1.24.2.1
log
@merge updates from HEAD
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.25 2007/05/25 22:15:42 dkf Exp $
d1395 1
a1395 1
If this option isn't specified then it defaults to \fBround\fR.
d1529 1
a1529 1
If this option isn't specified then it defaults to \fBround\fR.
@


1.24.2.2
log
@merge updates from HEAD
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.24.2.1 2007/05/26 04:06:06 dgp Exp $
d1029 1
d1160 1
a1160 1
.PP
d1230 1
a1230 1
.PP
d1294 1
a1294 1
.PP
d1339 1
a1339 1
.PP
d1449 1
a1449 1
.PP
d1496 1
a1496 1
.PP
d1588 1
a1588 1
.PP
d1636 1
a1636 1
.PP
d1717 1
a1717 1
.PP
@


1.24.2.3
log
@merge updates from HEAD
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.24.2.2 2007/10/24 12:59:30 dgp Exp $
a1028 1
.PP
d1159 1
a1159 1
.br
d1229 1
a1229 1
.br
d1293 1
a1293 1
.br
d1338 1
a1338 1
.br
d1448 1
a1448 1
.br
d1495 1
a1495 1
.br
d1587 1
a1587 1
.br
d1635 1
a1635 1
.br
d1716 1
a1716 1
.br
@


1.24.2.4
log
@merge updates from HEAD
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id$
d31 2
a32 3
must be to an item before it is considered to be
.QW inside
the item. Defaults to 1.0.
d115 2
a116 3
earlier in the display list and are sometimes referred to as being
.QW "on top"
of earlier items.
d139 1
a139 5
For example,
.QW x123
is OK but
.QW 123
is not.
d142 2
a143 2
ways;  for example, all selected items might be given the tag
.QW selected .
d167 2
a168 6
tags by using operators:
.QW \fB&&\fR ,
.QW \fB||\fR ,
.QW \fB^\fR ,
.QW \fB!\fR ,
and parenthesized subexpressions.  For example:
d176 1
a176 5
will find only those items with either
.QW a
or
.QW b
tags, but not both.
d241 1
a241 1
Lines and Polygons do not support the insertion cursor
d270 1
a270 1
If the selection is not in this item then this form is illegal.
d274 1
a274 1
If the selection is not in this item then this form is illegal.
d289 2
a290 3
segments are drawn using the
.QW outline
color. The other segments are drawn transparent.
d293 2
a294 4
5 possible characters
.QW "\fB.,\-_ \fR" .
The space can be used
to enlarge the space between other line elements, and cannot
d296 6
a301 8
.CS
\-dash .     \(-> \-dash {2 4}
\-dash \-     \(-> \-dash {6 4}
\-dash \-.    \(-> \-dash {6 4 2 4}
\-dash \-..   \(-> \-dash {6 4 2 4 2 4}
\-dash {. }  \(-> \-dash {2 8}
\-dash ,     \(-> \-dash {4 4}
.CE
d306 1
a306 4
assures that
.QW .
will always be displayed as a dot and
.QW \-
d331 1
a331 1
is not already present on that list.
d394 1
a394 3
The list has the form
.QW "\fIx1 y1 x2 y2\fR"
such that the drawn
d417 2
a418 3
(if the first character of \fIcommand\fR is
.QW +
then \fIcommand\fR augments an existing binding rather than replacing it).
d431 2
a432 3
The handling of events in canvases uses the current item defined in
\fBITEM IDS AND TAGS\fR above.  \fBEnter\fR and \fBLeave\fR events
trigger for an
d522 1
a522 1
If some of the items given by \fItagOrId\fR do not support
d526 1
a526 1
Indices are described in \fBINDICES\fR above.
d538 1
a538 1
If an item does not have the tag \fItagToDelete\fR then
d557 2
a558 2
If \fItagOrId\fR does not refer to any items, or if none of them
support the insertion cursor, then the focus is not changed.
d571 1
a571 1
a given item does not actually have the input focus unless (a)
d576 1
a576 1
the canvas (if it was not there already).
d584 1
a584 1
If \fItagOrId\fR does not refer to any items, or if the item
d590 1
a590 1
If some or all of the items given by \fItagOrId\fR do not support
d592 1
a592 1
See \fBINDICES\fR above for a description of the
d597 1
a597 1
be set even when the item does not have the focus.
d604 1
a604 1
as described in \fBINDICES\fR above.
d621 1
a621 1
See \fBINDICES\fR above for information about the forms allowed
d694 1
a694 1
either invoke the \fBupdate\fR command to wait for the canvas window
d706 1
a706 2
code to set a particular color value (e.g.
.QW "\fB1.0 1.0 0.0 setrgbcolor\fR" ).
d712 1
a712 1
If this option has not been specified, or if there is no entry
d724 1
a724 1
If this option is not specified then the Postscript is returned as the
d795 3
a797 4
the short dimension of the page
.PQ portrait orientation ;
in rotated output the x-axis runs along the long dimension of the page
.PQ landscape orientation .
d878 1
a878 1
within \fItagOrId\fR, as described in \fBINDICES\fR above.
d888 1
a888 1
If the selection is not currently in \fItagOrId\fR then
d895 1
a895 1
If the selection is not in this widget then the command
d903 1
a903 1
This command does not change the selection;  it just sets
d923 1
a923 1
If the selection anchor point for the widget is not currently in
d934 1
a934 1
If \fItagOrId\fR does not refer to any items at all then
d1018 1
a1018 1
Most items do not support indexing or selection or the commands
d1040 1
a1040 1
See \fBDASH PATTERNS\fR for more information.
d1045 1
a1045 1
\fB\-dash\fR pattern.  The \fIoffset\fR may have any of the forms described
d1079 1
a1079 1
toplevel origin instead. For canvas objects, the \fB\-offset\fR option is
d1094 1
a1094 1
If the \fB\-outline\fR option has not been specified then this option
d1110 1
a1110 1
If the \fB\-fill\fR option has not been specified then this option
d1160 1
a1160 1
.PP
d1193 1
a1193 1
If it is greater than 360 or less than \-360, then \fIdegrees\fR
d1230 1
a1230 1
.PP
d1252 2
a1253 3
Specifies the color to use for each of the bitmap's
.QW 0
valued pixels in its normal, active and disabled states.
d1255 1
a1255 1
If this option is not specified, or if it is specified as an empty
d1273 2
a1274 3
Specifies the color to use for each of the bitmap's
.QW 1
valued pixels in its normal, active and disabled states.
d1294 1
a1294 1
.PP
d1339 1
a1339 1
.PP
d1380 1
a1380 3
If this option is not specified then Tk picks a
.QW reasonable
shape.
d1387 1
a1387 1
If this option is not specified then it defaults to \fBbutt\fR.
d1395 1
a1395 1
If this option is not specified then it defaults to \fBround\fR.
d1449 1
a1449 1
.PP
d1496 1
a1496 1
.PP
d1529 1
a1529 1
If this option is not specified then it defaults to \fBround\fR.
d1561 2
a1562 3
and arcs in that interior points are considered to be
.QW inside
a polygon (e.g. for purposes of the \fBfind closest\fR and
d1588 1
a1588 1
.PP
d1636 1
a1636 1
.PP
d1663 1
a1663 1
If this option is not specified, it defaults to a system-dependent
d1717 1
a1717 1
.PP
d1738 1
a1738 1
If this option is not specified, or if it is specified as an empty
d1745 1
a1745 1
If this option is not specified, or if it is specified as an empty
d1766 1
a1766 1
default behavior:  you will have to execute explicit Tcl commands
@


1.24.2.5
log
@merge updates from HEAD
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.32 2007/12/17 15:24:45 dkf Exp $
d158 1
a158 2
the mouse cursor (different item types interpret this in varying ways; see the
individual item type documentation for details).
a1128 11
\fB\-outlineoffset \fIoffset\fR
.
Specifies the offset of the stipple pattern used for outlines. The
offset value can be of the form
.QW \fIx\fB,\fIy\fR
or the description of a side (one of \fBn\fR, \fBne\fR, \fBe\fR,
\fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR). This
option only has an effect when the outline is drawn as a stipple
pattern, and is only supported under X11.
.\" TODO: What does this actually do? What do the acceptable forms mean?!
.TP
d1187 1
a1187 3
configuration. An arc item becomes the current item when the mouse pointer is
over any part that is painted or (when fully transparent) that would be
painted if both the \fB\-fill\fR and \fB\-outline\fR options were non-empty.
a1201 1
\-outlineoffset
d1250 1
a1250 2
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR (which must have two
elements) specify the coordinates of a
d1257 1
a1257 2
configuration. A bitmap item becomes the current item when the mouse pointer
is over any part of its bounding box.
d1323 1
a1323 2
configuration. An image item becomes the current item when the mouse pointer
is over any part of its bounding box.
d1368 1
a1368 3
configuration. A line item is the current item whenever the mouse pointer is
over any segment of the line, whether drawn or not and whether or not the line
is smoothed.
d1480 1
a1480 3
configuration. An oval item becomes the current item when the mouse pointer is
over any part that is painted or (when fully transparent) that would be
painted if both the \fB\-fill\fR and \fB\-outline\fR options were non-empty.
a1494 1
\-outlineoffset
d1527 1
a1527 3
configuration. A polygon item is the current item whenever the mouse pointer
is over any part of the polygon, whether drawn or not and whether or not the
outline is smoothed.
d1612 1
a1612 2
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR or \fIcoordList\fR
(which must have four elements) give
d1620 1
a1620 4
configuration. A rectangle item becomes the current item when the mouse
pointer is over any part that is painted or (when fully transparent) that
would be painted if both the \fB\-fill\fR and \fB\-outline\fR options were
non-empty.
a1634 1
\-outlineoffset
d1661 1
a1661 2
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR (which must have two
elements) specify the coordinates of a
d1668 1
a1668 2
configuration. A text item becomes the current item when the mouse pointer
is over any part of its bounding box.
d1742 1
a1742 2
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR (which must have two
elements) specify the coordinates of a
d1749 1
a1749 4
configuration. Theoretically, a window item becomes the current item when the
mouse pointer is over any part of its bounding box, but in practice this
typically does not happen because the mouse pointer ceases to be over the
canvas at that point.
d1790 1
a1790 5
overlap it, regardless of their order in the display list. Also note that
window items, unlike other canvas items, are not clipped for display by their
containing canvas's border, and are instead clipped by the parent widget of
the window specified by the \fB\-window\fR option; when the parent widget is
the canvas, this means that the window item can overlap the canvas's border.
@


1.24.2.6
log
@merge updates from HEAD
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.24.2.5 2008/01/23 16:39:11 dgp Exp $
d20 7
a26 6
\-background	\-borderwidth	\-cursor
\-highlightbackground	\-highlightcolor	\-highlightthickness
\-insertbackground	\-insertborderwidth	\-insertofftime
\-insertontime	\-insertwidth	\-relief
\-selectbackground	\-selectborderwidth	\-selectforeground
\-takefocus	\-xscrollcommand	\-yscrollcommand
d86 1
d1848 1
d1851 1
@


1.23
log
@	* doc/colors.n:		document new Mac OS X system colors.
	* doc/cursors.n:	document new Mac OS X native cursors.
	* doc/font.n:		document new Mac OS X 'menu' system font.
	* doc/wm.n:		document new Mac OS X [wm attributes].
	* doc/ttk_image.n:	fix 'make html' warning.
	* doc/canvas.n:		fix nroff typo.
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.22 2006/03/07 22:30:55 dkf Exp $
d56 1
a56 1
options that start with \fBactive\fR control the appearence when the mouse
d58 1
a58 1
the appearence when the state is disabled.  Canvas items which are
@


1.22
log
@Band-aid doc update for [Bug 220787]
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.21 2006/01/12 13:38:22 dkf Exp $
d1417 1
a1417 1
line segments can be venerated within a curve by making control points
@


1.21
log
@TIP#260 implementation
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.20 2005/05/12 22:51:03 dgp Exp $
d1098 2
d1115 2
@


1.20
log
@Updated out-of-date references to "Tk_GetBoolean"
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.19 2005/04/06 21:11:54 dkf Exp $
d1676 9
@


1.19
log
@Purge old and inaccurate .VS/.VE macros.
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.18 2004/10/28 10:22:51 dkf Exp $
d1397 1
a1397 1
\fBTk_GetBoolean\fR or a line smoothing method.
d1528 1
a1528 1
\fIBoolean\fR must have one of the forms accepted by \fBTk_GetBoolean\fR
@


1.18
log
@Assorted minor documentation fixes
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.17 2004/09/19 16:05:36 dkf Exp $
a197 1
.VS
a200 1
.VE
@


1.17
log
@Standardize style of section refs & public symbols. Remove displayed tabs
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.16 2004/08/19 14:41:52 dkf Exp $
d1399 3
a1401 1
\fBTk_GetBoolean\fR or a line smoothing method.  Only \fBtrue\fR and \fBraw\fR are
d1419 1
d1531 1
d1551 1
a1756 1

@


1.16
log
@TIP#168 implementation. Based on [Patch 886240]
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.15 2004/08/16 08:24:45 dkf Exp $
d42 1
a42 1
of the forms described in the COORDINATES section below.
d49 1
a49 1
in any of the forms given in the COORDINATES section below.
d63 1
a63 1
of the forms described in the COORDINATES section below.
d1048 1
a1048 1
in the COORDINATES section above.
d1133 2
a1134 2
\fIoutlineWidth\fR may be in any of the forms described in the COORDINATES
section above.
d1371 1
a1371 1
the COORDINATES section above.
d1676 1
a1676 1
described in the COORDINATES section above.
d1721 1
a1721 1
forms described in the COORDINATES section above.
d1728 1
a1728 1
forms described in the COORDINATES section above.
@


1.15
log
@Spelling and grammar fixes
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.14 2004/07/07 09:27:10 dkf Exp $
d1399 2
a1400 2
\fBTk_GetBoolean\fR or a line smoothing method.  Only \fBbezier\fR is
supported in the core, but more can be added at runtime.  If a boolean
d1402 3
a1404 3
truth value assumes \fBbezier\fR smoothing.
It indicates whether or not the line should be drawn as a curve.
If so, the line is rendered as a set of parabolic splines: one spline
d1408 9
d1421 1
a1421 1
option is ignored unless the \fB\-smooth\fR option is true.
d1528 19
a1546 6
It indicates whether or not the polygon should be drawn with a
curved perimeter.
If so, the outline of the polygon becomes a set of parabolic splines,
one spline for the first and second line segments, one for the second
and third, and so on.  Straight-line segments can be generated in a
smoothed polygon by duplicating the end-points of the desired line segment.
d1551 1
a1551 1
option is ignored unless the \fB\-smooth\fR option is true.
@


1.14
log
@Added paragraph about the canvas origin [Bug 956681]
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.13 2002/08/08 04:54:01 hobbs Exp $
d131 1
a131 1
Each item has a unique identifying number which is assigned to
d167 1
a167 1
tags by using operators: '&&', '||', '^' '!', and parenthezised
d244 1
a244 1
and the selection. Their indixes are supposed to be even
d257 1
a257 1
of the coordinate list will be adjusted by adding or substracting
d287 1
a287 1
Many items support the notion of an dash pattern for outlines.
d292 1
a292 1
are drawn transparant.
d306 1
a306 1
it shape-conserving. This means that all values in the dash
d619 1
a619 1
Text items interpret \fIbeforethis\fR as an index to a  character,
d1058 1
a1058 1
If \fIcolor\fR is an empty string (the default), then
d1106 1
a1106 1
This option specifies stipple patterns that should be used to fill the
d1402 1
a1402 1
truth value assume \fBbezier\fR smoothing.
@


1.13
log
@	* generic/tkCanvUtil.c (TkSmoothParseProc): recognize the built-in
	bezier method by name. [Bug #578654]
	* doc/canvas.n: update to note that -smooth really doesn't take
	or return just booleans.
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.12 2001/03/30 00:15:53 hobbs Exp $
a108 1

a126 1

a184 1

d203 1
a203 2

.SH TRANSFORMATIONS
d216 10
a225 1

a284 1

a315 1

a1011 1

d1027 1
a1027 2

.SH "COMMON ITEM OPTIONS"
a1138 1

a1210 1

a1274 1

a1317 1

a1412 1

a1460 1

a1539 1

a1584 1

a1661 1

a1719 1

a1724 1

d1739 3
@


1.13.2.1
log
@Backport of documentation fixes
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.13 2002/08/08 04:54:01 hobbs Exp $
d42 1
a42 1
of the forms described in the \fBCOORDINATES\fR section below.
d49 1
a49 1
in any of the forms given in the \fBCOORDINATES\fR section below.
d63 1
a63 1
of the forms described in the \fBCOORDINATES\fR section below.
d109 1
d128 1
d133 1
a133 1
Each item has a unique identifying number, which is assigned to
d169 1
a169 1
tags by using operators: '&&', '||', '^' '!', and parenthesized
d187 1
d206 1
d220 1
a220 10
.PP
Note that the default origin of the canvas's visible area is
coincident with the origin for the whole window as that makes bindings
using the mouse position easier to work with; you only need to use the
\fBcanvasx\fR and \fBcanvasy\fR widget commands if you adjust the
origin of the visible area.  However, this also means that any focus
ring (as controlled by the \fB\-highlightthickness\fR option) and
window border (as controlled by the \fB\-borderwidth\fR option) must
be taken into account before you get to the visible area of the
canvas.
d239 1
a239 1
and the selection. Their indices are supposed to be even
d252 1
a252 1
of the coordinate list will be adjusted by adding or subtracting
d280 1
d283 1
a283 1
Many items support the notion of a dash pattern for outlines.
d288 1
a288 1
are drawn transparent.
d302 1
a302 1
is shape-conserving. This means that all values in the dash
d312 1
d616 1
a616 1
Text items interpret \fIbeforeThis\fR as an index to a  character,
d1009 1
d1025 1
d1047 1
a1047 1
in the \fBCOORDINATES\fR section above.
d1057 1
a1057 1
If \fIcolor\fR is an empty string (the default),
d1105 1
a1105 1
This option specifies stipple patterns that should be used to fill
d1132 2
a1133 2
\fIoutlineWidth\fR may be in any of the forms described in the
\fBCOORDINATES\fR section above.
d1138 1
d1211 1
d1276 1
d1320 1
d1374 1
a1374 1
the \fBCOORDINATES\fR section above.
d1465 1
d1523 1
a1523 1
\fIBoolean\fR must have one of the forms accepted by \fBTk_GetBoolean\fR.
d1545 1
d1591 1
d1661 1
a1661 1
described in the \fBCOORDINATES\fR section above.
d1669 1
d1707 1
a1707 1
forms described in the \fBCOORDINATES\fR section above.
d1714 1
a1714 1
forms described in the \fBCOORDINATES\fR section above.
d1728 1
d1734 1
d1740 1
a1748 3
.SH "SEE ALSO"
bind(n), font(n), image(n), scrollbar(n)

@


1.13.2.2
log
@Updated out-of-date references to "Tk_GetBoolean"
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.13.2.1 2004/10/28 10:19:29 dkf Exp $
d1399 1
a1399 1
\fBTcl_GetBoolean\fR or a line smoothing method.  Only \fBbezier\fR is
d1519 1
a1519 1
\fIBoolean\fR must have one of the forms accepted by \fBTcl_GetBoolean\fR.
@


1.13.2.3
log
@Band-aid doc update for [Bug 220787]
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.13.2.2 2005/05/12 22:50:59 dgp Exp $
a1099 2
\fINote that stipples are not well supported on platforms that do not
use X11 as their drawing API.\fR
a1114 2
\fINote that stipples are not well supported on platforms that do not
use X11 as their drawing API.\fR
@


1.13.2.4
log
@Spelling corrections
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.13.2.3 2006/03/07 22:30:31 dkf Exp $
d56 1
a56 1
options that start with \fBactive\fR control the appearance when the mouse
d58 1
a58 1
the appearance when the state is disabled.  Canvas items which are
@


1.12
log
@	* doc/canvas.n: Noted ability to specify coords as a list in the
	docs. (techentin) [Patch #403660]
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.11 2000/09/07 00:23:35 hobbs Exp $
d1400 6
a1405 2
\fB\-smooth \fIboolean\fR
\fIBoolean\fR must have one of the forms accepted by \fBTk_GetBoolean\fR.
@


1.12.2.1
log
@merged with trunk at tag macosx-8-4-merge-2002-08-20-trunk
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id$
d1400 2
a1401 6
\fB\-smooth \fIsmoothMethod\fR
\fIsmoothMethod\fR must have one of the forms accepted by
\fBTk_GetBoolean\fR or a line smoothing method.  Only \fBbezier\fR is
supported in the core, but more can be added at runtime.  If a boolean
false value or empty string is given, no smoothing is applied.  A boolean
truth value assume \fBbezier\fR smoothing.
@


1.11
log
@	* doc/canvas.n: fixed doc bug (ellson). [Bug: 6218]
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.10 2000/08/25 06:58:31 ericm Exp $
d201 5
d495 2
d507 2
d1148 1
d1150 1
a1150 1
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR give
d1219 1
d1221 1
a1221 1
The arguments \fIx\fR and \fIy\fR specify the coordinates of a
d1284 1
d1286 1
a1286 1
The arguments \fIx\fR and \fIy\fR specify the coordinates of a
d1330 1
d1332 1
a1332 1
The arguments \fIx1\fR through \fIyn\fR give
d1421 1
d1423 1
a1423 1
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR give
d1471 1
d1473 1
a1473 1
The arguments \fIx1\fR through \fIyn\fR specify the coordinates for
d1550 1
d1552 1
a1552 1
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR give
d1600 1
d1602 1
a1602 1
The arguments \fIx\fR and \fIy\fR specify the coordinates of a
d1673 1
d1675 1
a1675 1
The arguments \fIx\fR and \fIy\fR specify the coordinates of a
@


1.11.2.1
log
@sync with head
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.12 2001/03/30 00:15:53 hobbs Exp $
a200 5
.VS
Coordinates can be specified either as an even number of parameters,
or as a single list parameter containing an even number of x and y
coordinate values.
.VE
a489 2
.TP
\fIpathName\fR \fBcoords \fItagOrId \fR?\fIcoordList\fR?
a499 2
.TP
\fIpathName \fBcreate \fItype coordList \fR?\fIoption value ...\fR?
a1138 1
\fIpathName \fBcreate arc \fIcoordList\fR ?\fIoption value option value ...\fR?
d1140 1
a1140 1
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR or \fIcoordList\fR give
a1208 1
\fIpathName \fBcreate bitmap \fIcoordList\fR ?\fIoption value option value ...\fR?
d1210 1
a1210 1
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR specify the coordinates of a
a1272 1
\fIpathName \fBcreate image \fIcoordList\fR ?\fIoption value option value ...\fR?
d1274 1
a1274 1
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR specify the coordinates of a
a1317 1
\fIpathName \fBcreate line \fIcoordList\fR ?\fIoption value option value ...\fR?
d1319 1
a1319 1
The arguments \fIx1\fR through \fIyn\fR or \fIcoordList\fR give
a1407 1
\fIpathName \fBcreate oval \fIcoordList\fR ?\fIoption value option value ...\fR?
d1409 1
a1409 1
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR or \fIcoordList\fR give
a1456 1
\fIpathName \fBcreate polygon \fIcoordList\fR ?\fIoption value option value ...\fR?
d1458 1
a1458 1
The arguments \fIx1\fR through \fIyn\fR or \fIcoordList\fR specify the coordinates for
a1534 1
\fIpathName \fBcreate rectangle \fIcoordList\fR ?\fIoption value option value ...\fR?
d1536 1
a1536 1
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR or \fIcoordList\fR give
a1583 1
\fIpathName \fBcreate text \fIcoordList\fR ?\fIoption value option value ...\fR?
d1585 1
a1585 1
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR specify the coordinates of a
a1655 1
\fIpathName \fBcreate window \fIcoordList\fR ?\fIoption value option value ...\fR?
d1657 1
a1657 1
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR specify the coordinates of a
@


1.11.4.1
log
@        * Merged in updates from HEAD branch.
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.12 2001/03/30 00:15:53 hobbs Exp $
a200 5
.VS
Coordinates can be specified either as an even number of parameters,
or as a single list parameter containing an even number of x and y
coordinate values.
.VE
a489 2
.TP
\fIpathName\fR \fBcoords \fItagOrId \fR?\fIcoordList\fR?
a499 2
.TP
\fIpathName \fBcreate \fItype coordList \fR?\fIoption value ...\fR?
a1138 1
\fIpathName \fBcreate arc \fIcoordList\fR ?\fIoption value option value ...\fR?
d1140 1
a1140 1
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR or \fIcoordList\fR give
a1208 1
\fIpathName \fBcreate bitmap \fIcoordList\fR ?\fIoption value option value ...\fR?
d1210 1
a1210 1
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR specify the coordinates of a
a1272 1
\fIpathName \fBcreate image \fIcoordList\fR ?\fIoption value option value ...\fR?
d1274 1
a1274 1
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR specify the coordinates of a
a1317 1
\fIpathName \fBcreate line \fIcoordList\fR ?\fIoption value option value ...\fR?
d1319 1
a1319 1
The arguments \fIx1\fR through \fIyn\fR or \fIcoordList\fR give
a1407 1
\fIpathName \fBcreate oval \fIcoordList\fR ?\fIoption value option value ...\fR?
d1409 1
a1409 1
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR or \fIcoordList\fR give
a1456 1
\fIpathName \fBcreate polygon \fIcoordList\fR ?\fIoption value option value ...\fR?
d1458 1
a1458 1
The arguments \fIx1\fR through \fIyn\fR or \fIcoordList\fR specify the coordinates for
a1534 1
\fIpathName \fBcreate rectangle \fIcoordList\fR ?\fIoption value option value ...\fR?
d1536 1
a1536 1
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR or \fIcoordList\fR give
a1583 1
\fIpathName \fBcreate text \fIcoordList\fR ?\fIoption value option value ...\fR?
d1585 1
a1585 1
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR specify the coordinates of a
a1655 1
\fIpathName \fBcreate window \fIcoordList\fR ?\fIoption value option value ...\fR?
d1657 1
a1657 1
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR specify the coordinates of a
@


1.10
log
@* doc/toplevel.n:
* doc/spinbox.n:
* doc/scrollbar.n:
* doc/scale.n:
* doc/menubutton.n:
* doc/menu.n:
* doc/listbox.n:
* doc/entry.n:
* doc/frame.n:
* doc/message.n:
* doc/checkbutton.n:
* doc/radiobutton.n:
* doc/button.n:
* doc/label.n:
* doc/canvas.n:
* doc/text.n: Fixed Standard Options section to make best use of
new tab settings in man.macros.
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.9 2000/07/25 21:14:34 jenglish Exp $
d172 1
a172 1
      .c find withtag {(a&&!b)|(!a&&b)}
@


1.9
log
@CanvPsY.3, ConfigWidg.3, CrtImgType.3, CrtItemType.3,
FontId.3, GetFont.3, canvas.n, font.n, options.n, text.n:
Documentation fix: Replaced references to XFontStruct *
and Tk_FontStruct with Tk_Font.
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.8 2000/06/05 23:31:34 ericm Exp $
d20 7
a26 7
\-background            \-borderwidth           \-cursor
\-highlightbackground   \-highlightcolor        \-highlightthickness
\-insertbackground      \-insertborderwidth     \-insertofftime
\-insertontime          \-insertwidth           \-relief
\-state                 \-selectbackground      \-selectborderwidth
\-selectforeground      \-takefocus             \-xscrollcommand
\-yscrollcommand
@


1.8
log
@Fixed formatting.
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.7 2000/05/23 00:31:36 hobbs Exp $
d1619 1
a1619 1
\fIFontName\fR may be any string acceptable to \fBTk_GetFontStruct\fR.
@


1.7
log
@	* doc/bind.n:
	* doc/canvas.n:
	* doc/entry.n:
	* doc/listbox.n:
	* doc/photo.n: doc fix-ups [Bug: 5396]
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.6 2000/01/21 03:54:20 hobbs Exp $
d20 7
a26 5
\-background	\-highlightthickness	\-insertwidth	\-relief
\-borderwidth	\-insertbackground	\-state
\-cursor	\-insertborderwidth	\-selectbackground	\-takefocus
\-highlightbackground	\-insertofftime	\-selectborderwidth	\-xscrollcommand
\-highlightcolor	\-insertontime	\-selectforeground	\-yscrollcommand
@


1.6
log
@	* doc/WindowId.3: added docs for Tk_IsContainer and Tk_IsEmbedded

	* doc/text.n: clarified mark gravity definition and usage of
	``word'' in binding definitions.  [Bug: 2004 2277 1388]
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.5 1999/12/22 23:01:33 hobbs Exp $
d286 1
a286 1
occur as the first posibion in the string. Some examples:
d300 5
a304 5
On systems where only a limited set of dash patterns, the dash
pattern will be displayed as the most close dash pattern that
is available. For example, on Windows only the first 4 of the
above examples are available. The last 2 examples will be
displayed identically as the first one.
d1026 2
a1027 2
This option specifies dash patterns for the normal state, the active
state, and the disabled state of an arc item.
d1033 4
a1036 2
The starting \fIoffset\fR into the pattern provided by the \fB\-dash\fR option.
\fB\-dashoffset\fR is ignored if there is no \fB-dash\fR pattern.
d1069 1
a1069 1
toplevel origin in stead. For canvas objects, the \fB-offset\fR option is
@


1.6.2.1
log
@doc cleanup and clarifications from 8.4aCVS backport
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.12 2001/03/30 00:15:53 hobbs Exp $
d20 5
a24 7
\-background	\-insertborderwidth	\-selectborderwidth
\-borderwidth	\-insertofftime	\-selectforeground
\-cursor	\-insertontime	\-takefocus
\-highlightbackground	\-insertwidth	\-xscrollcommand
\-highlightcolor	\-relief	\-yscrollcommand
\-highlightthickness	\-state
\-insertbackground	\-selectbackground
d170 1
a170 1
      .c find withtag {(a&&!b)||(!a&&b)}
a198 5
.VS
Coordinates can be specified either as an even number of parameters,
or as a single list parameter containing an even number of x and y
coordinate values.
.VE
d286 1
a286 1
occur as the first position in the string. Some examples:
d300 5
a304 5
On systems which support only a limited set of dash patterns, the dash
pattern will be displayed as the closest dash pattern that is available.
For example, on Windows only the first 4 of the above examples are
available.  The last 2 examples will be displayed identically to the first
one.
a487 2
.TP
\fIpathName\fR \fBcoords \fItagOrId \fR?\fIcoordList\fR?
a497 2
.TP
\fIpathName \fBcreate \fItype coordList \fR?\fIoption value ...\fR?
d1026 2
a1027 2
This option specifies dash patterns for the normal, active
state, and disabled state of an item.
d1033 2
a1034 4
The starting \fIoffset\fR in pixels into the pattern provided by the
\fB\-dash\fR option.  \fB\-dashoffset\fR is ignored if there is no
\fB-dash\fR pattern.  The \fIoffset\fR may have any of the forms described
in the COORDINATES section above.
d1067 1
a1067 1
toplevel origin instead. For canvas objects, the \fB-offset\fR option is
a1134 1
\fIpathName \fBcreate arc \fIcoordList\fR ?\fIoption value option value ...\fR?
d1136 1
a1136 1
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR or \fIcoordList\fR give
a1204 1
\fIpathName \fBcreate bitmap \fIcoordList\fR ?\fIoption value option value ...\fR?
d1206 1
a1206 1
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR specify the coordinates of a
a1268 1
\fIpathName \fBcreate image \fIcoordList\fR ?\fIoption value option value ...\fR?
d1270 1
a1270 1
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR specify the coordinates of a
a1313 1
\fIpathName \fBcreate line \fIcoordList\fR ?\fIoption value option value ...\fR?
d1315 1
a1315 1
The arguments \fIx1\fR through \fIyn\fR or \fIcoordList\fR give
a1403 1
\fIpathName \fBcreate oval \fIcoordList\fR ?\fIoption value option value ...\fR?
d1405 1
a1405 1
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR or \fIcoordList\fR give
a1452 1
\fIpathName \fBcreate polygon \fIcoordList\fR ?\fIoption value option value ...\fR?
d1454 1
a1454 1
The arguments \fIx1\fR through \fIyn\fR or \fIcoordList\fR specify the coordinates for
a1530 1
\fIpathName \fBcreate rectangle \fIcoordList\fR ?\fIoption value option value ...\fR?
d1532 1
a1532 1
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR or \fIcoordList\fR give
a1579 1
\fIpathName \fBcreate text \fIcoordList\fR ?\fIoption value option value ...\fR?
d1581 1
a1581 1
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR specify the coordinates of a
d1615 1
a1615 1
\fIFontName\fR may be any string acceptable to \fBTk_GetFont\fR.
a1651 1
\fIpathName \fBcreate window \fIcoordList\fR ?\fIoption value option value ...\fR?
d1653 1
a1653 1
The arguments \fIx\fR and \fIy\fR or \fIcoordList\fR specify the coordinates of a
@


1.5
log
@minor doc fixes
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.4 1999/12/14 06:51:44 hobbs Exp $
d50 8
a57 7
one of: normal, disabled, or hidden. Individual canvas objects all have
their own state option, which overrides the default state. Many options can
take separate specifications such that the appearance of the item can be
different in different situations. The options that start with "active"
control the appearence when the mouse pointer is over it, while the option
starting with "disabled" controls the appearence when the state is
disabled.
@


1.4
log
@	* doc/canvas.n: added docs for items added by dash patch (-*dash*,
	-state, -active*, -disabled*, -offset, essentially rewrote the
	man patch for completely updated 8.3 canvas widget.
	* doc/entry.n: added docs for entry widget validation
	* doc/event.n: added docs for -warp
	* doc/text.n: doc'ed new -state value 'hidden'
	* doc/GetDash.3: (new file) man page explaining Tk_GetDash
@
text
@d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.3 1998/10/16 00:46:18 rjohnson Exp $
d168 1
a168 1
.nf
d170 1
a170 1
.fo
d172 1
a172 1
.nf
d174 1
a174 1
.fo
@


1.3
log
@
Fixed bug in options for text items in canvas widget.  unlike all other
items they didn't support a null (transparant fill color)
@
text
@d4 1
d9 1
a9 1
'\" RCS: @@(#) $Id: canvas.n,v 1.2 1998/09/14 18:22:55 stanton Exp $
d12 1
a12 1
.TH canvas n 4.0 Tk "Tk Built-In Commands"
d20 5
a24 5
\-background	\-highlightthickness	\-insertwidth	\-takefocus
\-borderwidth	\-insertbackground	\-relief	\-xscrollcommand
\-cursor	\-insertborderwidth	\-selectbackground	\-yscrollcommand
\-highlightbackground	\-insertofftime	\-selectborderwidth
\-highlightcolor	\-insertontime	\-selectforeground
d48 9
a60 1
.br
d164 13
d217 7
a223 5
Indices are used for commands such as inserting text, deleting
a range of characters, and setting the insertion cursor position.
An index may be specified in any of a number of ways, and
different types of items may support different forms for
specifying indices.
d230 3
d238 2
a239 1
so on.
d242 5
a246 1
as if it were equal to the length of the text item.
d249 3
a251 2
Refers to the character just after the last one in the item
(same as the number of characters in the item).
d255 1
a255 1
is drawn in this item.
d266 1
a266 1
Refers to the character at the point given by \fIx\fR and
d273 32
a418 1
.VS
a431 1
.VE
d507 2
a508 3
For each item given by \fItagOrId\fR, delete the characters
in the range given by \fIfirst\fR and \fIlast\fR,
inclusive.
d510 4
a513 3
text operations, then they are ignored.
\fIFirst\fR and \fIlast\fR are indices of characters
within the item(s) as described in INDICES above.
d575 1
a575 2
Set the position of the insertion cursor for the item(s)
given by \fItagOrId\fR
d592 2
d595 1
a595 1
of characters within the item, inclusive.
d602 6
a607 2
text insertion then \fIstring\fR is inserted into the item's
text just before the character whose index is \fIbeforeThis\fR.
a668 1
.VS
a674 1
.VE
d844 1
a844 1
\fIpathName \fBscan dragto \fIx y\fR.
d848 3
a850 2
It then adjusts the view by 10 times the
difference in coordinates.  This command is typically associated
d1009 115
a1123 2
in the descriptions below (at present, only text items provide
this support).
d1143 27
a1169 1
The following options are supported for arcs:
a1178 21
\fB\-fill \fIcolor\fR
Fill the region of the arc with \fIcolor\fR.
\fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR.
If \fIcolor\fR is an empty string (the default), then
then the arc will not be filled.
.TP
\fB\-outline \fIcolor\fR
\fIColor\fR specifies a color to use for drawing the arc's
outline;  it may have any of the forms accepted by \fBTk_GetColor\fR.
This option defaults to \fBblack\fR.  If \fIcolor\fR is specified
as an empty string then no outline is drawn for the arc.
.TP
\fB\-outlinestipple \fIbitmap\fR
Indicates that the outline for the arc should be drawn with a stipple pattern;
\fIbitmap\fR specifies the stipple pattern to use, in any of the
forms accepted by \fBTk_GetBitmap\fR.
If the \fB\-outline\fR option hasn't been specified then this option
has no effect.
If \fIbitmap\fR is an empty string (the default), then the outline is drawn
in a solid fashion.
.TP
a1184 9
\fB\-stipple \fIbitmap\fR
Indicates that the arc should be filled in a stipple pattern;
\fIbitmap\fR specifies the stipple pattern to use, in any of the
forms accepted by \fBTk_GetBitmap\fR.
If the \fB\-fill\fR option hasn't been specified then this option
has no effect.
If \fIbitmap\fR is an empty string (the default), then filling is done
in a solid fashion.
.TP
a1195 15
.TP
\fB\-tags \fItagList\fR
Specifies a set of tags to apply to the item.
\fITagList\fR consists of a list of tag names, which replace any
existing tags for the item.
\fITagList\fR may be an empty list.
.TP
\fB\-width \fIoutlineWidth\fR
Specifies the width of the outline to be drawn around
the arc's region, in any of the forms described in the COORDINATES
section above.
If the \fB\-outline\fR option has been specified as an empty string
then this option has no effect.
Wide outlines will be drawn centered on the edges of the arc's region.
This option defaults to 1.0.
d1213 7
a1219 1
The following options are supported for bitmaps:
d1231 6
a1236 2
Specifies a color to use for each of the bitmap pixels
whose value is 0.
d1243 6
a1248 1
Specifies the bitmap to display in the item.
d1252 6
a1257 2
Specifies a color to use for each of the bitmap pixels
whose value is 1.
a1259 6
.TP
\fB\-tags \fItagList\fR
Specifies a set of tags to apply to the item.
\fITagList\fR consists of a list of tag names, which replace any
existing tags for the item.
\fITagList\fR may be an empty list.
d1277 7
a1283 1
The following options are supported for images:
d1295 6
a1300 1
Specifies the name of the image to display in the item.
a1302 5
.TP
\fB\-tags \fItagList\fR
Specifies a set of tags to apply to the item.
\fITagList\fR consists of a list of tag names, which replace any
existing tags for the item;  it may be an empty list.
d1308 2
d1322 20
a1341 1
The following options are supported for lines:
a1372 6
\fB\-fill \fIcolor\fR
\fIColor\fR specifies a color to use for drawing the line; it may have
any of the forms acceptable to \fBTk_GetColor\fR.  It may also be an
empty string, in which case the line will be transparent.
This option defaults to \fBblack\fR.
.TP
a1393 20
.TP
\fB\-stipple \fIbitmap\fR
Indicates that the line should be filled in a stipple pattern;
\fIbitmap\fR specifies the stipple pattern to use, in any of the
forms accepted by \fBTk_GetBitmap\fR.
If \fIbitmap\fR is an empty string (the default), then filling is
done in a solid fashion.
.TP
\fB\-tags \fItagList\fR
Specifies a set of tags to apply to the item.
\fITagList\fR consists of a list of tag names, which replace any
existing tags for the item.
\fITagList\fR may be an empty list.
.TP
\fB\-width \fIlineWidth\fR
\fILineWidth\fR specifies the width of the line, in any of the forms
described in the COORDINATES section above.
Wide lines will be drawn centered on the path specified by the
points.
If this option isn't specified then it defaults to 1.0.
d1416 26
a1441 38
The following options are supported for ovals:
.TP
\fB\-fill \fIcolor\fR
Fill the area of the oval with \fIcolor\fR.
\fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR.
If \fIcolor\fR is an empty string (the default), then
then the oval will not be filled.
.TP
\fB\-outline \fIcolor\fR
\fIColor\fR specifies a color to use for drawing the oval's
outline;  it may have any of the forms accepted by \fBTk_GetColor\fR.
This option defaults to \fBblack\fR.
If \fIcolor\fR is an empty string then no outline will be
drawn for the oval.
.TP
\fB\-stipple \fIbitmap\fR
Indicates that the oval should be filled in a stipple pattern;
\fIbitmap\fR specifies the stipple pattern to use, in any of the
forms accepted by \fBTk_GetBitmap\fR.
If the \fB\-fill\fR option hasn't been specified then this option
has no effect.
If \fIbitmap\fR is an empty string (the default), then filling is done
in a solid fashion.
.TP
\fB\-tags \fItagList\fR
Specifies a set of tags to apply to the item.
\fITagList\fR consists of a list of tag names, which replace any
existing tags for the item.
\fITagList\fR may be an empty list.
.TP
\fB\-width \fIoutlineWidth\fR
\fIoutlineWidth\fR specifies the width of the outline to be drawn around
the oval, in any of the forms described in the COORDINATES section above.
If the \fB\-outline\fR option hasn't been specified then this option
has no effect.
Wide outlines are drawn centered on the oval path defined by
\fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR.
This option defaults to 1.0.
d1447 2
d1454 4
a1457 3
three or more points that define a closed polygon.
The first and last points may be the same;  whether they are or not,
Tk will draw the polygon as a closed polygon.
d1463 27
a1489 1
The following options are supported for polygons:
d1491 6
a1496 13
\fB\-fill \fIcolor\fR
\fIColor\fR specifies a color to use for filling the area of the
polygon; it may have any of the forms acceptable to \fBTk_GetColor\fR.
If \fIcolor\fR is an empty string then the polygon will be
transparent.
This option defaults to \fBblack\fR.
.TP
\fB\-outline \fIcolor\fR
\fIColor\fR specifies a color to use for drawing the polygon's
outline;  it may have any of the forms accepted by \fBTk_GetColor\fR.
If \fIcolor\fR is an empty string then no outline will be
drawn for the polygon.
This option defaults to empty (no outline).
a1510 19
.TP
\fB\-stipple \fIbitmap\fR
Indicates that the polygon should be filled in a stipple pattern;
\fIbitmap\fR specifies the stipple pattern to use, in any of the
forms accepted by \fBTk_GetBitmap\fR.
If \fIbitmap\fR is an empty string (the default), then filling is
done in a solid fashion.
.TP
\fB\-tags \fItagList\fR
Specifies a set of tags to apply to the item.
\fITagList\fR consists of a list of tag names, which replace any
existing tags for the item.
\fITagList\fR may be an empty list.
.TP
\fB\-width \fIoutlineWidth\fR
\fIOutlineWidth\fR specifies the width of the outline to be drawn around
the polygon, in any of the forms described in the COORDINATES section above.
If the \fB\-outline\fR option hasn't been specified then this option
has no effect.  This option defaults to 1.0.
d1540 26
a1565 38
The following options are supported for rectangles:
.TP
\fB\-fill \fIcolor\fR
Fill the area of the rectangle with \fIcolor\fR, which may be
specified in any of the forms accepted by \fBTk_GetColor\fR.
If \fIcolor\fR is an empty string (the default),
then the rectangle will not be filled.
.TP
\fB\-outline \fIcolor\fR
Draw an outline around the edge of the rectangle in \fIcolor\fR.
\fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR.
This option defaults to \fBblack\fR.
If \fIcolor\fR is an empty string then no outline will be
drawn for the rectangle.
.TP
\fB\-stipple \fIbitmap\fR
Indicates that the rectangle should be filled in a stipple pattern;
\fIbitmap\fR specifies the stipple pattern to use, in any of the
forms accepted by \fBTk_GetBitmap\fR.
If the \fB\-fill\fR option hasn't been specified then this option
has no effect.
If \fIbitmap\fR is an empty string (the default), then filling
is done in a solid fashion.
.TP
\fB\-tags \fItagList\fR
Specifies a set of tags to apply to the item.
\fITagList\fR consists of a list of tag names, which replace any
existing tags for the item.
\fITagList\fR may be an empty list.
.TP
\fB\-width \fIoutlineWidth\fR
\fIOutlineWidth\fR specifies the width of the outline to be drawn around
the rectangle, in any of the forms described in the COORDINATES section above.
If the \fB\-outline\fR option hasn't been specified then this option
has no effect.
Wide outlines are drawn centered on the rectangular path
defined by \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR.
This option defaults to 1.0.
d1588 13
a1600 1
The following options are supported for text items:
a1611 6
\fB\-fill \fIcolor\fR
\fIColor\fR specifies a color to use for filling the text characters;
it may have any of the forms accepted by \fBTk_GetColor\fR.
If \fIcolor\fR is an empty string then the text will be transparent.
If this option isn't specified then it defaults to \fBblack\fR.
.TP
a1625 14
\fB\-stipple \fIbitmap\fR
Indicates that the text should be drawn in a stippled pattern
rather than solid;
\fIbitmap\fR specifies the stipple pattern to use, in any of the
forms accepted by \fBTk_GetBitmap\fR.
If \fIbitmap\fR is an empty string (the default) then the text
is drawn in a solid fashion.
.TP
\fB\-tags \fItagList\fR
Specifies a set of tags to apply to the item.
\fITagList\fR consists of a list of tag names, which replace any
existing tags for the item.
\fITagList\fR may be an empty list.
.TP
d1660 7
a1666 1
The following options are supported for window items:
a1682 6
.TP
\fB\-tags \fItagList\fR
Specifies a set of tags to apply to the item.
\fITagList\fR consists of a list of tag names, which replace any
existing tags for the item.
\fITagList\fR may be an empty list.
@


1.2
log
@Replaced SCCS strings, fixed binary files
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id$
d1449 1
@


1.1
log
@Initial revision
@
text
@d8 1
a8 1
'\" SCCS: @@(#) canvas.n 1.58 97/10/31 12:58:45
@


1.1.4.1
log
@Merged 8.0.3 changes into 8.1
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: canvas.n,v 1.2 1998/09/14 18:22:55 stanton Exp $
@


1.1.4.2
log
@* integrated tk8.0.4 changes.

* generic/tkBind.c: fixed deletion order bug where a crash would
result if a binding deleted "."
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: canvas.n,v 1.1.4.1 1998/09/30 02:16:12 stanton Exp $
a1448 1
If \fIcolor\fR is an empty string then the text will be transparent.
@


