| GIMP Library Reference Manual |
|---|
gimptilegimptile — Functions for working with tiles. |
GimpTile;
void gimp_tile_ref (GimpTile *tile);
void gimp_tile_ref_zero (GimpTile *tile);
void gimp_tile_unref (GimpTile *tile,
gboolean dirty);
void gimp_tile_flush (GimpTile *tile);
void gimp_tile_cache_size (gulong kilobytes);
void gimp_tile_cache_ntiles (gulong ntiles);
typedef struct {
guint ewidth; /* the effective width of the tile */
guint eheight; /* the effective height of the tile */
guint bpp; /* the bytes per pixel (1, 2, 3 or 4 ) */
guint tile_num; /* the number of this tile within the drawable */
guint16 ref_count; /* reference count for the tile */
guint dirty : 1; /* is the tile dirty? has it been modified? */
guint shadow: 1; /* is this a shadow tile */
guchar *data; /* the pixel data for the tile */
GimpDrawable *drawable; /* the drawable this tile came from */
} GimpTile;
void gimp_tile_cache_size (gulong kilobytes);
Sets the size of the tile cache on the plug-in side. The tile cache
is used to reduce the number of tiles exchanged between the GIMP core
and the plug-in. See also gimp_tile_cache_ntiles().
kilobytes : | new cache size in kilobytes |
void gimp_tile_cache_ntiles (gulong ntiles);
Sets the size of the tile cache on the plug-in side. This function
is similar to gimp_tile_cache_size() but allows to specify the
number of tiles directly.
If your plug-in access pixels tile-by-tile, it doesn't need a tile cache at all. If however the plug-in accesses drawable pixel data row-by-row, it should set the tile cache large enough to hold the number of tiles per row. Double this size if your plug-in uses shadow tiles.
ntiles : | number of tiles that should fit into the cache |
| << gimptexttool | gimptools >> |