4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>gimpcairo-utils</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7
<link rel="start" href="index.html" title="GIMP Widgets Library Reference Manual">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
<link rel="home" href="index.html" title="GIMP Widgets Library Reference Manual">
8
8
<link rel="up" href="libgimpwidgets-utils.html" title="Part V. GIMP Widgets Utilities">
9
9
<link rel="prev" href="libgimpwidgets-utils.html" title="Part V. GIMP Widgets Utilities">
10
10
<link rel="next" href="libgimpwidgets-GimpHelpUI.html" title="GimpHelpUI">
11
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="part" href="libgimpwidgets-widgets.html" title="Part I. GIMP Widgets">
14
14
<link rel="chapter" href="libgimpwidgets-hierarchy.html" title="Object Hierarchy">
34
34
<th width="100%" align="center">GIMP Widgets Library Reference Manual</th>
35
35
<td><a accesskey="n" href="libgimpwidgets-GimpHelpUI.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
37
<tr><td colspan="5" class="shortcuts"><nobr><a href="#libgimpwidgets-GimpCairoUtils.synopsis" class="shortcut">Top</a>
39
<a href="#libgimpwidgets-GimpCairoUtils.description" class="shortcut">Description</a></nobr></td></tr>
37
<tr><td colspan="5" class="shortcuts">
38
<a href="#libgimpwidgets-GimpCairoUtils.synopsis" class="shortcut">Top</a>
40
<a href="#libgimpwidgets-GimpCairoUtils.description" class="shortcut">Description</a>
41
<div class="refentry" lang="en">
43
<div class="refentry" title="gimpcairo-utils">
42
44
<a name="libgimpwidgets-GimpCairoUtils"></a><div class="titlepage"></div>
43
45
<div class="refnamediv"><table width="100%"><tr>
48
50
<td valign="top" align="right"></td>
49
51
</tr></table></div>
50
<div class="refsynopsisdiv">
52
<div class="refsynopsisdiv" title="Synopsis">
51
53
<a name="libgimpwidgets-GimpCairoUtils.synopsis"></a><h2>Synopsis</h2>
52
54
<pre class="synopsis">
53
55
void <a class="link" href="libgimpwidgets-GimpCairoUtils.html#gimp-cairo-set-source-rgb" title="gimp_cairo_set_source_rgb ()">gimp_cairo_set_source_rgb</a> (<a
54
href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
56
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"
57
59
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
58
60
>GimpRGB</a> *color);
59
61
void <a class="link" href="libgimpwidgets-GimpCairoUtils.html#gimp-cairo-set-source-rgba" title="gimp_cairo_set_source_rgba ()">gimp_cairo_set_source_rgba</a> (<a
60
href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
62
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"
63
65
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
66
68
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
67
69
>gboolean</a> <a class="link" href="libgimpwidgets-GimpCairoUtils.html#gimp-cairo-set-focus-line-pattern" title="gimp_cairo_set_focus_line_pattern ()">gimp_cairo_set_focus_line_pattern</a> (<a
68
href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
70
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"
71
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
73
href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"
72
74
>GtkWidget</a> *widget);
74
href="/usr/share/gtk-doc/html/cairo/cairo-Patterns.html#cairo-pattern-t"
75
>cairo_pattern_t</a>* <a class="link" href="libgimpwidgets-GimpCairoUtils.html#gimp-cairo-checkerboard-create" title="gimp_cairo_checkerboard_create ()">gimp_cairo_checkerboard_create</a> (<a
76
href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
76
href="/usr/share/gtk-doc/html/cairo/cairo-pattern.html#cairo-pattern-t"
77
>cairo_pattern_t</a> * <a class="link" href="libgimpwidgets-GimpCairoUtils.html#gimp-cairo-checkerboard-create" title="gimp_cairo_checkerboard_create ()">gimp_cairo_checkerboard_create</a> (<a
78
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"
79
81
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
85
87
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
86
88
>GimpRGB</a> *dark);
88
href="/usr/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html#cairo-surface-t"
89
>cairo_surface_t</a>* <a class="link" href="libgimpwidgets-GimpCairoUtils.html#gimp-cairo-surface-create-from-pixbuf" title="gimp_cairo_surface_create_from_pixbuf ()">gimp_cairo_surface_create_from_pixbuf</a>
90
href="/usr/share/gtk-doc/html/cairo/cairo-surface.html#cairo-surface-t"
91
>cairo_surface_t</a> * <a class="link" href="libgimpwidgets-GimpCairoUtils.html#gimp-cairo-surface-create-from-pixbuf" title="gimp_cairo_surface_create_from_pixbuf ()">gimp_cairo_surface_create_from_pixbuf</a>
91
href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
93
href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
92
94
>GdkPixbuf</a> *pixbuf);
93
#define <a class="link" href="libgimpwidgets-GimpCairoUtils.html#GIMP-CAIRO-RGB24-SET-PIXEL:CAPS" title="GIMP_CAIRO_RGB24_SET_PIXEL()">GIMP_CAIRO_RGB24_SET_PIXEL</a> (d, r, g, b)
94
#define <a class="link" href="libgimpwidgets-GimpCairoUtils.html#GIMP-CAIRO-ARGB32-SET-PIXEL:CAPS" title="GIMP_CAIRO_ARGB32_SET_PIXEL()">GIMP_CAIRO_ARGB32_SET_PIXEL</a> (d, r, g, b, a)
95
#define <a class="link" href="libgimpwidgets-GimpCairoUtils.html#GIMP-CAIRO-RGB24-SET-PIXEL--CAPS" title="GIMP_CAIRO_RGB24_SET_PIXEL()">GIMP_CAIRO_RGB24_SET_PIXEL</a> (d, r, g, b)
96
#define <a class="link" href="libgimpwidgets-GimpCairoUtils.html#GIMP-CAIRO-ARGB32-SET-PIXEL--CAPS" title="GIMP_CAIRO_ARGB32_SET_PIXEL()">GIMP_CAIRO_ARGB32_SET_PIXEL</a> (d, r, g, b, a)
97
<div class="refsect1" lang="en">
99
<div class="refsect1" title="Description">
98
100
<a name="libgimpwidgets-GimpCairoUtils.description"></a><h2>Description</h2>
103
<div class="refsect1" lang="en">
104
<div class="refsect1" title="Details">
104
105
<a name="libgimpwidgets-GimpCairoUtils.details"></a><h2>Details</h2>
105
<div class="refsect2" lang="en">
106
<div class="refsect2" title="gimp_cairo_set_source_rgb ()">
106
107
<a name="gimp-cairo-set-source-rgb"></a><h3>gimp_cairo_set_source_rgb ()</h3>
107
108
<pre class="programlisting">void gimp_cairo_set_source_rgb (<a
108
href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
109
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"
109
110
>cairo_t</a> *cr,
111
112
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
118
119
This function calls <a
119
href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-source-rgb"
120
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-set-source-rgb"
120
121
><code class="function">cairo_set_source_rgb()</code></a> for you.</p>
124
124
<div class="variablelist"><table border="0">
125
125
<col align="left" valign="top">
139
<p class="since">Since GIMP 2.6
139
<p class="since">Since GIMP 2.6</p>
143
<div class="refsect2" lang="en">
142
<div class="refsect2" title="gimp_cairo_set_source_rgba ()">
144
143
<a name="gimp-cairo-set-source-rgba"></a><h3>gimp_cairo_set_source_rgba ()</h3>
145
144
<pre class="programlisting">void gimp_cairo_set_source_rgba (<a
146
href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
145
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"
147
146
>cairo_t</a> *cr,
149
148
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
156
155
This function calls <a
157
href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-source-rgba"
156
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-set-source-rgba"
158
157
><code class="function">cairo_set_source_rgba()</code></a> for you.</p>
162
160
<div class="variablelist"><table border="0">
163
161
<col align="left" valign="top">
177
<p class="since">Since GIMP 2.6
175
<p class="since">Since GIMP 2.6</p>
181
<div class="refsect2" lang="en">
178
<div class="refsect2" title="gimp_cairo_set_focus_line_pattern ()">
182
179
<a name="gimp-cairo-set-focus-line-pattern"></a><h3>gimp_cairo_set_focus_line_pattern ()</h3>
183
180
<pre class="programlisting"><a
184
181
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
185
182
>gboolean</a> gimp_cairo_set_focus_line_pattern (<a
186
href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
183
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"
187
184
>cairo_t</a> *cr,
189
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
186
href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"
190
187
>GtkWidget</a> *widget);</pre>
192
189
Sets color and dash pattern for stroking a focus line on the given
193
190
<em class="parameter"><code>cr</code></em>. The line pattern is taken from <em class="parameter"><code>widget</code></em>.</p>
197
193
<div class="variablelist"><table border="0">
198
194
<col align="left" valign="top">
211
207
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
213
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"
209
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
214
210
><code class="literal">TRUE</code></a> if the widget style has a focus line pattern,
216
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"
212
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
217
213
><code class="literal">FALSE</code></a> otherwise
223
<p class="since">Since GIMP 2.6
219
<p class="since">Since GIMP 2.6</p>
227
<div class="refsect2" lang="en">
222
<div class="refsect2" title="gimp_cairo_checkerboard_create ()">
228
223
<a name="gimp-cairo-checkerboard-create"></a><h3>gimp_cairo_checkerboard_create ()</h3>
229
224
<pre class="programlisting"><a
230
href="/usr/share/gtk-doc/html/cairo/cairo-Patterns.html#cairo-pattern-t"
231
>cairo_pattern_t</a>* gimp_cairo_checkerboard_create (<a
232
href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
225
href="/usr/share/gtk-doc/html/cairo/cairo-pattern.html#cairo-pattern-t"
226
>cairo_pattern_t</a> * gimp_cairo_checkerboard_create (<a
227
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"
233
228
>cairo_t</a> *cr,
235
230
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
262
256
<td><p><span class="term"><em class="parameter"><code>light</code></em> :</span></p></td>
263
257
<td> light check color or <a
264
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"
258
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
265
259
><code class="literal">NULL</code></a> to use the default light gray
269
263
<td><p><span class="term"><em class="parameter"><code>dark</code></em> :</span></p></td>
270
264
<td> dark check color or <a
271
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"
265
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
272
266
><code class="literal">NULL</code></a> to use the default dark gray
283
<p class="since">Since GIMP 2.6
277
<p class="since">Since GIMP 2.6</p>
287
<div class="refsect2" lang="en">
280
<div class="refsect2" title="gimp_cairo_surface_create_from_pixbuf ()">
288
281
<a name="gimp-cairo-surface-create-from-pixbuf"></a><h3>gimp_cairo_surface_create_from_pixbuf ()</h3>
289
282
<pre class="programlisting"><a
290
href="/usr/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html#cairo-surface-t"
291
>cairo_surface_t</a>* gimp_cairo_surface_create_from_pixbuf
283
href="/usr/share/gtk-doc/html/cairo/cairo-surface.html#cairo-surface-t"
284
>cairo_surface_t</a> * gimp_cairo_surface_create_from_pixbuf
293
href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
286
href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
294
287
>GdkPixbuf</a> *pixbuf);</pre>
296
289
Create a Cairo image surface from a GdkPixbuf.
299
292
You should avoid calling this function as there are probably more
300
293
efficient ways of achieving the result you are looking for.</p>
304
296
<div class="variablelist"><table border="0">
305
297
<col align="left" valign="top">
313
305
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
321
<p class="since">Since GIMP 2.6
311
<p class="since">Since GIMP 2.6</p>
325
<div class="refsect2" lang="en">
326
<a name="GIMP-CAIRO-RGB24-SET-PIXEL:CAPS"></a><h3>GIMP_CAIRO_RGB24_SET_PIXEL()</h3>
314
<div class="refsect2" title="GIMP_CAIRO_RGB24_SET_PIXEL()">
315
<a name="GIMP-CAIRO-RGB24-SET-PIXEL--CAPS"></a><h3>GIMP_CAIRO_RGB24_SET_PIXEL()</h3>
327
316
<pre class="programlisting">#define GIMP_CAIRO_RGB24_SET_PIXEL(d, r, g, b)</pre>
329
Sets a single pixel in an Cairo image surface in <a
330
href="/usr/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html#CAIRO-FORMAT-RGB24:CAPS"
331
><code class="literal">CAIRO_FORMAT_RGB24</code></a>.</p>
318
Sets a single pixel in an Cairo image surface in <code class="literal">CAIRO_FORMAT_RGB24</code>.</p>
335
321
<div class="variablelist"><table border="0">
336
322
<col align="left" valign="top">
360
<p class="since">Since GIMP 2.6
346
<p class="since">Since GIMP 2.6</p>
364
<div class="refsect2" lang="en">
365
<a name="GIMP-CAIRO-ARGB32-SET-PIXEL:CAPS"></a><h3>GIMP_CAIRO_ARGB32_SET_PIXEL()</h3>
349
<div class="refsect2" title="GIMP_CAIRO_ARGB32_SET_PIXEL()">
350
<a name="GIMP-CAIRO-ARGB32-SET-PIXEL--CAPS"></a><h3>GIMP_CAIRO_ARGB32_SET_PIXEL()</h3>
366
351
<pre class="programlisting">#define GIMP_CAIRO_ARGB32_SET_PIXEL(d, r, g, b, a)</pre>
368
Sets a single pixel in an Cairo image surface in <a
369
href="/usr/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html#CAIRO-FORMAT-ARGB32:CAPS"
370
><code class="literal">CAIRO_FORMAT_ARGB32</code></a>.</p>
353
Sets a single pixel in an Cairo image surface in <code class="literal">CAIRO_FORMAT_ARGB32</code>.</p>
374
356
<div class="variablelist"><table border="0">
375
357
<col align="left" valign="top">