![]() | ![]() | ![]() | GIMP Library Reference Manual | ![]() |
---|
gimppatterns — Functions relating to patterns.
gboolean gimp_patterns_refresh (void); gchar** gimp_patterns_get_list (const gchar *filter, gint *num_patterns); gchar* gimp_patterns_get_pattern (gint *width, gint *height); gboolean gimp_patterns_set_pattern (const gchar *name); gchar* gimp_patterns_get_pattern_data (const gchar *name, gint *width, gint *height, gint *mask_bpp, gint *length, guint8 **mask_data);
gboolean gimp_patterns_refresh (void);
Refresh current patterns. This function always succeeds.
This procedure retrieves all patterns currently in the user's pattern path and updates the pattern dialogs accordingly.
Returns : | TRUE on success. |
gchar** gimp_patterns_get_list (const gchar *filter, gint *num_patterns);
Retrieve a complete listing of the available patterns.
This procedure returns a complete listing of available GIMP patterns. Each name returned can be used as input to the 'gimp_patterns_set_pattern'.
filter : | An optional regular expression used to filter the list. |
num_patterns : | The number of patterns in the pattern list. |
Returns : | The list of pattern names. |
gchar* gimp_patterns_get_pattern (gint *width, gint *height);
Retrieve information about the currently active pattern.
This procedure retrieves information about the currently active pattern. This includes the pattern name, and the pattern extents (width and height). All clone and bucket-fill operations with patterns will use this pattern to control the application of paint to the image.
width : | The pattern width. |
height : | The pattern height. |
Returns : | The pattern name. |
gboolean gimp_patterns_set_pattern (const gchar *name);
Set the specified pattern as the active pattern.
This procedure allows the active pattern mask to be set by specifying its name. The name is simply a string which corresponds to one of the names of the installed patterns. If there is no matching pattern found, this procedure will return an error. Otherwise, the specified pattern becomes active and will be used in all subsequent paint operations.
name : | The pattern name. |
Returns : | TRUE on success. |
gchar* gimp_patterns_get_pattern_data (const gchar *name, gint *width, gint *height, gint *mask_bpp, gint *length, guint8 **mask_data);
Retrieve information about the currently active pattern (including data).
This procedure retrieves information about the currently active pattern. This includes the pattern name, and the pattern extents (width and height). It also returns the pattern data.
name : | The pattern name (\"\" means currently active pattern). |
width : | The pattern width. |
height : | The pattern height. |
mask_bpp : | Pattern bytes per pixel. |
length : | Length of pattern mask data. |
mask_data : | The pattern mask data. |
Returns : | The pattern name. |
<< gimppalette | gimppixelrgn >> |