3
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4
<title>gimpbrush</title>
5
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
6
<link rel="start" href="index.html" title="GIMP Library Reference Manual">
7
<link rel="up" href="libgimp-data.html" title="Data Objects">
8
<link rel="prev" href="libgimp-data.html" title="Data Objects">
9
<link rel="next" href="libgimp-gimpbrushes.html" title="gimpbrushes">
10
<meta name="generator" content="GTK-Doc V1.4 (XML mode)">
11
<link rel="stylesheet" href="style.css" type="text/css">
12
<link rel="part" href="gimpdefinitions.html" title="Part I. GIMP Constants">
13
<link rel="part" href="libgimp.html" title="Part II. GIMP Library">
14
<link rel="chapter" href="libgimp-general.html" title="Functions not Related to Specific Images">
15
<link rel="chapter" href="libgimp-image.html" title="Manupulating Images and all their Properties">
16
<link rel="chapter" href="libgimp-data.html" title="Data Objects">
17
<link rel="chapter" href="libgimp-selectors.html" title="Controlling the Core's Selection Dialogs">
18
<link rel="part" href="libgimpui.html" title="Part III. GIMP User Interface Library">
19
<link rel="chapter" href="libgimpui-hierarchy.html" title="Object Hierarchy">
21
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
22
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
23
<td><a accesskey="p" href="libgimp-data.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
24
<td><a accesskey="u" href="libgimp-data.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
25
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
26
<th width="100%" align="center">GIMP Library Reference Manual</th>
27
<td><a accesskey="n" href="libgimp-gimpbrushes.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
29
<div class="refentry" lang="en">
30
<a name="libgimp-gimpbrush"></a><div class="titlepage"></div>
31
<div class="refnamediv"><table width="100%"><tr>
33
<h2><span class="refentrytitle">gimpbrush</span></h2>
34
<p>gimpbrush — Functions operating on a single brush.</p>
36
<td valign="top" align="right"></td>
38
<div class="refsynopsisdiv">
40
<pre class="synopsis">
44
gchar* <a href="libgimp-gimpbrush.html#gimp-brush-new">gimp_brush_new</a> (const gchar *name);
45
gchar* <a href="libgimp-gimpbrush.html#gimp-brush-duplicate">gimp_brush_duplicate</a> (const gchar *name);
46
gchar* <a href="libgimp-gimpbrush.html#gimp-brush-rename">gimp_brush_rename</a> (const gchar *name,
47
const gchar *new_name);
48
gboolean <a href="libgimp-gimpbrush.html#gimp-brush-delete">gimp_brush_delete</a> (const gchar *name);
49
gboolean <a href="libgimp-gimpbrush.html#gimp-brush-get-info">gimp_brush_get_info</a> (const gchar *name,
54
gboolean <a href="libgimp-gimpbrush.html#gimp-brush-get-pixels">gimp_brush_get_pixels</a> (const gchar *name,
61
gint *num_color_bytes,
62
guint8 **color_bytes);
63
gboolean <a href="libgimp-gimpbrush.html#gimp-brush-get-spacing">gimp_brush_get_spacing</a> (const gchar *name,
65
gboolean <a href="libgimp-gimpbrush.html#gimp-brush-set-spacing">gimp_brush_set_spacing</a> (const gchar *name,
69
<div class="refsect1" lang="en">
70
<a name="id2618407"></a><h2>Description</h2>
72
Functions operating on a single brush.
75
<div class="refsect1" lang="en">
76
<a name="id2618418"></a><h2>Details</h2>
77
<div class="refsect2" lang="en">
78
<a name="id2618424"></a><h3>
79
<a name="gimp-brush-new"></a>gimp_brush_new ()</h3>
80
<a class="indexterm" name="id2618433"></a><pre class="programlisting">gchar* gimp_brush_new (const gchar *name);</pre>
85
This procedure creates a new, uninitialized brush</p>
89
<div class="variablelist"><table border="0">
90
<col align="left" valign="top">
94
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
95
<td> The requested name of the new brush.
100
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
101
<td> The actual new brush name.
111
<div class="refsect2" lang="en">
112
<a name="id2618501"></a><h3>
113
<a name="gimp-brush-duplicate"></a>gimp_brush_duplicate ()</h3>
114
<a class="indexterm" name="id2618510"></a><pre class="programlisting">gchar* gimp_brush_duplicate (const gchar *name);</pre>
119
This procedure creates an identical brush by a different name</p>
123
<div class="variablelist"><table border="0">
124
<col align="left" valign="top">
128
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
134
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
135
<td> The name of the brush's copy.
145
<div class="refsect2" lang="en">
146
<a name="id2618578"></a><h3>
147
<a name="gimp-brush-rename"></a>gimp_brush_rename ()</h3>
148
<a class="indexterm" name="id2618587"></a><pre class="programlisting">gchar* gimp_brush_rename (const gchar *name,
149
const gchar *new_name);</pre>
154
This procedure renames a brush</p>
158
<div class="variablelist"><table border="0">
159
<col align="left" valign="top">
163
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
169
<span class="term"><em class="parameter"><code>new_name</code></em> :</span></td>
170
<td> The new name of the brush.
175
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
176
<td> The actual new name of the brush.
186
<div class="refsect2" lang="en">
187
<a name="id2616277"></a><h3>
188
<a name="gimp-brush-delete"></a>gimp_brush_delete ()</h3>
189
<a class="indexterm" name="id2616286"></a><pre class="programlisting">gboolean gimp_brush_delete (const gchar *name);</pre>
194
This procedure deletes a brush</p>
198
<div class="variablelist"><table border="0">
199
<col align="left" valign="top">
203
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
209
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
210
<td> TRUE on success.
220
<div class="refsect2" lang="en">
221
<a name="id2616352"></a><h3>
222
<a name="gimp-brush-get-info"></a>gimp_brush_get_info ()</h3>
223
<a class="indexterm" name="id2616361"></a><pre class="programlisting">gboolean gimp_brush_get_info (const gchar *name,
227
gint *color_bpp);</pre>
229
Retrieve information about the specified brush.
232
This procedure retrieves information about the specified brush. This
233
includes the brush name, and the brush extents (width and height).</p>
237
<div class="variablelist"><table border="0">
238
<col align="left" valign="top">
242
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
248
<span class="term"><em class="parameter"><code>width</code></em> :</span></td>
249
<td> The brush width.
254
<span class="term"><em class="parameter"><code>height</code></em> :</span></td>
255
<td> The brush height.
260
<span class="term"><em class="parameter"><code>mask_bpp</code></em> :</span></td>
261
<td> The brush mask bpp.
266
<span class="term"><em class="parameter"><code>color_bpp</code></em> :</span></td>
267
<td> The brush color bpp.
272
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
273
<td> TRUE on success.
283
<div class="refsect2" lang="en">
284
<a name="id2616514"></a><h3>
285
<a name="gimp-brush-get-pixels"></a>gimp_brush_get_pixels ()</h3>
286
<a class="indexterm" name="id2616523"></a><pre class="programlisting">gboolean gimp_brush_get_pixels (const gchar *name,
290
gint *num_mask_bytes,
293
gint *num_color_bytes,
294
guint8 **color_bytes);</pre>
296
Retrieve information about the specified brush.
299
This procedure retrieves information about the specified brush. This
300
includes the brush extents (width and height) and its pixels data.</p>
304
<div class="variablelist"><table border="0">
305
<col align="left" valign="top">
309
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
315
<span class="term"><em class="parameter"><code>width</code></em> :</span></td>
316
<td> The brush width.
321
<span class="term"><em class="parameter"><code>height</code></em> :</span></td>
322
<td> The brush height.
327
<span class="term"><em class="parameter"><code>mask_bpp</code></em> :</span></td>
328
<td> The brush mask bpp.
333
<span class="term"><em class="parameter"><code>num_mask_bytes</code></em> :</span></td>
334
<td> Length of brush mask data.
339
<span class="term"><em class="parameter"><code>mask_bytes</code></em> :</span></td>
340
<td> The brush mask data.
345
<span class="term"><em class="parameter"><code>color_bpp</code></em> :</span></td>
346
<td> The brush color bpp.
351
<span class="term"><em class="parameter"><code>num_color_bytes</code></em> :</span></td>
352
<td> Length of brush color data.
357
<span class="term"><em class="parameter"><code>color_bytes</code></em> :</span></td>
358
<td> The brush color data.
363
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
364
<td> TRUE on success.
374
<div class="refsect2" lang="en">
375
<a name="id2620744"></a><h3>
376
<a name="gimp-brush-get-spacing"></a>gimp_brush_get_spacing ()</h3>
377
<a class="indexterm" name="id2620753"></a><pre class="programlisting">gboolean gimp_brush_get_spacing (const gchar *name,
378
gint *spacing);</pre>
380
Get the brush spacing.
383
This procedure returns the spacing setting for the specified brush.
384
The return value is an integer between 0 and 1000 which represents
385
percentage of the maximum of the width and height of the mask.</p>
389
<div class="variablelist"><table border="0">
390
<col align="left" valign="top">
394
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
400
<span class="term"><em class="parameter"><code>spacing</code></em> :</span></td>
401
<td> The brush spacing.
406
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
407
<td> TRUE on success.
417
<div class="refsect2" lang="en">
418
<a name="id2620844"></a><h3>
419
<a name="gimp-brush-set-spacing"></a>gimp_brush_set_spacing ()</h3>
420
<a class="indexterm" name="id2620853"></a><pre class="programlisting">gboolean gimp_brush_set_spacing (const gchar *name,
423
Set the brush spacing.
426
This procedure modifies the spacing setting for the specified brush.
427
The value should be a integer between 0 and 1000.</p>
431
<div class="variablelist"><table border="0">
432
<col align="left" valign="top">
436
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
442
<span class="term"><em class="parameter"><code>spacing</code></em> :</span></td>
443
<td> The brush spacing.
448
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
449
<td> TRUE on success.
460
<table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle">
461
<td align="left"><a accesskey="p" href="libgimp-data.html"><b><< Data Objects</b></a></td>
462
<td align="right"><a accesskey="n" href="libgimp-gimpbrushes.html"><b>gimpbrushes >></b></a></td>