gimpbrush3LIBGIMP LibrarygimpbrushFunctions operating on a single brush.Synopsis
gchar* gimp_brush_new (const gchar *name);
gchar* gimp_brush_duplicate (const gchar *name);
gchar* gimp_brush_rename (const gchar *name,
const gchar *new_name);
gboolean gimp_brush_delete (const gchar *name);
gboolean gimp_brush_get_info (const gchar *name,
gint *width,
gint *height,
gint *mask_bpp,
gint *color_bpp);
gboolean gimp_brush_get_pixels (const gchar *name,
gint *width,
gint *height,
gint *mask_bpp,
gint *num_mask_bytes,
guint8 **mask_bytes,
gint *color_bpp,
gint *num_color_bytes,
guint8 **color_bytes);
gboolean gimp_brush_get_spacing (const gchar *name,
gint *spacing);
gboolean gimp_brush_set_spacing (const gchar *name,
gint spacing);
GimpBrushGeneratedShape gimp_brush_get_shape (const gchar *name);
GimpBrushGeneratedShape gimp_brush_set_shape (const gchar *name,
GimpBrushGeneratedShape shape_in);
gint gimp_brush_get_spikes (const gchar *name);
gint gimp_brush_set_spikes (const gchar *name,
gint spikes_in);
gdouble gimp_brush_get_angle (const gchar *name);
gdouble gimp_brush_set_angle (const gchar *name,
gdouble angle_in);
gdouble gimp_brush_get_radius (const gchar *name);
gdouble gimp_brush_set_radius (const gchar *name,
gdouble radius_in);
gdouble gimp_brush_get_aspect_ratio (const gchar *name);
gdouble gimp_brush_set_aspect_ratio (const gchar *name,
gdouble aspect_ratio_in);
gdouble gimp_brush_get_hardness (const gchar *name);
gdouble gimp_brush_set_hardness (const gchar *name,
gdouble hardness_in);
gboolean gimp_brush_is_generated (const gchar *name);
gboolean gimp_brush_is_editable (const gchar *name);
Description
Functions operating on a single brush.
Detailsgimp_brush_new ()gimp_brush_newgchar* gimp_brush_new (const gchar *name);
Creates a new brush
This procedure creates a new, uninitialized brushname : The requested name of the new brush.
Returns : The actual new brush name.
Since GIMP 2.2
gimp_brush_duplicate ()gimp_brush_duplicategchar* gimp_brush_duplicate (const gchar *name);
Duplicates a brush
This procedure creates an identical brush by a different namename : The brush name.
Returns : The name of the brush's copy.
Since GIMP 2.2
gimp_brush_rename ()gimp_brush_renamegchar* gimp_brush_rename (const gchar *name,
const gchar *new_name);
Rename a brush
This procedure renames a brushname : The brush name.
new_name : The new name of the brush.
Returns : The actual new name of the brush.
Since GIMP 2.2
gimp_brush_delete ()gimp_brush_deletegboolean gimp_brush_delete (const gchar *name);
Deletes a brush
This procedure deletes a brushname : The brush name.
Returns : TRUE on success.
Since GIMP 2.2
gimp_brush_get_info ()gimp_brush_get_infogboolean gimp_brush_get_info (const gchar *name,
gint *width,
gint *height,
gint *mask_bpp,
gint *color_bpp);
Retrieve information about the specified brush.
This procedure retrieves information about the specified brush. This
includes the brush name, and the brush extents (width and height).name : The brush name.
width : The brush width.
height : The brush height.
mask_bpp : The brush mask bpp.
color_bpp : The brush color bpp.
Returns : TRUE on success.
Since GIMP 2.2
gimp_brush_get_pixels ()gimp_brush_get_pixelsgboolean gimp_brush_get_pixels (const gchar *name,
gint *width,
gint *height,
gint *mask_bpp,
gint *num_mask_bytes,
guint8 **mask_bytes,
gint *color_bpp,
gint *num_color_bytes,
guint8 **color_bytes);
Retrieve information about the specified brush.
This procedure retrieves information about the specified brush. This
includes the brush extents (width and height) and its pixels data.name : The brush name.
width : The brush width.
height : The brush height.
mask_bpp : The brush mask bpp.
num_mask_bytes : Length of brush mask data.
mask_bytes : The brush mask data.
color_bpp : The brush color bpp.
num_color_bytes : Length of brush color data.
color_bytes : The brush color data.
Returns : TRUE on success.
Since GIMP 2.2
gimp_brush_get_spacing ()gimp_brush_get_spacinggboolean gimp_brush_get_spacing (const gchar *name,
gint *spacing);
Get the brush spacing.
This procedure returns the spacing setting for the specified brush.
The return value is an integer between 0 and 1000 which represents
percentage of the maximum of the width and height of the mask.name : The brush name.
spacing : The brush spacing.
Returns : TRUE on success.
Since GIMP 2.2
gimp_brush_set_spacing ()gimp_brush_set_spacinggboolean gimp_brush_set_spacing (const gchar *name,
gint spacing);
Set the brush spacing.
This procedure modifies the spacing setting for the specified brush.
The value should be a integer between 0 and 1000.name : The brush name.
spacing : The brush spacing.
Returns : TRUE on success.
Since GIMP 2.4
gimp_brush_get_shape ()gimp_brush_get_shapeGimpBrushGeneratedShape gimp_brush_get_shape (const gchar *name);
Get the shape of a generated brush.
This procedure gets the shape value for a generated brush. If called
for any other type of brush, it does not succeed. The current
possibilities are Circle (GIMP_BRUSH_GENERATED_CIRCLE), Square
(GIMP_BRUSH_GENERATED_SQUARE), and Diamond
(GIMP_BRUSH_GENERATED_DIAMOND). Other shapes are likely to be added
in the future.name : The brush name.
Returns : The brush shape.
Since GIMP 2.4
gimp_brush_set_shape ()gimp_brush_set_shapeGimpBrushGeneratedShape gimp_brush_set_shape (const gchar *name,
GimpBrushGeneratedShape shape_in);
Set the shape of a generated brush.
This procedure sets the shape value for a generated brush. If called
for any other type of brush, it does not succeed. The current
possibilities are Circle (GIMP_BRUSH_GENERATED_CIRCLE), Square
(GIMP_BRUSH_GENERATED_SQUARE), and Diamond
(GIMP_BRUSH_GENERATED_DIAMOND). Other shapes are likely to be added
in the future.name : The brush name.
shape_in : The brush shape.
Returns : The brush shape actually assigned.
Since GIMP 2.4
gimp_brush_get_spikes ()gimp_brush_get_spikesgint gimp_brush_get_spikes (const gchar *name);
Get the number of spikes for a generated brush.
This procedure gets the number of spikes for a generated brush. If
called for any other type of brush, it does not succeed.name : The brush name.
Returns : The number of spikes on the brush.
Since GIMP 2.4
gimp_brush_set_spikes ()gimp_brush_set_spikesgint gimp_brush_set_spikes (const gchar *name,
gint spikes_in);
Set the number of spikes for a generated brush.
This procedure sets the number of spikes for a generated brush. If
called for any other type of brush, it does not succeed.name : The brush name.
spikes_in : The desired number of spikes.
Returns : The number of spikes actually assigned.
Since GIMP 2.4
gimp_brush_get_angle ()gimp_brush_get_anglegdouble gimp_brush_get_angle (const gchar *name);
Get the rotation angle of a generated brush.
This procedure gets the angle of rotation for a generated brush. If
called for any other type of brush, it does not succeed.name : The brush name.
Returns : The rotation angle of the brush.
Since GIMP 2.4
gimp_brush_set_angle ()gimp_brush_set_anglegdouble gimp_brush_set_angle (const gchar *name,
gdouble angle_in);
Set the rotation angle of a generated brush.
This procedure sets the rotation angle for a generated brush. If
called for any other type of brush, it does not succeed.name : The brush name.
angle_in : The desired brush rotation angle.
Returns : The brush rotation angle actually assigned.
Since GIMP 2.4
gimp_brush_get_radius ()gimp_brush_get_radiusgdouble gimp_brush_get_radius (const gchar *name);
Get the radius of a generated brush.
This procedure gets the radius value for a generated brush. If
called for any other type of brush, it does not succeed.name : The brush name.
Returns : The radius of the brush in pixels.
Since GIMP 2.4
gimp_brush_set_radius ()gimp_brush_set_radiusgdouble gimp_brush_set_radius (const gchar *name,
gdouble radius_in);
Set the radius of a generated brush.
This procedure sets the radius for a generated brush. If called for
any other type of brush, it does not succeed.name : The brush name.
radius_in : The desired brush radius.
Returns : The brush radius actually assigned.
Since GIMP 2.4
gimp_brush_get_aspect_ratio ()gimp_brush_get_aspect_ratiogdouble gimp_brush_get_aspect_ratio (const gchar *name);
Get the aspect ratio of a generated brush.
This procedure gets the aspect ratio of a generated brush. If called
for any other type of brush, it does not succeed.name : The brush name.
Returns : The aspect ratio of the brush.
Since GIMP 2.4
gimp_brush_set_aspect_ratio ()gimp_brush_set_aspect_ratiogdouble gimp_brush_set_aspect_ratio (const gchar *name,
gdouble aspect_ratio_in);
Set the aspect ratio of a generated brush.
This procedure sets the aspect ratio for a generated brush. If
called for any other type of brush, it does not succeed.name : The brush name.
aspect_ratio_in : The desired brush aspect ratio.
Returns : The brush aspect ratio actually assigned.
Since GIMP 2.4
gimp_brush_get_hardness ()gimp_brush_get_hardnessgdouble gimp_brush_get_hardness (const gchar *name);
Get the hardness of a generated brush.
This procedure gets the hardness of a generated brush. The hardness
of a brush is the amount its intensity fades at the outside edge. If
called for any other type of brush, the function does not succeed.name : The brush name.
Returns : The hardness of the brush.
Since GIMP 2.4
gimp_brush_set_hardness ()gimp_brush_set_hardnessgdouble gimp_brush_set_hardness (const gchar *name,
gdouble hardness_in);
Set the hardness of a generated brush.
This procedure sets the hardness for a generated brush. If called
for any other type of brush, it does not succeed.name : The brush name.
hardness_in : The desired brush hardness.
Returns : The brush hardness actually assigned.
Since GIMP 2.4
gimp_brush_is_generated ()gimp_brush_is_generatedgboolean gimp_brush_is_generated (const gchar *name);
Tests if brush is generated
Returns TRUE if this brush is parametric, FALSE for other typesname : The brush name.
Returns : TRUE if the brush is generated.
Since GIMP 2.4
gimp_brush_is_editable ()gimp_brush_is_editablegboolean gimp_brush_is_editable (const gchar *name);
Tests if brush can be edited
Returns TRUE if you have permission to change the brushname : The brush name.
Returns : TRUE if the brush can be edited.
Since GIMP 2.4