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.11 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.15 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="part" href="libgimpwidgets-widgets.html" title="Part I. GIMP Widgets">
14
<link rel="chapter" href="libgimpwidgets-hierarchy.html" title="Object Hierarchy">
15
<link rel="chapter" href="libgimpwidgets-gallery.html" title="Widget Gallery">
16
<link rel="chapter" href="libgimpwidgets-cell-renderers.html" title="Cell Renderers for GtkTreeView">
17
<link rel="part" href="libgimpwidgets-colordisplay.html" title="Part II. GIMP Display Filters">
18
<link rel="part" href="libgimpwidgets-colorselector.html" title="Part III. GIMP Color Selectors">
19
<link rel="part" href="libgimpwidgets-controller.html" title="Part IV. GIMP Controllers">
20
<link rel="part" href="libgimpwidgets-utils.html" title="Part V. GIMP Widgets Utilities">
21
<link rel="part" href="libgimpwidgets-deprecated.html" title="Part VI. Deprecated API">
22
<link rel="index" href="libgimpwidgets-index.html" title="Index">
23
<link rel="index" href="libgimpwidgets-index-new-in-2-2.html" title="Index of new symbols in GIMP 2.2">
24
<link rel="index" href="libgimpwidgets-index-new-in-2-4.html" title="Index of new symbols in GIMP 2.4">
25
<link rel="index" href="libgimpwidgets-index-new-in-2-6.html" title="Index of new symbols in GIMP 2.6">
26
<link rel="index" href="libgimpwidgets-index-deprecated.html" title="Index of deprecated symbols">
28
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
29
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
51
37
</tr></table></div>
52
38
<div class="refsynopsisdiv" title="Synopsis">
53
39
<a name="libgimpwidgets-GimpCairoUtils.synopsis"></a><h2>Synopsis</h2>
54
<pre class="synopsis">
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
56
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"
59
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
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
62
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"
65
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
68
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
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
70
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"
73
href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"
74
>GtkWidget</a> *widget);
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"
81
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
84
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
87
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
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>
93
href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
94
>GdkPixbuf</a> *pixbuf);
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)
40
<pre class="synopsis"><span class="returnvalue">void</span> <a class="link" href="libgimpwidgets-GimpCairoUtils.html#gimp-cairo-set-source-rgb" title="gimp_cairo_set_source_rgb ()">gimp_cairo_set_source_rgb</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"><span class="type">cairo_t</span></a> *cr</code></em>,
41
<em class="parameter"><code>const <a href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *color</code></em>);
42
<span class="returnvalue">void</span> <a class="link" href="libgimpwidgets-GimpCairoUtils.html#gimp-cairo-set-source-rgba" title="gimp_cairo_set_source_rgba ()">gimp_cairo_set_source_rgba</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"><span class="type">cairo_t</span></a> *cr</code></em>,
43
<em class="parameter"><code>const <a href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *color</code></em>);
44
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></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> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"><span class="type">cairo_t</span></a> *cr</code></em>,
45
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> *widget</code></em>);
46
<a href="/usr/share/gtk-doc/html/cairo/cairo-pattern.html#cairo-pattern-t"><span class="returnvalue">cairo_pattern_t</span></a> * <a class="link" href="libgimpwidgets-GimpCairoUtils.html#gimp-cairo-checkerboard-create" title="gimp_cairo_checkerboard_create ()">gimp_cairo_checkerboard_create</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"><span class="type">cairo_t</span></a> *cr</code></em>,
47
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> size</code></em>,
48
<em class="parameter"><code>const <a href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *light</code></em>,
49
<em class="parameter"><code>const <a href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *dark</code></em>);
50
<a href="/usr/share/gtk-doc/html/cairo/cairo-surface.html#cairo-surface-t"><span class="returnvalue">cairo_surface_t</span></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>
51
(<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);
52
#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,
56
#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,
99
63
<div class="refsect1" title="Description">
105
69
<a name="libgimpwidgets-GimpCairoUtils.details"></a><h2>Details</h2>
106
70
<div class="refsect2" title="gimp_cairo_set_source_rgb ()">
107
71
<a name="gimp-cairo-set-source-rgb"></a><h3>gimp_cairo_set_source_rgb ()</h3>
108
<pre class="programlisting">void gimp_cairo_set_source_rgb (<a
109
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"
112
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
113
>GimpRGB</a> *color);</pre>
72
<pre class="programlisting"><span class="returnvalue">void</span> gimp_cairo_set_source_rgb (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"><span class="type">cairo_t</span></a> *cr</code></em>,
73
<em class="parameter"><code>const <a href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *color</code></em>);</pre>
115
75
Sets the source pattern within <em class="parameter"><code>cr</code></em> to the solid opaque color
116
76
described by <em class="parameter"><code>color</code></em>.
119
This function calls <a
120
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-set-source-rgb"
121
><code class="function">cairo_set_source_rgb()</code></a> for you.</p>
79
This function calls <a href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-set-source-rgb"><code class="function">cairo_set_source_rgb()</code></a> for you.
124
81
<div class="variablelist"><table border="0">
125
82
<col align="left" valign="top">
128
85
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
133
90
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
142
99
<div class="refsect2" title="gimp_cairo_set_source_rgba ()">
143
100
<a name="gimp-cairo-set-source-rgba"></a><h3>gimp_cairo_set_source_rgba ()</h3>
144
<pre class="programlisting">void gimp_cairo_set_source_rgba (<a
145
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"
148
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
149
>GimpRGB</a> *color);</pre>
101
<pre class="programlisting"><span class="returnvalue">void</span> gimp_cairo_set_source_rgba (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"><span class="type">cairo_t</span></a> *cr</code></em>,
102
<em class="parameter"><code>const <a href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *color</code></em>);</pre>
151
104
Sets the source pattern within <em class="parameter"><code>cr</code></em> to the solid translucent color
152
105
described by <em class="parameter"><code>color</code></em>.
155
This function calls <a
156
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-set-source-rgba"
157
><code class="function">cairo_set_source_rgba()</code></a> for you.</p>
108
This function calls <a href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-set-source-rgba"><code class="function">cairo_set_source_rgba()</code></a> for you.
160
110
<div class="variablelist"><table border="0">
161
111
<col align="left" valign="top">
164
114
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
169
119
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
178
128
<div class="refsect2" title="gimp_cairo_set_focus_line_pattern ()">
179
129
<a name="gimp-cairo-set-focus-line-pattern"></a><h3>gimp_cairo_set_focus_line_pattern ()</h3>
180
<pre class="programlisting"><a
181
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
182
>gboolean</a> gimp_cairo_set_focus_line_pattern (<a
183
href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"
186
href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"
187
>GtkWidget</a> *widget);</pre>
130
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gimp_cairo_set_focus_line_pattern (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"><span class="type">cairo_t</span></a> *cr</code></em>,
131
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
189
133
Sets color and dash pattern for stroking a focus line on the given
190
<em class="parameter"><code>cr</code></em>. The line pattern is taken from <em class="parameter"><code>widget</code></em>.</p>
134
<em class="parameter"><code>cr</code></em>. The line pattern is taken from <em class="parameter"><code>widget</code></em>.
193
136
<div class="variablelist"><table border="0">
194
137
<col align="left" valign="top">
197
140
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
202
145
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
203
<td> widget to draw the focus indicator on
146
<td>widget to draw the focus indicator on
207
150
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
209
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
210
><code class="literal">TRUE</code></a> if the widget style has a focus line pattern,
212
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
213
><code class="literal">FALSE</code></a> otherwise
151
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the widget style has a focus line pattern,
152
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
222
161
<div class="refsect2" title="gimp_cairo_checkerboard_create ()">
223
162
<a name="gimp-cairo-checkerboard-create"></a><h3>gimp_cairo_checkerboard_create ()</h3>
224
<pre class="programlisting"><a
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"
230
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
233
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
236
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
237
>GimpRGB</a> *dark);</pre>
239
Create a repeating checkerboard pattern.</p>
163
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/cairo/cairo-pattern.html#cairo-pattern-t"><span class="returnvalue">cairo_pattern_t</span></a> * gimp_cairo_checkerboard_create (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/cairo/cairo-context.html#cairo-t"><span class="type">cairo_t</span></a> *cr</code></em>,
164
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> size</code></em>,
165
<em class="parameter"><code>const <a href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *light</code></em>,
166
<em class="parameter"><code>const <a href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *dark</code></em>);</pre>
168
Create a repeating checkerboard pattern.
242
170
<div class="variablelist"><table border="0">
243
171
<col align="left" valign="top">
246
174
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
251
179
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
256
184
<td><p><span class="term"><em class="parameter"><code>light</code></em> :</span></p></td>
257
<td> light check color or <a
258
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
259
><code class="literal">NULL</code></a> to use the default light gray
185
<td>light check color or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to use the default light gray
263
189
<td><p><span class="term"><em class="parameter"><code>dark</code></em> :</span></p></td>
264
<td> dark check color or <a
265
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
266
><code class="literal">NULL</code></a> to use the default dark gray
190
<td>dark check color or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to use the default dark gray
280
204
<div class="refsect2" title="gimp_cairo_surface_create_from_pixbuf ()">
281
205
<a name="gimp-cairo-surface-create-from-pixbuf"></a><h3>gimp_cairo_surface_create_from_pixbuf ()</h3>
282
<pre class="programlisting"><a
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
286
href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
287
>GdkPixbuf</a> *pixbuf);</pre>
206
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/cairo/cairo-surface.html#cairo-surface-t"><span class="returnvalue">cairo_surface_t</span></a> * gimp_cairo_surface_create_from_pixbuf
207
(<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);</pre>
289
209
Create a Cairo image surface from a GdkPixbuf.
292
212
You should avoid calling this function as there are probably more
293
efficient ways of achieving the result you are looking for.</p>
213
efficient ways of achieving the result you are looking for.
296
215
<div class="variablelist"><table border="0">
297
216
<col align="left" valign="top">
300
219
<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
314
233
<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>
234
<a name="GIMP-CAIRO-RGB24-SET-PIXEL:CAPS"></a><h3>GIMP_CAIRO_RGB24_SET_PIXEL()</h3>
316
235
<pre class="programlisting">#define GIMP_CAIRO_RGB24_SET_PIXEL(d, r, g, b)</pre>
318
Sets a single pixel in an Cairo image surface in <code class="literal">CAIRO_FORMAT_RGB24</code>.</p>
237
Sets a single pixel in an Cairo image surface in <code class="literal">CAIRO_FORMAT_RGB24</code>.
321
239
<div class="variablelist"><table border="0">
322
240
<col align="left" valign="top">
325
243
<td><p><span class="term"><em class="parameter"><code>d</code></em> :</span></p></td>
326
<td> pointer to the destination buffer
244
<td>pointer to the destination buffer
330
248
<td><p><span class="term"><em class="parameter"><code>r</code></em> :</span></p></td>
335
253
<td><p><span class="term"><em class="parameter"><code>g</code></em> :</span></p></td>
340
258
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
349
267
<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>
268
<a name="GIMP-CAIRO-ARGB32-SET-PIXEL:CAPS"></a><h3>GIMP_CAIRO_ARGB32_SET_PIXEL()</h3>
351
269
<pre class="programlisting">#define GIMP_CAIRO_ARGB32_SET_PIXEL(d, r, g, b, a)</pre>
353
Sets a single pixel in an Cairo image surface in <code class="literal">CAIRO_FORMAT_ARGB32</code>.</p>
271
Sets a single pixel in an Cairo image surface in <code class="literal">CAIRO_FORMAT_ARGB32</code>.
356
273
<div class="variablelist"><table border="0">
357
274
<col align="left" valign="top">
360
277
<td><p><span class="term"><em class="parameter"><code>d</code></em> :</span></p></td>
361
<td> pointer to the destination buffer
278
<td>pointer to the destination buffer
365
282
<td><p><span class="term"><em class="parameter"><code>r</code></em> :</span></p></td>
366
<td> red component, not pre-multiplied
283
<td>red component, not pre-multiplied
370
287
<td><p><span class="term"><em class="parameter"><code>g</code></em> :</span></p></td>
371
<td> green component, not pre-multiplied
288
<td>green component, not pre-multiplied
375
292
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
376
<td> blue component, not pre-multiplied
293
<td>blue component, not pre-multiplied
380
297
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>