]> www.wagner.pp.ru Git - oss/fgis.git/blob - man/palette.n
First checked in version
[oss/fgis.git] / man / palette.n
1 .TH palette n 1.0 Fgis "user Tcl commands"
2
3 .SH NAME
4 palette \- Create and manipulate color palettes 
5
6 .SH SYNOPSIS
7 \fB palette \fIoption\fR ?\fIarg\fR?
8
9 .SH DESCRIPTION
10 .PP
11 This command creates palette object, which is used for map visualisation. Palette is
12 array of 256 RGB color specifications, indexed by integers from 0 to 255. 
13 Typically palette entry N is used for displaying map class N.
14 Upon creation of object new Tcl command with same name as object is defined
15 and can be used for manipulating palette. \fBpalette\fR command returns
16 name of created object. One palette, named \fBdefaultpalette\fR is created
17 during initialization of fGIS. In difference of user-created palettes it
18 cannot be modified.
19
20 .SH OPTIONS
21 .TP 4
22 \fBpalette read \fIfilename\fR
23 - reads palette from specified file. File should confirm EPPL7 clr file
24 syntax.
25 .TP 4
26 \fBpalette parse \fIstring\fR
27 - reads palette from string. String should have same format as EPPL7 clr file.
28 .TP 4
29 \fBpalette set \fIlist\fR
30 - creates palette from list of color specification. Each element of list
31 should have format \#rrggbb. Color names are not supported by palettes.
32 Color specifications are assigned to palette indices in sequentual order.
33 .TP 4
34 \fBpalette blank\fR
35 - creates new palette with all entries set to white (#ffffff).
36
37 .TP 4
38 \fBpalette copy \fIpaletteName\fR
39 - creates a copy of existing palette. This allows to create modifable copy
40 of default palette.
41 .SH OBJECT COMMAND
42 Palette object names can be used as command names. They support folowing 
43 options:
44 .TP 4
45 \fIpaletteName\fB delete\fR -
46 destroys palette object. 
47 .TP 4
48 \fIpaletteName\fB get\fI index\fR
49 - return color for given index in palette. Color is returned as \#rrggbb,
50 and can be used as color specification in Tk commands.
51 .TP 4
52 \fIpaletteName\fB list\fR
53 - return list of all colors in palette. This list always contains 256
54 elements. This list can be used as argument for \fBpalette set\fR command,
55 to create same palette.
56 .TP 4
57 \fIpaletteName\fB print\fR
58 - returns string, containing content of valid EPPL7 clr file, which can
59 be used to reproduce this palette.
60 .TP 4
61 \fIpaletteName\fB set\fI index value\fR
62 - changes contents of given entry to \fIvalue\fR. Value should be in form
63 \#rrggbb. Other forms of colors, supported by Tk are not supported by
64 palettes.
65 .SH SEE ALSO
66 .BR patterns (n), fgisRasterColorImage (n).
67