Top |
Functions
Functions
gimp_brush_new ()
gchar *
gimp_brush_new (const gchar *name
);
Creates a new brush.
This procedure creates a new, uninitialized brush.
Since: 2.2
gimp_brush_duplicate ()
gchar *
gimp_brush_duplicate (const gchar *name
);
Duplicates a brush.
This procedure creates an identical brush by a different name.
Since: 2.2
gimp_brush_rename ()
gchar * gimp_brush_rename (const gchar *name
,const gchar *new_name
);
Renames a brush.
This procedure renames a brush.
Since: 2.2
gimp_brush_delete ()
gboolean
gimp_brush_delete (const gchar *name
);
Deletes a brush.
This procedure deletes a brush.
Since: 2.2
gimp_brush_get_info ()
gboolean gimp_brush_get_info (const gchar *name
,gint *width
,gint *height
,gint *mask_bpp
,gint *color_bpp
);
Retrieves information about the specified brush.
This procedure retrieves information about the specified brush: brush extents (width and height), color depth and mask depth.
Parameters
name |
The brush name. |
|
width |
The brush width. |
|
height |
The brush height. |
|
mask_bpp |
The brush mask bpp. |
|
color_bpp |
The brush color bpp. |
Since: 2.2
gimp_brush_get_pixels ()
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
);
Retrieves 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.
Parameters
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. |
Since: 2.2
gimp_brush_get_spacing ()
gboolean gimp_brush_get_spacing (const gchar *name
,gint *spacing
);
Gets 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.
Since: 2.2
gimp_brush_set_spacing ()
gboolean gimp_brush_set_spacing (const gchar *name
,gint spacing
);
Sets the brush spacing.
This procedure modifies the spacing setting for the specified brush. The value should be a integer between 0 and 1000.
Since: 2.4
gimp_brush_get_shape ()
GimpBrushGeneratedShape
gimp_brush_get_shape (const gchar *name
);
Gets 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.
Since: 2.4
gimp_brush_set_shape ()
GimpBrushGeneratedShape gimp_brush_set_shape (const gchar *name
,GimpBrushGeneratedShape shape_in
);
Sets 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.
Since: 2.4
gimp_brush_get_spikes ()
gint
gimp_brush_get_spikes (const gchar *name
);
Gets 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.
Since: 2.4
gimp_brush_set_spikes ()
gint gimp_brush_set_spikes (const gchar *name
,gint spikes_in
);
Sets 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.
Since: 2.4
gimp_brush_get_angle ()
gdouble
gimp_brush_get_angle (const gchar *name
);
Gets 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.
Since: 2.4
gimp_brush_set_angle ()
gdouble gimp_brush_set_angle (const gchar *name
,gdouble angle_in
);
Sets 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.
Since: 2.4
gimp_brush_get_radius ()
gdouble
gimp_brush_get_radius (const gchar *name
);
Gets 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.
Since: 2.4
gimp_brush_set_radius ()
gdouble gimp_brush_set_radius (const gchar *name
,gdouble radius_in
);
Sets 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.
Since: 2.4
gimp_brush_get_aspect_ratio ()
gdouble
gimp_brush_get_aspect_ratio (const gchar *name
);
Gets 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. The return value is a float between 0.0 and 1000.0.
Since: 2.4
gimp_brush_set_aspect_ratio ()
gdouble gimp_brush_set_aspect_ratio (const gchar *name
,gdouble aspect_ratio_in
);
Sets 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. The value should be a float between 0.0 and 1000.0.
Since: 2.4
gimp_brush_get_hardness ()
gdouble
gimp_brush_get_hardness (const gchar *name
);
Gets 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, as a float between 0.0 and 1.0. If called for any other type of brush, the function does not succeed.
Since: 2.4
gimp_brush_set_hardness ()
gdouble gimp_brush_set_hardness (const gchar *name
,gdouble hardness_in
);
Sets 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. The value should be a float between 0.0 and 1.0.
Since: 2.4
gimp_brush_is_generated ()
gboolean
gimp_brush_is_generated (const gchar *name
);
Tests if brush is generated.
Returns TRUE if this brush is parametric, FALSE for other types.
Since: 2.4