PgmImaging

PgmImaging — A library to process pixbufs through software filters.

Synopsis


#include <pgm/imaging/pgmimaging.h>

GdkPixbuf *         pgm_imaging_linear_alpha_gradient   (const GdkPixbuf *pixbuf,
                                                         gfloat start_x,
                                                         gfloat start_y,
                                                         gfloat start_alpha,
                                                         gfloat end_x,
                                                         gfloat end_y,
                                                         gfloat end_alpha);

Description

PgmImaging is a library providing several software image processing filters. The functions can be used as CPU (Central Processing Unit) software fallback when effects can't be applied by Pigment plugins through the GPU (Graphics Processing Unit).

Last reviewed on 2008-07-29 (0.3.7)

Details

pgm_imaging_linear_alpha_gradient ()

GdkPixbuf *         pgm_imaging_linear_alpha_gradient   (const GdkPixbuf *pixbuf,
                                                         gfloat start_x,
                                                         gfloat start_y,
                                                         gfloat start_alpha,
                                                         gfloat end_x,
                                                         gfloat end_y,
                                                         gfloat end_alpha);

Creates a new GdkPixbuf by compositing the alpha channel of pixbuf with the linear alpha gradient mask given as parameters. Note that the resulting pixbuf always contains an alpha channel even if the original pixbuf does not. In that case, the alpha channel is automatically added with a default value of 1.0 corresponding to opaque pixels.

pixbuf :

A GdkPixbuf.

start_x :

x coordinate of the start point, in the range [0.0, 1.0].

start_y :

y coordinate of the start point, in the range [0.0, 1.0].

start_alpha :

Alpha component at the start point, in the range [0.0, 1.0].

end_x :

x coordinate of the end point, in the range [0.0, 1.0].

end_y :

y coordinate of the end point, in the range [0.0, 1.0].

end_alpha :

Alpha component at the end point, in the range [0.0, 1.0].

Returns :

A newly-created GdkPixbuf with a reference count of 1, or NULL if not enough memory could be allocated.