mirror of https://github.com/GNOME/gimp.git
Bill Skaggs <weskaggs@primate.ucdavis.edu>
* devel-docs/ggr.txt: added new file decribing the ggr (Gimp gradient) file format.
This commit is contained in:
parent
f168881c18
commit
21ba16c67d
|
@ -1,3 +1,8 @@
|
|||
2004-08-25 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||
|
||||
* devel-docs/ggr.txt: added new file decribing the ggr
|
||||
(Gimp gradient) file format.
|
||||
|
||||
2004-08-25 DindinX <david@dindinx.org>
|
||||
|
||||
* app/display/gimpnavigationview.c
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
The .ggr file format.
|
||||
|
||||
GGR files are used to store GIMP gradients. A gradient consists of a
|
||||
series of consecutive *segments* spanning the range from 0 to 1. Each
|
||||
segment has the following attributes:
|
||||
|
||||
Left Endpoint coordinate: (double)
|
||||
Left Endpoint color (RGBA color)
|
||||
Right Endpoint coordinate (double)
|
||||
Right Endpoint color (RGBA color)
|
||||
Midpoint coordinate (double)
|
||||
Blend function (enum; values are 0 = "linear", 1 = "curved",
|
||||
2 = "sinusoidal", 3 = "spherical (increasing)",
|
||||
4 = "spherical (decreasing)")
|
||||
Color type (enum; values are 0 = "RGB", 1 = "HSV CCW", 2 = "HSV CW")
|
||||
|
||||
|
||||
A GGR file is an ASCII file structured as follows:
|
||||
|
||||
Line 1: "GIMP Gradient"
|
||||
Line 2: "Name: " followed by the name of the gradient
|
||||
Line 3: the number of segments
|
||||
|
||||
The remaining lines consist of segment specifications. There must be
|
||||
one line for each segment. Each line contains 13 numbers -- the first
|
||||
11 are floats, the remaining 2 are ints. Here is what each field
|
||||
encodes:
|
||||
|
||||
Field Meaning
|
||||
0 Left endpoint coordinate
|
||||
1 Midpoint coordinate
|
||||
2 Right endpoint coordinate
|
||||
3 Left endpoint R
|
||||
4 Left endpoint G
|
||||
5 Left endpoint B
|
||||
6 Left endpoint A
|
||||
7 Right endpoint R
|
||||
8 Right endpoint G
|
||||
9 Right endpoint B
|
||||
10 Right endpoint A
|
||||
11 Blend function type
|
||||
12 Color type
|
||||
|
||||
The left endpoint coordinate of each segment must equal the right
|
||||
endpoint coordinate of the preceding segment.
|
||||
|
||||
Note: This is a description of the *new* gradient file format. In
|
||||
earlier versions of GIMP a different format was used.
|
||||
|
||||
Note: A few of the gradients that are included with Gimp are treated
|
||||
as special cases, for which shades of gray are replaced with
|
||||
proportionate blends of the current foreground and background colors.
|
||||
There is currently no way to make this happen for a custom gradient,
|
||||
though.
|
Loading…
Reference in New Issue