| GIMP Application Reference Manual | ||||
|---|---|---|---|---|
PixelSurround;
enum PixelSurroundMode;
PixelSurround* pixel_surround_new (TileManager *tiles,
gint width,
gint height,
PixelSurroundMode mode);
void pixel_surround_set_bg (PixelSurround *surround,
const guchar *bg);
const guchar* pixel_surround_lock (PixelSurround *surround,
gint x,
gint y,
gint *rowstride);
void pixel_surround_release (PixelSurround *surround);
void pixel_surround_destroy (PixelSurround *surround);
typedef enum
{
PIXEL_SURROUND_SMEAR,
PIXEL_SURROUND_BACKGROUND
} PixelSurroundMode;
PixelSurround* pixel_surround_new (TileManager *tiles, gint width, gint height, PixelSurroundMode mode);
PixelSurround provides you a contiguous read-only view of the area surrounding a pixel. It is an efficient pixel access strategy for interpolation algorithms.
|
tile manager |
|
width of surround region |
|
height of surround region |
|
how to deal with pixels that are not covered by the tile manager |
Returns : |
a new PixelSurround. |
void pixel_surround_set_bg (PixelSurround *surround, const guchar *bg);
This sets the color that the PixelSurround uses when in
PIXEL_SURROUND_BACKGROUND mode for pixels that are not covered by
the tile manager.
|
a PixelSurround |
|
background color |
const guchar* pixel_surround_lock (PixelSurround *surround, gint x, gint y, gint *rowstride);
Gives access to a region of pixels. The upper left corner is
specified by the x and y parameters. The size of the region
is determined by the dimensions given when creating the surround.
When you don't need to read from the pixels any longer, you should
unlock the surround using pixel_surround_unlock(). If you need a
different region, just call pixel_surround_lock() again.
|
a PixelSurround |
|
X coordinate of upper left corner |
|
Y coordinate of upper left corner |
|
return location for rowstride |
Returns : |
pointer to pixel data (read-only) |
void pixel_surround_release (PixelSurround *surround);
Unlocks pixels locked by surround. See pixel_surround_lock().
|
PixelSurround |
void pixel_surround_destroy (PixelSurround *surround);
Unlocks pixels and frees any resources allocated for surround. You
must not use surround any longer after calling this function.
|
PixelSurround |