1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
5
<refentry id="libgimp-gimpcontext">
7
<refentrytitle role="top_of_page" id="libgimp-gimpcontext.top_of_page">gimpcontext</refentrytitle>
8
<manvolnum>3</manvolnum>
9
<refmiscinfo>LIBGIMP Library</refmiscinfo>
13
<refname>gimpcontext</refname>
14
<refpurpose>Functions to manipulate a plug-in's context.</refpurpose>
17
<refsynopsisdiv id="libgimp-gimpcontext.synopsis" role="synopsis">
18
<title role="synopsis.title">Synopsis</title>
21
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-push">gimp_context_push</link> (void);
22
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-pop">gimp_context_pop</link> (void);
23
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-get-foreground">gimp_context_get_foreground</link> (<link linkend="GimpRGB">GimpRGB</link> *foreground);
24
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-foreground">gimp_context_set_foreground</link> (const <link linkend="GimpRGB">GimpRGB</link> *foreground);
25
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-get-background">gimp_context_get_background</link> (<link linkend="GimpRGB">GimpRGB</link> *background);
26
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-background">gimp_context_set_background</link> (const <link linkend="GimpRGB">GimpRGB</link> *background);
27
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-default-colors">gimp_context_set_default_colors</link> (void);
28
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-swap-colors">gimp_context_swap_colors</link> (void);
29
<link linkend="gdouble">gdouble</link> <link linkend="gimp-context-get-opacity">gimp_context_get_opacity</link> (void);
30
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-opacity">gimp_context_set_opacity</link> (<link linkend="gdouble">gdouble</link> opacity);
31
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> <link linkend="gimp-context-get-paint-mode">gimp_context_get_paint_mode</link> (void);
32
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-paint-mode">gimp_context_set_paint_mode</link> (<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode);
33
<link linkend="gchar">gchar</link>* <link linkend="gimp-context-get-brush">gimp_context_get_brush</link> (void);
34
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-brush">gimp_context_set_brush</link> (const <link linkend="gchar">gchar</link> *name);
35
<link linkend="gchar">gchar</link>* <link linkend="gimp-context-get-pattern">gimp_context_get_pattern</link> (void);
36
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-pattern">gimp_context_set_pattern</link> (const <link linkend="gchar">gchar</link> *name);
37
<link linkend="gchar">gchar</link>* <link linkend="gimp-context-get-gradient">gimp_context_get_gradient</link> (void);
38
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-gradient">gimp_context_set_gradient</link> (const <link linkend="gchar">gchar</link> *name);
39
<link linkend="gchar">gchar</link>* <link linkend="gimp-context-get-palette">gimp_context_get_palette</link> (void);
40
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-palette">gimp_context_set_palette</link> (const <link linkend="gchar">gchar</link> *name);
41
<link linkend="gchar">gchar</link>* <link linkend="gimp-context-get-font">gimp_context_get_font</link> (void);
42
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-font">gimp_context_set_font</link> (const <link linkend="gchar">gchar</link> *name);
43
<link linkend="gchar">gchar</link>* <link linkend="gimp-context-get-paint-method">gimp_context_get_paint_method</link> (void);
44
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-paint-method">gimp_context_set_paint_method</link> (const <link linkend="gchar">gchar</link> *name);
45
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-list-paint-methods">gimp_context_list_paint_methods</link> (<link linkend="gint">gint</link> *num_paint_methods,
46
<link linkend="gchar">gchar</link> ***paint_methods);
58
<refsect1 id="libgimp-gimpcontext.description" role="desc">
59
<title role="desc.title">Description</title>
61
Functions to manipulate a plug-in's context.
65
<refsect1 id="libgimp-gimpcontext.details" role="details">
66
<title role="details.title">Details</title>
67
<refsect2 id="gimp-context-push" role="function" condition="since:GIMP 2.2">
68
<title>gimp_context_push ()</title>
69
<indexterm zone="gimp-context-push" role="GIMP 2.2"><primary sortas="gimp_context_push">gimp_context_push</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_push (void);</programlisting>
71
Pushes a context to the top of the plug-in's context stack.
74
This procedure creates a new context by copying the current context.
75
This copy becomes the new current context for the calling plug-in
76
until it is popped again using <link linkend="gimp-context-pop"><function>gimp_context_pop()</function></link>.</para>
78
</para><variablelist role="params">
79
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
81
</simpara></listitem></varlistentry>
82
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
83
<refsect2 id="gimp-context-pop" role="function" condition="since:GIMP 2.2">
84
<title>gimp_context_pop ()</title>
85
<indexterm zone="gimp-context-pop" role="GIMP 2.2"><primary sortas="gimp_context_pop">gimp_context_pop</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_pop (void);</programlisting>
87
Pops the topmost context from the plug-in's context stack.
90
This procedure removes the topmost context from the plug-in's
91
context stack. The context that was active before the corresponding
92
call to <link linkend="gimp-context-push"><function>gimp_context_push()</function></link> becomes the new current context of the
95
</para><variablelist role="params">
96
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
98
</simpara></listitem></varlistentry>
99
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
100
<refsect2 id="gimp-context-get-foreground" role="function" condition="since:GIMP 2.2">
101
<title>gimp_context_get_foreground ()</title>
102
<indexterm zone="gimp-context-get-foreground" role="GIMP 2.2"><primary sortas="gimp_context_get_foreground">gimp_context_get_foreground</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_get_foreground (<link linkend="GimpRGB">GimpRGB</link> *foreground);</programlisting>
104
Get the current GIMP foreground color.
107
This procedure returns the current GIMP foreground color. The
108
foreground color is used in a variety of tools such as paint tools,
109
blending, and bucket fill.</para>
111
</para><variablelist role="params">
112
<varlistentry><term><parameter>foreground</parameter> :</term>
113
<listitem><simpara> The foreground color.
114
</simpara></listitem></varlistentry>
115
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
117
</simpara></listitem></varlistentry>
118
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
119
<refsect2 id="gimp-context-set-foreground" role="function" condition="since:GIMP 2.2">
120
<title>gimp_context_set_foreground ()</title>
121
<indexterm zone="gimp-context-set-foreground" role="GIMP 2.2"><primary sortas="gimp_context_set_foreground">gimp_context_set_foreground</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_foreground (const <link linkend="GimpRGB">GimpRGB</link> *foreground);</programlisting>
123
Set the current GIMP foreground color.
126
This procedure sets the current GIMP foreground color. After this is
127
set, operations which use foreground such as paint tools, blending,
128
and bucket fill will use the new value.</para>
130
</para><variablelist role="params">
131
<varlistentry><term><parameter>foreground</parameter> :</term>
132
<listitem><simpara> The foreground color.
133
</simpara></listitem></varlistentry>
134
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
136
</simpara></listitem></varlistentry>
137
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
138
<refsect2 id="gimp-context-get-background" role="function" condition="since:GIMP 2.2">
139
<title>gimp_context_get_background ()</title>
140
<indexterm zone="gimp-context-get-background" role="GIMP 2.2"><primary sortas="gimp_context_get_background">gimp_context_get_background</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_get_background (<link linkend="GimpRGB">GimpRGB</link> *background);</programlisting>
142
Get the current GIMP background color.
145
This procedure returns the current GIMP background color. The
146
background color is used in a variety of tools such as blending,
147
erasing (with non-alpha images), and image filling.</para>
149
</para><variablelist role="params">
150
<varlistentry><term><parameter>background</parameter> :</term>
151
<listitem><simpara> The background color.
152
</simpara></listitem></varlistentry>
153
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
155
</simpara></listitem></varlistentry>
156
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
157
<refsect2 id="gimp-context-set-background" role="function" condition="since:GIMP 2.2">
158
<title>gimp_context_set_background ()</title>
159
<indexterm zone="gimp-context-set-background" role="GIMP 2.2"><primary sortas="gimp_context_set_background">gimp_context_set_background</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_background (const <link linkend="GimpRGB">GimpRGB</link> *background);</programlisting>
161
Set the current GIMP background color.
164
This procedure sets the current GIMP background color. After this is
165
set, operations which use background such as blending, filling
166
images, clearing, and erasing (in non-alpha images) will use the new
169
</para><variablelist role="params">
170
<varlistentry><term><parameter>background</parameter> :</term>
171
<listitem><simpara> The background color.
172
</simpara></listitem></varlistentry>
173
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
175
</simpara></listitem></varlistentry>
176
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
177
<refsect2 id="gimp-context-set-default-colors" role="function" condition="since:GIMP 2.2">
178
<title>gimp_context_set_default_colors ()</title>
179
<indexterm zone="gimp-context-set-default-colors" role="GIMP 2.2"><primary sortas="gimp_context_set_default_colors">gimp_context_set_default_colors</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_default_colors (void);</programlisting>
181
Set the current GIMP foreground and background colors to black and
185
This procedure sets the current GIMP foreground and background
186
colors to their initial default values, black and white.</para>
188
</para><variablelist role="params">
189
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
191
</simpara></listitem></varlistentry>
192
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
193
<refsect2 id="gimp-context-swap-colors" role="function" condition="since:GIMP 2.2">
194
<title>gimp_context_swap_colors ()</title>
195
<indexterm zone="gimp-context-swap-colors" role="GIMP 2.2"><primary sortas="gimp_context_swap_colors">gimp_context_swap_colors</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_swap_colors (void);</programlisting>
197
Swap the current GIMP foreground and background colors.
200
This procedure swaps the current GIMP foreground and background
201
colors, so that the new foreground color becomes the old background
202
color and vice versa.</para>
204
</para><variablelist role="params">
205
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
207
</simpara></listitem></varlistentry>
208
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
209
<refsect2 id="gimp-context-get-opacity" role="function" condition="since:GIMP 2.2">
210
<title>gimp_context_get_opacity ()</title>
211
<indexterm zone="gimp-context-get-opacity" role="GIMP 2.2"><primary sortas="gimp_context_get_opacity">gimp_context_get_opacity</primary></indexterm><programlisting><link linkend="gdouble">gdouble</link> gimp_context_get_opacity (void);</programlisting>
216
This procedure returns the opacity setting. The return value is a
217
floating point number between 0 and 100.</para>
219
</para><variablelist role="params">
220
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The opacity.
222
</simpara></listitem></varlistentry>
223
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
224
<refsect2 id="gimp-context-set-opacity" role="function" condition="since:GIMP 2.2">
225
<title>gimp_context_set_opacity ()</title>
226
<indexterm zone="gimp-context-set-opacity" role="GIMP 2.2"><primary sortas="gimp_context_set_opacity">gimp_context_set_opacity</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_opacity (<link linkend="gdouble">gdouble</link> opacity);</programlisting>
231
This procedure modifies the opacity setting. The value should be a
232
floating point number between 0 and 100.</para>
234
</para><variablelist role="params">
235
<varlistentry><term><parameter>opacity</parameter> :</term>
236
<listitem><simpara> The opacity.
237
</simpara></listitem></varlistentry>
238
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
240
</simpara></listitem></varlistentry>
241
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
242
<refsect2 id="gimp-context-get-paint-mode" role="function" condition="since:GIMP 2.2">
243
<title>gimp_context_get_paint_mode ()</title>
244
<indexterm zone="gimp-context-get-paint-mode" role="GIMP 2.2"><primary sortas="gimp_context_get_paint_mode">gimp_context_get_paint_mode</primary></indexterm><programlisting><link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> gimp_context_get_paint_mode (void);</programlisting>
249
This procedure returns the paint-mode setting. The return value is
250
an integer which corresponds to the values listed in the argument
253
</para><variablelist role="params">
254
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The paint mode.
256
</simpara></listitem></varlistentry>
257
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
258
<refsect2 id="gimp-context-set-paint-mode" role="function" condition="since:GIMP 2.2">
259
<title>gimp_context_set_paint_mode ()</title>
260
<indexterm zone="gimp-context-set-paint-mode" role="GIMP 2.2"><primary sortas="gimp_context_set_paint_mode">gimp_context_set_paint_mode</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_paint_mode (<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode);</programlisting>
265
This procedure modifies the paint_mode setting.</para>
267
</para><variablelist role="params">
268
<varlistentry><term><parameter>paint_mode</parameter> :</term>
269
<listitem><simpara> The paint mode.
270
</simpara></listitem></varlistentry>
271
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
273
</simpara></listitem></varlistentry>
274
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
275
<refsect2 id="gimp-context-get-brush" role="function" condition="since:GIMP 2.2">
276
<title>gimp_context_get_brush ()</title>
277
<indexterm zone="gimp-context-get-brush" role="GIMP 2.2"><primary sortas="gimp_context_get_brush">gimp_context_get_brush</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_context_get_brush (void);</programlisting>
279
Retrieve the currently active brush.
282
This procedure returns the name of the currently active brush. All
283
paint operations and stroke operations use this brush to control the
284
application of paint to the image.</para>
286
</para><variablelist role="params">
287
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The name of the active brush.
289
</simpara></listitem></varlistentry>
290
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
291
<refsect2 id="gimp-context-set-brush" role="function" condition="since:GIMP 2.2">
292
<title>gimp_context_set_brush ()</title>
293
<indexterm zone="gimp-context-set-brush" role="GIMP 2.2"><primary sortas="gimp_context_set_brush">gimp_context_set_brush</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_brush (const <link linkend="gchar">gchar</link> *name);</programlisting>
295
Set the specified brush as the active brush.
298
This procedure allows the active brush to be set by specifying its
299
name. The name is simply a string which corresponds to one of the
300
names of the installed brushes. If there is no matching brush found,
301
this procedure will return an error. Otherwise, the specified brush
302
becomes active and will be used in all subsequent paint operations.</para>
304
</para><variablelist role="params">
305
<varlistentry><term><parameter>name</parameter> :</term>
306
<listitem><simpara> The name of the brush.
307
</simpara></listitem></varlistentry>
308
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
310
</simpara></listitem></varlistentry>
311
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
312
<refsect2 id="gimp-context-get-pattern" role="function" condition="since:GIMP 2.2">
313
<title>gimp_context_get_pattern ()</title>
314
<indexterm zone="gimp-context-get-pattern" role="GIMP 2.2"><primary sortas="gimp_context_get_pattern">gimp_context_get_pattern</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_context_get_pattern (void);</programlisting>
316
Retrieve the currently active pattern.
319
This procedure returns name of the the currently active pattern. All
320
clone and bucket-fill operations with patterns will use this pattern
321
to control the application of paint to the image.</para>
323
</para><variablelist role="params">
324
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The name of the active pattern.
326
</simpara></listitem></varlistentry>
327
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
328
<refsect2 id="gimp-context-set-pattern" role="function" condition="since:GIMP 2.2">
329
<title>gimp_context_set_pattern ()</title>
330
<indexterm zone="gimp-context-set-pattern" role="GIMP 2.2"><primary sortas="gimp_context_set_pattern">gimp_context_set_pattern</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_pattern (const <link linkend="gchar">gchar</link> *name);</programlisting>
332
Set the specified pattern as the active pattern.
335
This procedure allows the active pattern to be set by specifying its
336
name. The name is simply a string which corresponds to one of the
337
names of the installed patterns. If there is no matching pattern
338
found, this procedure will return an error. Otherwise, the specified
339
pattern becomes active and will be used in all subsequent paint
342
</para><variablelist role="params">
343
<varlistentry><term><parameter>name</parameter> :</term>
344
<listitem><simpara> The name of the pattern.
345
</simpara></listitem></varlistentry>
346
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
348
</simpara></listitem></varlistentry>
349
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
350
<refsect2 id="gimp-context-get-gradient" role="function" condition="since:GIMP 2.2">
351
<title>gimp_context_get_gradient ()</title>
352
<indexterm zone="gimp-context-get-gradient" role="GIMP 2.2"><primary sortas="gimp_context_get_gradient">gimp_context_get_gradient</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_context_get_gradient (void);</programlisting>
354
Retrieve the currently active gradient.
357
This procedure returns the name of the currently active gradient.</para>
359
</para><variablelist role="params">
360
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The name of the active gradient.
362
</simpara></listitem></varlistentry>
363
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
364
<refsect2 id="gimp-context-set-gradient" role="function" condition="since:GIMP 2.2">
365
<title>gimp_context_set_gradient ()</title>
366
<indexterm zone="gimp-context-set-gradient" role="GIMP 2.2"><primary sortas="gimp_context_set_gradient">gimp_context_set_gradient</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_gradient (const <link linkend="gchar">gchar</link> *name);</programlisting>
368
Sets the specified gradient as the active gradient.
371
This procedure lets you set the specified gradient as the active or
372
\"current\" one. The name is simply a string which corresponds to
373
one of the loaded gradients. If no matching gradient is found, this
374
procedure will return an error. Otherwise, the specified gradient
375
will become active and will be used for subsequent custom gradient
378
</para><variablelist role="params">
379
<varlistentry><term><parameter>name</parameter> :</term>
380
<listitem><simpara> The name of the gradient.
381
</simpara></listitem></varlistentry>
382
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
384
</simpara></listitem></varlistentry>
385
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
386
<refsect2 id="gimp-context-get-palette" role="function" condition="since:GIMP 2.2">
387
<title>gimp_context_get_palette ()</title>
388
<indexterm zone="gimp-context-get-palette" role="GIMP 2.2"><primary sortas="gimp_context_get_palette">gimp_context_get_palette</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_context_get_palette (void);</programlisting>
390
Retrieve the currently active palette.
393
This procedure returns the name of the the currently active palette.</para>
395
</para><variablelist role="params">
396
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The name of the active palette.
398
</simpara></listitem></varlistentry>
399
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
400
<refsect2 id="gimp-context-set-palette" role="function" condition="since:GIMP 2.2">
401
<title>gimp_context_set_palette ()</title>
402
<indexterm zone="gimp-context-set-palette" role="GIMP 2.2"><primary sortas="gimp_context_set_palette">gimp_context_set_palette</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_palette (const <link linkend="gchar">gchar</link> *name);</programlisting>
404
Set the specified palette as the active palette.
407
This procedure allows the active palette to be set by specifying its
408
name. The name is simply a string which corresponds to one of the
409
names of the installed palettes. If no matching palette is found,
410
this procedure will return an error. Otherwise, the specified
411
palette becomes active and will be used in all subsequent palette
414
</para><variablelist role="params">
415
<varlistentry><term><parameter>name</parameter> :</term>
416
<listitem><simpara> The name of the palette.
417
</simpara></listitem></varlistentry>
418
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
420
</simpara></listitem></varlistentry>
421
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
422
<refsect2 id="gimp-context-get-font" role="function" condition="since:GIMP 2.2">
423
<title>gimp_context_get_font ()</title>
424
<indexterm zone="gimp-context-get-font" role="GIMP 2.2"><primary sortas="gimp_context_get_font">gimp_context_get_font</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_context_get_font (void);</programlisting>
426
Retrieve the currently active font.
429
This procedure returns the name of the currently active font.</para>
431
</para><variablelist role="params">
432
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The name of the active font.
434
</simpara></listitem></varlistentry>
435
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
436
<refsect2 id="gimp-context-set-font" role="function" condition="since:GIMP 2.2">
437
<title>gimp_context_set_font ()</title>
438
<indexterm zone="gimp-context-set-font" role="GIMP 2.2"><primary sortas="gimp_context_set_font">gimp_context_set_font</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_font (const <link linkend="gchar">gchar</link> *name);</programlisting>
440
Set the specified font as the active font.
443
This procedure allows the active font to be set by specifying its
444
name. The name is simply a string which corresponds to one of the
445
names of the installed fonts. If no matching font is found, this
446
procedure will return an error. Otherwise, the specified font
447
becomes active and will be used in all subsequent font operations.</para>
449
</para><variablelist role="params">
450
<varlistentry><term><parameter>name</parameter> :</term>
451
<listitem><simpara> The name of the font.
452
</simpara></listitem></varlistentry>
453
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
455
</simpara></listitem></varlistentry>
456
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
457
<refsect2 id="gimp-context-get-paint-method" role="function" condition="since:GIMP 2.4">
458
<title>gimp_context_get_paint_method ()</title>
459
<indexterm zone="gimp-context-get-paint-method" role="GIMP 2.4"><primary sortas="gimp_context_get_paint_method">gimp_context_get_paint_method</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_context_get_paint_method (void);</programlisting>
461
Retrieve the currently active paint method.
464
This procedure returns the name of the currently active paint
467
</para><variablelist role="params">
468
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The name of the active paint method.
470
</simpara></listitem></varlistentry>
471
</variablelist><para role="since">Since GIMP 2.4</para></refsect2>
472
<refsect2 id="gimp-context-set-paint-method" role="function" condition="since:GIMP 2.4">
473
<title>gimp_context_set_paint_method ()</title>
474
<indexterm zone="gimp-context-set-paint-method" role="GIMP 2.4"><primary sortas="gimp_context_set_paint_method">gimp_context_set_paint_method</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_paint_method (const <link linkend="gchar">gchar</link> *name);</programlisting>
476
Set the specified paint method as the active paint method.
479
This procedure allows the active paint method to be set by
480
specifying its name. The name is simply a string which corresponds
481
to one of the names of the available paint methods. If there is no
482
matching method found, this procedure will return an error.
483
Otherwise, the specified method becomes active and will be used in
484
all subsequent paint operations.</para>
486
</para><variablelist role="params">
487
<varlistentry><term><parameter>name</parameter> :</term>
488
<listitem><simpara> The name of the paint method.
489
</simpara></listitem></varlistentry>
490
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
492
</simpara></listitem></varlistentry>
493
</variablelist><para role="since">Since GIMP 2.4</para></refsect2>
494
<refsect2 id="gimp-context-list-paint-methods" role="function" condition="since:GIMP 2.4">
495
<title>gimp_context_list_paint_methods ()</title>
496
<indexterm zone="gimp-context-list-paint-methods" role="GIMP 2.4"><primary sortas="gimp_context_list_paint_methods">gimp_context_list_paint_methods</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_list_paint_methods (<link linkend="gint">gint</link> *num_paint_methods,
497
<link linkend="gchar">gchar</link> ***paint_methods);</programlisting>
499
Lists the available paint methods.
502
This procedure lists the names of the available paint methods. Any
503
of the results can be used for <link linkend="gimp-context-set-paint-method"><function>gimp_context_set_paint_method()</function></link>.</para>
505
</para><variablelist role="params">
506
<varlistentry><term><parameter>num_paint_methods</parameter> :</term>
507
<listitem><simpara> The number of the available paint methods.
508
</simpara></listitem></varlistentry>
509
<varlistentry><term><parameter>paint_methods</parameter> :</term>
510
<listitem><simpara> The names of the available paint methods.
511
</simpara></listitem></varlistentry>
512
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
514
</simpara></listitem></varlistentry>
515
</variablelist><para role="since">Since GIMP 2.4</para></refsect2>