52
gchar* <a href="libgimp-gimpbrush.html#gimp-brush-new">gimp_brush_new</a> (const gchar *name);
53
gchar* <a href="libgimp-gimpbrush.html#gimp-brush-duplicate">gimp_brush_duplicate</a> (const gchar *name);
54
gchar* <a href="libgimp-gimpbrush.html#gimp-brush-rename">gimp_brush_rename</a> (const gchar *name,
55
const gchar *new_name);
56
gboolean <a href="libgimp-gimpbrush.html#gimp-brush-delete">gimp_brush_delete</a> (const gchar *name);
57
gboolean <a href="libgimp-gimpbrush.html#gimp-brush-get-info">gimp_brush_get_info</a> (const gchar *name,
62
gboolean <a href="libgimp-gimpbrush.html#gimp-brush-get-pixels">gimp_brush_get_pixels</a> (const gchar *name,
69
gint *num_color_bytes,
70
guint8 **color_bytes);
71
gboolean <a href="libgimp-gimpbrush.html#gimp-brush-get-spacing">gimp_brush_get_spacing</a> (const gchar *name,
73
gboolean <a href="libgimp-gimpbrush.html#gimp-brush-set-spacing">gimp_brush_set_spacing</a> (const gchar *name,
55
gchar* <a href="libgimp-gimpbrush.html#gimp-brush-new">gimp_brush_new</a> (const gchar *name);
56
gchar* <a href="libgimp-gimpbrush.html#gimp-brush-duplicate">gimp_brush_duplicate</a> (const gchar *name);
57
gchar* <a href="libgimp-gimpbrush.html#gimp-brush-rename">gimp_brush_rename</a> (const gchar *name,
58
const gchar *new_name);
59
gboolean <a href="libgimp-gimpbrush.html#gimp-brush-delete">gimp_brush_delete</a> (const gchar *name);
60
gboolean <a href="libgimp-gimpbrush.html#gimp-brush-get-info">gimp_brush_get_info</a> (const gchar *name,
65
gboolean <a href="libgimp-gimpbrush.html#gimp-brush-get-pixels">gimp_brush_get_pixels</a> (const gchar *name,
72
gint *num_color_bytes,
73
guint8 **color_bytes);
74
gboolean <a href="libgimp-gimpbrush.html#gimp-brush-get-spacing">gimp_brush_get_spacing</a> (const gchar *name,
76
gboolean <a href="libgimp-gimpbrush.html#gimp-brush-set-spacing">gimp_brush_set_spacing</a> (const gchar *name,
78
<a href="libgimp-gimpenums.html#GimpBrushGeneratedShape">GimpBrushGeneratedShape</a> <a href="libgimp-gimpbrush.html#gimp-brush-get-shape">gimp_brush_get_shape</a> (const gchar *name);
79
<a href="libgimp-gimpenums.html#GimpBrushGeneratedShape">GimpBrushGeneratedShape</a> <a href="libgimp-gimpbrush.html#gimp-brush-set-shape">gimp_brush_set_shape</a> (const gchar *name,
80
<a href="libgimp-gimpenums.html#GimpBrushGeneratedShape">GimpBrushGeneratedShape</a> shape_in);
81
gint <a href="libgimp-gimpbrush.html#gimp-brush-get-spikes">gimp_brush_get_spikes</a> (const gchar *name);
82
gint <a href="libgimp-gimpbrush.html#gimp-brush-set-spikes">gimp_brush_set_spikes</a> (const gchar *name,
84
gdouble <a href="libgimp-gimpbrush.html#gimp-brush-get-angle">gimp_brush_get_angle</a> (const gchar *name);
85
gdouble <a href="libgimp-gimpbrush.html#gimp-brush-set-angle">gimp_brush_set_angle</a> (const gchar *name,
87
gdouble <a href="libgimp-gimpbrush.html#gimp-brush-get-radius">gimp_brush_get_radius</a> (const gchar *name);
88
gdouble <a href="libgimp-gimpbrush.html#gimp-brush-set-radius">gimp_brush_set_radius</a> (const gchar *name,
90
gdouble <a href="libgimp-gimpbrush.html#gimp-brush-get-aspect-ratio">gimp_brush_get_aspect_ratio</a> (const gchar *name);
91
gdouble <a href="libgimp-gimpbrush.html#gimp-brush-set-aspect-ratio">gimp_brush_set_aspect_ratio</a> (const gchar *name,
92
gdouble aspect_ratio_in);
93
gdouble <a href="libgimp-gimpbrush.html#gimp-brush-get-hardness">gimp_brush_get_hardness</a> (const gchar *name);
94
gdouble <a href="libgimp-gimpbrush.html#gimp-brush-set-hardness">gimp_brush_set_hardness</a> (const gchar *name,
96
gboolean <a href="libgimp-gimpbrush.html#gimp-brush-is-generated">gimp_brush_is_generated</a> (const gchar *name);
97
gboolean <a href="libgimp-gimpbrush.html#gimp-brush-is-editable">gimp_brush_is_editable</a> (const gchar *name);
77
100
<div class="refsect1" lang="en">
78
<a name="id2626924"></a><h2>Description</h2>
101
<a name="id2684357"></a><h2>Description</h2>
80
103
Functions operating on a single brush.
83
106
<div class="refsect1" lang="en">
84
<a name="id2626939"></a><h2>Details</h2>
107
<a name="id2684373"></a><h2>Details</h2>
85
108
<div class="refsect2" lang="en">
86
<a name="id2626950"></a><h3>
109
<a name="id2684383"></a><h3>
87
110
<a name="gimp-brush-new"></a>gimp_brush_new ()</h3>
88
<a class="indexterm" name="id2626965"></a><pre class="programlisting">gchar* gimp_brush_new (const gchar *name);</pre>
111
<a class="indexterm" name="id2684396"></a><pre class="programlisting">gchar* gimp_brush_new (const gchar *name);</pre>
90
113
Creates a new brush
440
435
<col align="left" valign="top">
444
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
438
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
445
439
<td> The brush name.
450
<span class="term"><em class="parameter"><code>spacing</code></em> :</span></td>
443
<td><span class="term"><em class="parameter"><code>spacing</code></em> :</span></td>
451
444
<td> The brush spacing.
456
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
448
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
457
449
<td> TRUE on success.
455
<p class="since">Since GIMP 2.4
459
<div class="refsect2" lang="en">
460
<a name="id2672749"></a><h3>
461
<a name="gimp-brush-get-shape"></a>gimp_brush_get_shape ()</h3>
462
<a class="indexterm" name="id2672763"></a><pre class="programlisting"><a href="libgimp-gimpenums.html#GimpBrushGeneratedShape">GimpBrushGeneratedShape</a> gimp_brush_get_shape (const gchar *name);</pre>
464
Get the shape of a generated brush.
467
This procedure gets the shape value for a generated brush. If called
468
for any other type of brush, it does not succeed. The current
469
possibilities are Circle (GIMP_BRUSH_GENERATED_CIRCLE), Square
470
(GIMP_BRUSH_GENERATED_SQUARE), and Diamond
471
(GIMP_BRUSH_GENERATED_DIAMOND). Other shapes are likely to be added
476
<div class="variablelist"><table border="0">
477
<col align="left" valign="top">
480
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
485
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
486
<td> The brush shape.
492
<p class="since">Since GIMP 2.4
496
<div class="refsect2" lang="en">
497
<a name="id2672837"></a><h3>
498
<a name="gimp-brush-set-shape"></a>gimp_brush_set_shape ()</h3>
499
<a class="indexterm" name="id2672851"></a><pre class="programlisting"><a href="libgimp-gimpenums.html#GimpBrushGeneratedShape">GimpBrushGeneratedShape</a> gimp_brush_set_shape (const gchar *name,
500
<a href="libgimp-gimpenums.html#GimpBrushGeneratedShape">GimpBrushGeneratedShape</a> shape_in);</pre>
502
Set the shape of a generated brush.
505
This procedure sets the shape value for a generated brush. If called
506
for any other type of brush, it does not succeed. The current
507
possibilities are Circle (GIMP_BRUSH_GENERATED_CIRCLE), Square
508
(GIMP_BRUSH_GENERATED_SQUARE), and Diamond
509
(GIMP_BRUSH_GENERATED_DIAMOND). Other shapes are likely to be added
514
<div class="variablelist"><table border="0">
515
<col align="left" valign="top">
518
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
523
<td><span class="term"><em class="parameter"><code>shape_in</code></em> :</span></td>
524
<td> The brush shape.
528
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
529
<td> The brush shape actually assigned.
535
<p class="since">Since GIMP 2.4
539
<div class="refsect2" lang="en">
540
<a name="id2672946"></a><h3>
541
<a name="gimp-brush-get-spikes"></a>gimp_brush_get_spikes ()</h3>
542
<a class="indexterm" name="id2672960"></a><pre class="programlisting">gint gimp_brush_get_spikes (const gchar *name);</pre>
544
Get the number of spikes for a generated brush.
547
This procedure gets the number of spikes for a generated brush. If
548
called for any other type of brush, it does not succeed.</p>
552
<div class="variablelist"><table border="0">
553
<col align="left" valign="top">
556
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
561
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
562
<td> The number of spikes on the brush.
568
<p class="since">Since GIMP 2.4
572
<div class="refsect2" lang="en">
573
<a name="id2673033"></a><h3>
574
<a name="gimp-brush-set-spikes"></a>gimp_brush_set_spikes ()</h3>
575
<a class="indexterm" name="id2673047"></a><pre class="programlisting">gint gimp_brush_set_spikes (const gchar *name,
576
gint spikes_in);</pre>
578
Set the number of spikes for a generated brush.
581
This procedure sets the number of spikes for a generated brush. If
582
called for any other type of brush, it does not succeed.</p>
586
<div class="variablelist"><table border="0">
587
<col align="left" valign="top">
590
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
595
<td><span class="term"><em class="parameter"><code>spikes_in</code></em> :</span></td>
596
<td> The desired number of spikes.
600
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
601
<td> The number of spikes actually assigned.
607
<p class="since">Since GIMP 2.4
611
<div class="refsect2" lang="en">
612
<a name="id2673141"></a><h3>
613
<a name="gimp-brush-get-angle"></a>gimp_brush_get_angle ()</h3>
614
<a class="indexterm" name="id2673155"></a><pre class="programlisting">gdouble gimp_brush_get_angle (const gchar *name);</pre>
616
Get the rotation angle of a generated brush.
619
This procedure gets the angle of rotation for a generated brush. If
620
called for any other type of brush, it does not succeed.</p>
624
<div class="variablelist"><table border="0">
625
<col align="left" valign="top">
628
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
633
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
634
<td> The rotation angle of the brush.
640
<p class="since">Since GIMP 2.4
644
<div class="refsect2" lang="en">
645
<a name="id2673228"></a><h3>
646
<a name="gimp-brush-set-angle"></a>gimp_brush_set_angle ()</h3>
647
<a class="indexterm" name="id2673242"></a><pre class="programlisting">gdouble gimp_brush_set_angle (const gchar *name,
648
gdouble angle_in);</pre>
650
Set the rotation angle of a generated brush.
653
This procedure sets the rotation angle for a generated brush. If
654
called for any other type of brush, it does not succeed.</p>
658
<div class="variablelist"><table border="0">
659
<col align="left" valign="top">
662
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
667
<td><span class="term"><em class="parameter"><code>angle_in</code></em> :</span></td>
668
<td> The desired brush rotation angle.
672
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
673
<td> The brush rotation angle actually assigned.
679
<p class="since">Since GIMP 2.4
683
<div class="refsect2" lang="en">
684
<a name="id2673337"></a><h3>
685
<a name="gimp-brush-get-radius"></a>gimp_brush_get_radius ()</h3>
686
<a class="indexterm" name="id2673351"></a><pre class="programlisting">gdouble gimp_brush_get_radius (const gchar *name);</pre>
688
Get the radius of a generated brush.
691
This procedure gets the radius value for a generated brush. If
692
called for any other type of brush, it does not succeed.</p>
696
<div class="variablelist"><table border="0">
697
<col align="left" valign="top">
700
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
705
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
706
<td> The radius of the brush in pixels.
712
<p class="since">Since GIMP 2.4
716
<div class="refsect2" lang="en">
717
<a name="id2673423"></a><h3>
718
<a name="gimp-brush-set-radius"></a>gimp_brush_set_radius ()</h3>
719
<a class="indexterm" name="id2673437"></a><pre class="programlisting">gdouble gimp_brush_set_radius (const gchar *name,
720
gdouble radius_in);</pre>
722
Set the radius of a generated brush.
725
This procedure sets the radius for a generated brush. If called for
726
any other type of brush, it does not succeed.</p>
730
<div class="variablelist"><table border="0">
731
<col align="left" valign="top">
734
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
739
<td><span class="term"><em class="parameter"><code>radius_in</code></em> :</span></td>
740
<td> The desired brush radius.
744
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
745
<td> The brush radius actually assigned.
751
<p class="since">Since GIMP 2.4
755
<div class="refsect2" lang="en">
756
<a name="id2673530"></a><h3>
757
<a name="gimp-brush-get-aspect-ratio"></a>gimp_brush_get_aspect_ratio ()</h3>
758
<a class="indexterm" name="id2673544"></a><pre class="programlisting">gdouble gimp_brush_get_aspect_ratio (const gchar *name);</pre>
760
Get the aspect ratio of a generated brush.
763
This procedure gets the aspect ratio of a generated brush. If called
764
for any other type of brush, it does not succeed.</p>
768
<div class="variablelist"><table border="0">
769
<col align="left" valign="top">
772
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
777
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
778
<td> The aspect ratio of the brush.
784
<p class="since">Since GIMP 2.4
788
<div class="refsect2" lang="en">
789
<a name="id2673617"></a><h3>
790
<a name="gimp-brush-set-aspect-ratio"></a>gimp_brush_set_aspect_ratio ()</h3>
791
<a class="indexterm" name="id2673630"></a><pre class="programlisting">gdouble gimp_brush_set_aspect_ratio (const gchar *name,
792
gdouble aspect_ratio_in);</pre>
794
Set the aspect ratio of a generated brush.
797
This procedure sets the aspect ratio for a generated brush. If
798
called for any other type of brush, it does not succeed.</p>
802
<div class="variablelist"><table border="0">
803
<col align="left" valign="top">
806
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
811
<td><span class="term"><em class="parameter"><code>aspect_ratio_in</code></em> :</span></td>
812
<td> The desired brush aspect ratio.
816
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
817
<td> The brush aspect ratio actually assigned.
823
<p class="since">Since GIMP 2.4
827
<div class="refsect2" lang="en">
828
<a name="id2673726"></a><h3>
829
<a name="gimp-brush-get-hardness"></a>gimp_brush_get_hardness ()</h3>
830
<a class="indexterm" name="id2673740"></a><pre class="programlisting">gdouble gimp_brush_get_hardness (const gchar *name);</pre>
832
Get the hardness of a generated brush.
835
This procedure gets the hardness of a generated brush. The hardness
836
of a brush is the amount its intensity fades at the outside edge. If
837
called for any other type of brush, the function does not succeed.</p>
841
<div class="variablelist"><table border="0">
842
<col align="left" valign="top">
845
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
850
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
851
<td> The hardness of the brush.
857
<p class="since">Since GIMP 2.4
861
<div class="refsect2" lang="en">
862
<a name="id2673814"></a><h3>
863
<a name="gimp-brush-set-hardness"></a>gimp_brush_set_hardness ()</h3>
864
<a class="indexterm" name="id2673828"></a><pre class="programlisting">gdouble gimp_brush_set_hardness (const gchar *name,
865
gdouble hardness_in);</pre>
867
Set the hardness of a generated brush.
870
This procedure sets the hardness for a generated brush. If called
871
for any other type of brush, it does not succeed.</p>
875
<div class="variablelist"><table border="0">
876
<col align="left" valign="top">
879
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
884
<td><span class="term"><em class="parameter"><code>hardness_in</code></em> :</span></td>
885
<td> The desired brush hardness.
889
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
890
<td> The brush hardness actually assigned.
896
<p class="since">Since GIMP 2.4
900
<div class="refsect2" lang="en">
901
<a name="id2673923"></a><h3>
902
<a name="gimp-brush-is-generated"></a>gimp_brush_is_generated ()</h3>
903
<a class="indexterm" name="id2673936"></a><pre class="programlisting">gboolean gimp_brush_is_generated (const gchar *name);</pre>
905
Tests if brush is generated
908
Returns TRUE if this brush is parametric, FALSE for other types</p>
912
<div class="variablelist"><table border="0">
913
<col align="left" valign="top">
916
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
921
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
922
<td> TRUE if the brush is generated.
928
<p class="since">Since GIMP 2.4
932
<div class="refsect2" lang="en">
933
<a name="id2674008"></a><h3>
934
<a name="gimp-brush-is-editable"></a>gimp_brush_is_editable ()</h3>
935
<a class="indexterm" name="id2674022"></a><pre class="programlisting">gboolean gimp_brush_is_editable (const gchar *name);</pre>
937
Tests if brush can be edited
940
Returns TRUE if you have permission to change the brush</p>
944
<div class="variablelist"><table border="0">
945
<col align="left" valign="top">
948
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
953
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
954
<td> TRUE if the brush can be edited.
960
<p class="since">Since GIMP 2.4