Trees | Index | Help |
---|
Module gwy :: Class Gradient |
|
Gradient
struct contains private data only and
should be accessed using the functions below.
Method Summary | |
---|---|
Deletes a point at given index in a color gradient. | |
Computes the color at a given position of a color gradient. | |
Returns: The number of points in gradient . | |
Resets a gradient to the default two-point gray scale state. | |
Samples a gradient to an array GdkPixbuf -like
samples. | |
Samples a color gradient to a provided pixbuf. | |
Reconstructs a color gradient definition from sampled colors. | |
Sets a single color point in a color gradient. | |
Sets the color of a color gradient point without moving it. | |
Returns: Color point at index_ . | |
Returns: Complete set gradient 's color points. | |
Returns: Sampled gradient as a sequence of
GdkPixbuf -like RRGGBBAA | |
Inserts a point to a color gradient. | |
Inserts a point into a color gradient based on its x position. | |
Sets the complete color gradient definition to a given set of points. |
Method Details |
---|
delete_point(index_)Deletes a point at given index in a color gradient. It is not possible to delete points in gradients with less than 3 points. First and last points should not be deleted unless there's another point withx = 0 or x =
1 present.
|
get_color(x, color)Computes the color at a given position of a color gradient.
|
get_npoints()Returns: The number of points ingradient .
|
reset()Resets a gradient to the default two-point gray scale state. |
sample(nsamples, samples)Samples a gradient to an array If Gradient.get_samples () instead. This function does not
need the gradient to be in use, though.
|
sample_to_pixbuf(pixbuf)Samples a color gradient to a provided pixbuf. UnlikeGradient.sample () which simply takes
samples at equidistant points this method uses supersampling and thus
it gives a bit better looking gradient presentation.
|
set_from_samples(nsamples, samples, threshold)Reconstructs a color gradient definition from sampled colors. The result is usually approximate.
|
set_point(index_, point)Sets a single color point in a color gradient. It is an error to try to move points beyond its neighbours, or to move first (or last) point from 0 (or 1).
|
set_point_color(index_, color)Sets the color of a color gradient point without moving it.
|
UNIMPLEMENTED_get_point(index_)Returns: Color point atindex_ .
|
UNIMPLEMENTED_get_points(npoints)Returns: Complete setgradient 's color points.
The returned array is
|
UNIMPLEMENTED_get_samples(nsamples)Returns: Sampledgradient as a sequence of
GdkPixbuf -like RRGGBBAA
|
UNIMPLEMENTED_insert_point(index_, point)Inserts a point to a color gradient. It is an error to try to position a outside its future neighbours, or to move the first (or last) point from 0 (or 1).
|
UNIMPLEMENTED_insert_point_sorted(point)Inserts a point into a color gradient based on its x position.
|
UNIMPLEMENTED_set_points(npoints, points)Sets the complete color gradient definition to a given set of points. The point positions should be ordered, and first point should start at 0.0, last end at 1.0. There should be no redundant points.
|
Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Tue Dec 30 04:01:42 2008 | http://epydoc.sf.net |