1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507
|
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpcontext">
<refmeta>
<refentrytitle role="top_of_page">gimpcontext</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpcontext</refname>
<refpurpose>Functions to manipulate a plug-in's context.</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>
<refsynopsisdiv role="synopsis">
<title role="synopsis.title">Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-push">gimp_context_push</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-pop">gimp_context_pop</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-get-foreground">gimp_context_get_foreground</link> (<link linkend="GimpRGB">GimpRGB</link> *foreground);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-foreground">gimp_context_set_foreground</link> (const <link linkend="GimpRGB">GimpRGB</link> *foreground);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-get-background">gimp_context_get_background</link> (<link linkend="GimpRGB">GimpRGB</link> *background);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-background">gimp_context_set_background</link> (const <link linkend="GimpRGB">GimpRGB</link> *background);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-default-colors">gimp_context_set_default_colors</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-swap-colors">gimp_context_swap_colors</link> (void);
<link linkend="gdouble">gdouble</link> <link linkend="gimp-context-get-opacity">gimp_context_get_opacity</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-opacity">gimp_context_set_opacity</link> (<link linkend="gdouble">gdouble</link> opacity);
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> <link linkend="gimp-context-get-paint-mode">gimp_context_get_paint_mode</link>
(void);
<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);
<link linkend="gchar">gchar</link>* <link linkend="gimp-context-get-brush">gimp_context_get_brush</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-brush">gimp_context_set_brush</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gchar">gchar</link>* <link linkend="gimp-context-get-pattern">gimp_context_get_pattern</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-pattern">gimp_context_set_pattern</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gchar">gchar</link>* <link linkend="gimp-context-get-gradient">gimp_context_get_gradient</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-gradient">gimp_context_set_gradient</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gchar">gchar</link>* <link linkend="gimp-context-get-palette">gimp_context_get_palette</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-palette">gimp_context_set_palette</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gchar">gchar</link>* <link linkend="gimp-context-get-font">gimp_context_get_font</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-font">gimp_context_set_font</link> (const <link linkend="gchar">gchar</link> *name);
</synopsis>
</refsynopsisdiv>
<refsect1 role="desc">
<title role="desc.title">Description</title>
<para>
Functions to manipulate a plug-in's context.
</para>
</refsect1>
<refsect1 role="details">
<title role="details.title">Details</title>
<refsect2>
<title><anchor id="gimp-context-push" role="function" condition="since:GIMP 2.2"/>gimp_context_push ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_push</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_push (void);</programlisting>
<para>
Pushes a context to the top of the plug-in's context stack.
</para>
<para>
This procedure creates a new context by copying the current context.
This copy becomes the new current context for the calling plug-in
until it is popped again.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-pop" role="function" condition="since:GIMP 2.2"/>gimp_context_pop ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_pop</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_pop (void);</programlisting>
<para>
Pops the topmost context from the plug-in's context stack.
</para>
<para>
This procedure creates a new context and makes it the current
context for the calling plug-in.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-foreground" role="function" condition="since:GIMP 2.2"/>gimp_context_get_foreground ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_get_foreground</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_get_foreground (<link linkend="GimpRGB">GimpRGB</link> *foreground);</programlisting>
<para>
Get the current GIMP foreground color.
</para>
<para>
This procedure returns the current GIMP foreground color. The
foreground color is used in a variety of tools such as paint tools,
blending, and bucket fill.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>foreground</parameter> :</term>
<listitem><simpara> The foreground color.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-foreground" role="function" condition="since:GIMP 2.2"/>gimp_context_set_foreground ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_set_foreground</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_foreground (const <link linkend="GimpRGB">GimpRGB</link> *foreground);</programlisting>
<para>
Set the current GIMP foreground color.
</para>
<para>
This procedure sets the current GIMP foreground color. After this is
set, operations which use foreground such as paint tools, blending,
and bucket fill will use the new value.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>foreground</parameter> :</term>
<listitem><simpara> The foreground color.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-background" role="function" condition="since:GIMP 2.2"/>gimp_context_get_background ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_get_background</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_get_background (<link linkend="GimpRGB">GimpRGB</link> *background);</programlisting>
<para>
Get the current GIMP background color.
</para>
<para>
This procedure returns the current GIMP background color. The
background color is used in a variety of tools such as blending,
erasing (with non-alpha images), and image filling.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>background</parameter> :</term>
<listitem><simpara> The background color.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-background" role="function" condition="since:GIMP 2.2"/>gimp_context_set_background ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_set_background</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_background (const <link linkend="GimpRGB">GimpRGB</link> *background);</programlisting>
<para>
Set the current GIMP background color.
</para>
<para>
This procedure sets the current GIMP background color. After this is
set, operations which use background such as blending, filling
images, clearing, and erasing (in non-alpha images) will use the new
value.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>background</parameter> :</term>
<listitem><simpara> The background color.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-default-colors" role="function" condition="since:GIMP 2.2"/>gimp_context_set_default_colors ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_set_default_colors</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_default_colors (void);</programlisting>
<para>
Set the current GIMP foreground and background colors to black and
white.
</para>
<para>
This procedure sets the current GIMP foreground and background
colors to their initial default values, black and white.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-swap-colors" role="function" condition="since:GIMP 2.2"/>gimp_context_swap_colors ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_swap_colors</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_swap_colors (void);</programlisting>
<para>
Swap the current GIMP foreground and background colors.
</para>
<para>
This procedure swaps the current GIMP foreground and background
colors, so that the new foreground color becomes the old background
color and vice versa.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-opacity" role="function" condition="since:GIMP 2.2"/>gimp_context_get_opacity ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_get_opacity</primary></indexterm><programlisting><link linkend="gdouble">gdouble</link> gimp_context_get_opacity (void);</programlisting>
<para>
Get the opacity.
</para>
<para>
This procedure returns the opacity setting. The return value is a
floating point number between 0 and 100.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The opacity.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-opacity" role="function" condition="since:GIMP 2.2"/>gimp_context_set_opacity ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_set_opacity</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_opacity (<link linkend="gdouble">gdouble</link> opacity);</programlisting>
<para>
Set the opacity.
</para>
<para>
This procedure modifies the opacity setting. The value should be a
floating point number between 0 and 100.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>opacity</parameter> :</term>
<listitem><simpara> The opacity.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-paint-mode" role="function" condition="since:GIMP 2.2"/>gimp_context_get_paint_mode ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_get_paint_mode</primary></indexterm><programlisting><link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> gimp_context_get_paint_mode
(void);</programlisting>
<para>
Get the paint mode.
</para>
<para>
This procedure returns the paint-mode setting. The return value is
an integer which corresponds to the values listed in the argument
description.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The paint mode.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-paint-mode" role="function" condition="since:GIMP 2.2"/>gimp_context_set_paint_mode ()</title>
<indexterm role="GIMP 2.2"><primary>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>
<para>
Set the paint mode.
</para>
<para>
This procedure modifies the paint_mode setting.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>paint_mode</parameter> :</term>
<listitem><simpara> The paint mode.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-brush" role="function" condition="since:GIMP 2.2"/>gimp_context_get_brush ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_get_brush</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_context_get_brush (void);</programlisting>
<para>
Retrieve the currently active brush.
</para>
<para>
This procedure returns the nme of the currently active brush. All
paint operations and stroke operations use this brush to control the
application of paint to the image.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The name of the active brush.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-brush" role="function" condition="since:GIMP 2.2"/>gimp_context_set_brush ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_set_brush</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_brush (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Set the specified brush as the active brush.
</para>
<para>
This procedure allows the active brush to be set by specifying its
name. The name is simply a string which corresponds to one of the
names of the installed brushes. If there is no matching brush found,
this procedure will return an error. Otherwise, the specified brush
becomes active and will be used in all subsequent paint operations.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter> :</term>
<listitem><simpara> The name o the brush.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-pattern" role="function" condition="since:GIMP 2.2"/>gimp_context_get_pattern ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_get_pattern</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_context_get_pattern (void);</programlisting>
<para>
Retrieve the currently active pattern.
</para>
<para>
This procedure returns name of the the currently active pattern. All
clone and bucket-fill operations with patterns will use this pattern
to control the application of paint to the image.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The name of the active pattern.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-pattern" role="function" condition="since:GIMP 2.2"/>gimp_context_set_pattern ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_set_pattern</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_pattern (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Set the specified pattern as the active pattern.
</para>
<para>
This procedure allows the active pattern to be set by specifying its
name. The name is simply a string which corresponds to one of the
names of the installed patterns. If there is no matching pattern
found, this procedure will return an error. Otherwise, the specified
pattern becomes active and will be used in all subsequent paint
operations.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter> :</term>
<listitem><simpara> The name of the pattern.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-gradient" role="function" condition="since:GIMP 2.2"/>gimp_context_get_gradient ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_get_gradient</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_context_get_gradient (void);</programlisting>
<para>
Retrieve the currently active gradient.
</para>
<para>
This procedure returns the name of the currently active gradient.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The name of the active gradient.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-gradient" role="function" condition="since:GIMP 2.2"/>gimp_context_set_gradient ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_set_gradient</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_gradient (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Sets the specified gradient as the active gradient.
</para>
<para>
This procedure lets you set the specified gradient as the active or
\"current\" one. The name is simply a string which corresponds to
one of the loaded gradients. If no matching gradient is found, this
procedure will return an error. Otherwise, the specified gradient
will become active and will be used for subsequent custom gradient
operations.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter> :</term>
<listitem><simpara> The name of the gradient.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-palette" role="function" condition="since:GIMP 2.2"/>gimp_context_get_palette ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_get_palette</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_context_get_palette (void);</programlisting>
<para>
Retrieve the currently active palette.
</para>
<para>
This procedure returns the name of the the currently active palette.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The name of the active palette.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-palette" role="function" condition="since:GIMP 2.2"/>gimp_context_set_palette ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_set_palette</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_palette (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Set the specified palette as the active palette.
</para>
<para>
This procedure allows the active palette to be set by specifying its
name. The name is simply a string which corresponds to one of the
names of the installed palettes. If no matching palette is found,
this procedure will return an error. Otherwise, the specified
palette becomes active and will be used in all subsequent palette
operations.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter> :</term>
<listitem><simpara> The name of the palette.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-font" role="function" condition="since:GIMP 2.2"/>gimp_context_get_font ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_get_font</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_context_get_font (void);</programlisting>
<para>
Retrieve the currently active font.
</para>
<para>
This procedure returns the name of the currently active font.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The name of the active font.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-font" role="function" condition="since:GIMP 2.2"/>gimp_context_set_font ()</title>
<indexterm role="GIMP 2.2"><primary>gimp_context_set_font</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_font (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Set the specified font as the active font.
</para>
<para>
This procedure allows the active font to be set by specifying its
name. The name is simply a string which corresponds to one of the
names of the installed fonts. If no matching font is found, this
procedure will return an error. Otherwise, the specified font
becomes active and will be used in all subsequent font operations.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter> :</term>
<listitem><simpara> The name of the font.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
</refsect1>
</refentry>
|