1 |
578 |
markom |
'\"
|
2 |
|
|
'\" Copyright (c) 1994 The Regents of the University of California.
|
3 |
|
|
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
|
4 |
|
|
'\"
|
5 |
|
|
'\" See the file "license.terms" for information on usage and redistribution
|
6 |
|
|
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
7 |
|
|
'\"
|
8 |
|
|
'\" RCS: @(#) $Id: image.n,v 1.1.1.1 2002-01-16 10:25:49 markom Exp $
|
9 |
|
|
'\"
|
10 |
|
|
.so man.macros
|
11 |
|
|
.TH image n 4.0 Tk "Tk Built-In Commands"
|
12 |
|
|
.BS
|
13 |
|
|
'\" Note: do not modify the .SH NAME line immediately below!
|
14 |
|
|
.SH NAME
|
15 |
|
|
image \- Create and manipulate images
|
16 |
|
|
.SH SYNOPSIS
|
17 |
|
|
\fBimage\fR \fIoption \fR?\fIarg arg ...\fR?
|
18 |
|
|
.BE
|
19 |
|
|
|
20 |
|
|
.SH DESCRIPTION
|
21 |
|
|
.PP
|
22 |
|
|
The \fBimage\fR command is used to create, delete, and query images.
|
23 |
|
|
It can take several different forms, depending on the
|
24 |
|
|
\fIoption\fR argument. The legal forms are:
|
25 |
|
|
.TP
|
26 |
|
|
\fBimage create \fItype \fR?\fIname\fR? ?\fIoption value ...\fR?
|
27 |
|
|
Creates a new image and returns its name.
|
28 |
|
|
\fItype\fR specifies the type of the image, which must be one of
|
29 |
|
|
the types currently defined (e.g., \fBbitmap\fR).
|
30 |
|
|
\fIname\fR specifies the name for the image; if it is omitted then
|
31 |
|
|
Tk picks a name of the form \fBimage\fIx\fR, where \fIx\fR is
|
32 |
|
|
an integer.
|
33 |
|
|
There may be any number of \fIoption\fR\-\fIvalue\fR pairs,
|
34 |
|
|
which provide configuration options for the new image.
|
35 |
|
|
The legal set of options is defined separately for each image
|
36 |
|
|
type; see below for details on the options for built-in image types.
|
37 |
|
|
If an image already exists by the given name then it is replaced
|
38 |
|
|
with the new image and any instances of that image will redisplay
|
39 |
|
|
with the new contents.
|
40 |
|
|
.TP
|
41 |
|
|
\fBimage delete \fR?\fIname name\fR ...?
|
42 |
|
|
Deletes each of the named images and returns an empty string.
|
43 |
|
|
If there are instances of the images displayed in widgets,
|
44 |
|
|
the images won't actually be deleted until all of the instances
|
45 |
|
|
are released.
|
46 |
|
|
However, the association between the instances and the image
|
47 |
|
|
manager will be dropped.
|
48 |
|
|
Existing instances will retain their sizes but redisplay as
|
49 |
|
|
empty areas.
|
50 |
|
|
If a deleted image is recreated with another call to \fBimage create\fR,
|
51 |
|
|
the existing instances will use the new image.
|
52 |
|
|
.TP
|
53 |
|
|
\fBimage height \fIname\fR
|
54 |
|
|
Returns a decimal string giving the height of image \fIname\fR
|
55 |
|
|
in pixels.
|
56 |
|
|
.TP
|
57 |
|
|
\fBimage names\fR
|
58 |
|
|
Returns a list containing the names of all existing images.
|
59 |
|
|
.TP
|
60 |
|
|
\fBimage type \fIname\fR
|
61 |
|
|
Returns the type of image \fIname\fR (the value of the \fItype\fR
|
62 |
|
|
argument to \fBimage create\fR when the image was created).
|
63 |
|
|
.TP
|
64 |
|
|
\fBimage types\fR
|
65 |
|
|
Returns a list whose elements are all of the valid image types
|
66 |
|
|
(i.e., all of the values that may be supplied for the \fItype\fR
|
67 |
|
|
argument to \fBimage create\fR).
|
68 |
|
|
.TP
|
69 |
|
|
\fBimage width \fIname\fR
|
70 |
|
|
Returns a decimal string giving the width of image \fIname\fR
|
71 |
|
|
in pixels.
|
72 |
|
|
|
73 |
|
|
.SH "BUILT-IN IMAGE TYPES"
|
74 |
|
|
.PP
|
75 |
|
|
The following image types are defined by Tk so they will be available
|
76 |
|
|
in any Tk application.
|
77 |
|
|
Individual applications or extensions may define additional types.
|
78 |
|
|
.TP
|
79 |
|
|
\fBbitmap\fR
|
80 |
|
|
Each pixel in the image displays a foreground color, a background
|
81 |
|
|
color, or nothing.
|
82 |
|
|
See the \fBbitmap\fR manual entry for more information.
|
83 |
|
|
.TP
|
84 |
|
|
\fBphoto\fR
|
85 |
|
|
Displays a variety of full-color images, using dithering to
|
86 |
|
|
approximate colors on displays with limited color capabilities.
|
87 |
|
|
See the \fBphoto\fR manual entry for more information.
|
88 |
|
|
|
89 |
|
|
.SH KEYWORDS
|
90 |
|
|
height, image, types of images, width
|