summaryrefslogtreecommitdiffstats
path: root/tkimg/doc/img-pixmap.man
blob: 08bac89baba90b721b8239f68d3fb67a22070c4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
[comment {-*- tcl -*- doctools}]
[vset FORMATNAME pixmap]
[vset FORMATFULLNAME {Pixmap Image type}]

[manpage_begin img-[vset FORMATNAME] n 1.3]
[moddesc Img]
[titledesc "Img, [vset FORMATFULLNAME] ([vset FORMATNAME])"]
[copyright {1995-2003 Jan Nijtmans <nijtmans@users.sourceforge.net>}]
[require Tk]
[require img::[vset FORMATNAME] [opt 1.3]]
[description]

The package [package img::[vset FORMATNAME]] is a sub-package of
[package Img]. It can be loaded as a part of the complete Img support,
via [cmd {package require Img}], or on its own, via

[cmd "package require img::[vset FORMATNAME]"].

[para]

Like all packages of [package Img] it does [emph not] provide new
commands, but extends the existing [package Tk] command [cmd image].

[para]

In contrast to all other sub packages this packages does [emph not]
extend [package Tk]'s [cmd photo] image type, but rather provides a
completely new image type, on the same level as [cmd photo] and
[cmd bitmap].

[section {CREATING PIXMAPS}]

Like all images, pixmaps are created using the [cmd {image create}]
command.

[list_begin definitions]
[call [cmd image] [method {create pixmap}] [opt [arg name]] [opt [arg options]]]

Pixmaps support the following options:

[list_begin definitions]
[lst_item "[option -data] [arg string]"]

Specifies the contents of the source pixmap as a string. The string
must adhere to X11 pixmap format (e.g., as generated by the pixmap
program). If both the [option -data] and [option -file] options are
specified, the [option -data] option takes precedence.

[lst_item "[option -file] [arg name]"]

[arg name] gives the name of a file whose contents define the source
pixmap. The file must adhere to X11 pixmap format (e.g., as generated
by the pixmap program).

[list_end]
[list_end]

[section {IMAGE COMMAND}]

When a pixmap image is created, Tk also creates a new com­ mand whose
name is the same as the image.  This command may be used to invoke
various operations on the image.  It has the following general form:

[list_begin definitions]
[call [arg imageName] [method option] [opt [arg {arg arg ...}]]]
[list_end]

[method Option] and the args determine the exact behavior of the
command. The following commands are possible for pixmap images:

[list_begin definitions]

[call [arg imageName] [method cget] [arg option]]

Returns the current value of the configuration option given by

[arg option]. [arg Option] may have any of the values accepted by the
[cmd {image create pixmap}] command.


[call [arg imageName] [method configure] [opt [option option]] [opt [arg {value option value ...}]]]

Query or modify the configuration options for the image. If no option
is specified, returns a list describing all of the available options
for [arg imageName] (see [cmd Tk_ConfigureInfo] for information on the
format of this list). If [arg option] is specified with no

[arg value], then the command returns a list describing the one named
option (this list will be identi­ cal to the corresponding sublist of
the value returned if no option is specified).  If one or more

[arg option-value] pairs are specified, then the command modifies the
given option(s) to have the given value(s); in this case the command
returns an empty string. [option Option] may have any of the values
accepted by the [cmd {image create pixmap}] command.


[include format-footer.inc]