40
40
<pre class="synopsis">
41
41
#include <gdk/gdk.h>
43
<span class="returnvalue">void</span> <a class="link" href="gdk-Pixbufs.html#gdk-pixbuf-render-threshold-alpha" title="gdk_pixbuf_render_threshold_alpha ()">gdk_pixbuf_render_threshold_alpha</a> (<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>,
43
<span class="returnvalue">void</span> <a class="link" href="gdk-Pixbufs.html#gdk-pixbuf-render-threshold-alpha" title="gdk_pixbuf_render_threshold_alpha ()">gdk_pixbuf_render_threshold_alpha</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
44
44
<em class="parameter"><code><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap" title="GdkBitmap"><span class="type">GdkBitmap</span></a> *bitmap</code></em>,
45
45
<em class="parameter"><code><span class="type">int</span> src_x</code></em>,
46
46
<em class="parameter"><code><span class="type">int</span> src_y</code></em>,
49
49
<em class="parameter"><code><span class="type">int</span> width</code></em>,
50
50
<em class="parameter"><code><span class="type">int</span> height</code></em>,
51
51
<em class="parameter"><code><span class="type">int</span> alpha_threshold</code></em>);
52
<span class="returnvalue">void</span> <a class="link" href="gdk-Pixbufs.html#gdk-pixbuf-render-to-drawable" title="gdk_pixbuf_render_to_drawable ()">gdk_pixbuf_render_to_drawable</a> (<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
<span class="returnvalue">void</span> <a class="link" href="gdk-Pixbufs.html#gdk-pixbuf-render-to-drawable" title="gdk_pixbuf_render_to_drawable ()">gdk_pixbuf_render_to_drawable</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
53
53
<em class="parameter"><code><a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> *drawable</code></em>,
54
54
<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
55
55
<em class="parameter"><code><span class="type">int</span> src_x</code></em>,
61
61
<em class="parameter"><code><a class="link" href="gdk-GdkRGB.html#GdkRgbDither" title="enum GdkRgbDither"><span class="type">GdkRgbDither</span></a> dither</code></em>,
62
62
<em class="parameter"><code><span class="type">int</span> x_dither</code></em>,
63
63
<em class="parameter"><code><span class="type">int</span> y_dither</code></em>);
64
<span class="returnvalue">void</span> <a class="link" href="gdk-Pixbufs.html#gdk-pixbuf-render-to-drawable-alpha" title="gdk_pixbuf_render_to_drawable_alpha ()">gdk_pixbuf_render_to_drawable_alpha</a> (<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>,
64
<span class="returnvalue">void</span> <a class="link" href="gdk-Pixbufs.html#gdk-pixbuf-render-to-drawable-alpha" title="gdk_pixbuf_render_to_drawable_alpha ()">gdk_pixbuf_render_to_drawable_alpha</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
65
65
<em class="parameter"><code><a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> *drawable</code></em>,
66
66
<em class="parameter"><code><span class="type">int</span> src_x</code></em>,
67
67
<em class="parameter"><code><span class="type">int</span> src_y</code></em>,
69
69
<em class="parameter"><code><span class="type">int</span> dest_y</code></em>,
70
70
<em class="parameter"><code><span class="type">int</span> width</code></em>,
71
71
<em class="parameter"><code><span class="type">int</span> height</code></em>,
72
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbufAlphaMode"><span class="type">GdkPixbufAlphaMode</span></a> alpha_mode</code></em>,
72
<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbufAlphaMode"><span class="type">GdkPixbufAlphaMode</span></a> alpha_mode</code></em>,
73
73
<em class="parameter"><code><span class="type">int</span> alpha_threshold</code></em>,
74
74
<em class="parameter"><code><a class="link" href="gdk-GdkRGB.html#GdkRgbDither" title="enum GdkRgbDither"><span class="type">GdkRgbDither</span></a> dither</code></em>,
75
75
<em class="parameter"><code><span class="type">int</span> x_dither</code></em>,
76
76
<em class="parameter"><code><span class="type">int</span> y_dither</code></em>);
77
<span class="returnvalue">void</span> <a class="link" href="gdk-Pixbufs.html#gdk-pixbuf-render-pixmap-and-mask" title="gdk_pixbuf_render_pixmap_and_mask ()">gdk_pixbuf_render_pixmap_and_mask</a> (<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>,
77
<span class="returnvalue">void</span> <a class="link" href="gdk-Pixbufs.html#gdk-pixbuf-render-pixmap-and-mask" title="gdk_pixbuf_render_pixmap_and_mask ()">gdk_pixbuf_render_pixmap_and_mask</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
78
78
<em class="parameter"><code><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a> **pixmap_return</code></em>,
79
79
<em class="parameter"><code><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap" title="GdkBitmap"><span class="type">GdkBitmap</span></a> **mask_return</code></em>,
80
80
<em class="parameter"><code><span class="type">int</span> alpha_threshold</code></em>);
81
81
<span class="returnvalue">void</span> <a class="link" href="gdk-Pixbufs.html#gdk-pixbuf-render-pixmap-and-mask-for-colormap" title="gdk_pixbuf_render_pixmap_and_mask_for_colormap ()">gdk_pixbuf_render_pixmap_and_mask_for_colormap</a>
82
(<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>,
82
(<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
83
83
<em class="parameter"><code><a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="type">GdkColormap</span></a> *colormap</code></em>,
84
84
<em class="parameter"><code><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a> **pixmap_return</code></em>,
85
85
<em class="parameter"><code><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap" title="GdkBitmap"><span class="type">GdkBitmap</span></a> **mask_return</code></em>,
86
86
<em class="parameter"><code><span class="type">int</span> alpha_threshold</code></em>);
87
<a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-Pixbufs.html#gdk-pixbuf-get-from-drawable" title="gdk_pixbuf_get_from_drawable ()">gdk_pixbuf_get_from_drawable</a> (<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> *dest</code></em>,
87
<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-Pixbufs.html#gdk-pixbuf-get-from-drawable" title="gdk_pixbuf_get_from_drawable ()">gdk_pixbuf_get_from_drawable</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *dest</code></em>,
88
88
<em class="parameter"><code><a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> *src</code></em>,
89
89
<em class="parameter"><code><a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="type">GdkColormap</span></a> *cmap</code></em>,
90
90
<em class="parameter"><code><span class="type">int</span> src_x</code></em>,
93
93
<em class="parameter"><code><span class="type">int</span> dest_y</code></em>,
94
94
<em class="parameter"><code><span class="type">int</span> width</code></em>,
95
95
<em class="parameter"><code><span class="type">int</span> height</code></em>);
96
<a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-Pixbufs.html#gdk-pixbuf-get-from-image" title="gdk_pixbuf_get_from_image ()">gdk_pixbuf_get_from_image</a> (<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> *dest</code></em>,
96
<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-Pixbufs.html#gdk-pixbuf-get-from-image" title="gdk_pixbuf_get_from_image ()">gdk_pixbuf_get_from_image</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *dest</code></em>,
97
97
<em class="parameter"><code><a class="link" href="gdk-Images.html#GdkImage" title="GdkImage"><span class="type">GdkImage</span></a> *src</code></em>,
98
98
<em class="parameter"><code><a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="type">GdkColormap</span></a> *cmap</code></em>,
99
99
<em class="parameter"><code><span class="type">int</span> src_x</code></em>,
110
110
These functions allow to render pixbufs on drawables. Pixbufs are
111
111
client-side images. For details on how to create and manipulate
112
pixbufs, see the <a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> API documentation.
112
pixbufs, see the <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> API documentation.
115
115
<div class="refsect1" title="Details">
116
116
<a name="gdk-Pixbufs.details"></a><h2>Details</h2>
117
117
<div class="refsect2" title="gdk_pixbuf_render_threshold_alpha ()">
118
118
<a name="gdk-pixbuf-render-threshold-alpha"></a><h3>gdk_pixbuf_render_threshold_alpha ()</h3>
119
<pre class="programlisting"><span class="returnvalue">void</span> gdk_pixbuf_render_threshold_alpha (<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>,
119
<pre class="programlisting"><span class="returnvalue">void</span> gdk_pixbuf_render_threshold_alpha (<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
120
120
<em class="parameter"><code><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap" title="GdkBitmap"><span class="type">GdkBitmap</span></a> *bitmap</code></em>,
121
121
<em class="parameter"><code><span class="type">int</span> src_x</code></em>,
122
122
<em class="parameter"><code><span class="type">int</span> src_y</code></em>,
186
186
<div class="refsect2" title="gdk_pixbuf_render_to_drawable ()">
187
187
<a name="gdk-pixbuf-render-to-drawable"></a><h3>gdk_pixbuf_render_to_drawable ()</h3>
188
<pre class="programlisting"><span class="returnvalue">void</span> gdk_pixbuf_render_to_drawable (<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>,
188
<pre class="programlisting"><span class="returnvalue">void</span> gdk_pixbuf_render_to_drawable (<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
189
189
<em class="parameter"><code><a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> *drawable</code></em>,
190
190
<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
191
191
<em class="parameter"><code><span class="type">int</span> src_x</code></em>,
286
286
<div class="refsect2" title="gdk_pixbuf_render_to_drawable_alpha ()">
287
287
<a name="gdk-pixbuf-render-to-drawable-alpha"></a><h3>gdk_pixbuf_render_to_drawable_alpha ()</h3>
288
<pre class="programlisting"><span class="returnvalue">void</span> gdk_pixbuf_render_to_drawable_alpha (<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>,
288
<pre class="programlisting"><span class="returnvalue">void</span> gdk_pixbuf_render_to_drawable_alpha (<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
289
289
<em class="parameter"><code><a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> *drawable</code></em>,
290
290
<em class="parameter"><code><span class="type">int</span> src_x</code></em>,
291
291
<em class="parameter"><code><span class="type">int</span> src_y</code></em>,
293
293
<em class="parameter"><code><span class="type">int</span> dest_y</code></em>,
294
294
<em class="parameter"><code><span class="type">int</span> width</code></em>,
295
295
<em class="parameter"><code><span class="type">int</span> height</code></em>,
296
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbufAlphaMode"><span class="type">GdkPixbufAlphaMode</span></a> alpha_mode</code></em>,
296
<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbufAlphaMode"><span class="type">GdkPixbufAlphaMode</span></a> alpha_mode</code></em>,
297
297
<em class="parameter"><code><span class="type">int</span> alpha_threshold</code></em>,
298
298
<em class="parameter"><code><a class="link" href="gdk-GdkRGB.html#GdkRgbDither" title="enum GdkRgbDither"><span class="type">GdkRgbDither</span></a> dither</code></em>,
299
299
<em class="parameter"><code><span class="type">int</span> x_dither</code></em>,
306
306
Renders a rectangular portion of a pixbuf to a drawable. The destination
307
307
drawable must have a colormap. All windows have a colormap, however, pixmaps
308
only have colormap by default if they were created with a non-<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> window argument.
308
only have colormap by default if they were created with a non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> window argument.
309
309
Otherwise a colormap must be set on them with gdk_drawable_set_colormap.
387
387
<div class="refsect2" title="gdk_pixbuf_render_pixmap_and_mask ()">
388
388
<a name="gdk-pixbuf-render-pixmap-and-mask"></a><h3>gdk_pixbuf_render_pixmap_and_mask ()</h3>
389
<pre class="programlisting"><span class="returnvalue">void</span> gdk_pixbuf_render_pixmap_and_mask (<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>,
389
<pre class="programlisting"><span class="returnvalue">void</span> gdk_pixbuf_render_pixmap_and_mask (<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
390
390
<em class="parameter"><code><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a> **pixmap_return</code></em>,
391
391
<em class="parameter"><code><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap" title="GdkBitmap"><span class="type">GdkBitmap</span></a> **mask_return</code></em>,
392
392
<em class="parameter"><code><span class="type">int</span> alpha_threshold</code></em>);</pre>
407
407
If the pixbuf does not have an alpha channel, then *<em class="parameter"><code>mask_return</code></em> will be set
408
to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
408
to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
410
410
<div class="variablelist"><table border="0">
411
411
<col align="left" valign="top">
419
419
<td><p><span class="term"><em class="parameter"><code>pixmap_return</code></em> :</span></p></td>
420
420
<td>Location to store a pointer to the created pixmap,
421
or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the pixmap is not needed.
421
or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the pixmap is not needed.
425
425
<td><p><span class="term"><em class="parameter"><code>mask_return</code></em> :</span></p></td>
426
426
<td>Location to store a pointer to the created mask,
427
or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the mask is not needed.
427
or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the mask is not needed.
439
439
<div class="refsect2" title="gdk_pixbuf_render_pixmap_and_mask_for_colormap ()">
440
440
<a name="gdk-pixbuf-render-pixmap-and-mask-for-colormap"></a><h3>gdk_pixbuf_render_pixmap_and_mask_for_colormap ()</h3>
441
441
<pre class="programlisting"><span class="returnvalue">void</span> gdk_pixbuf_render_pixmap_and_mask_for_colormap
442
(<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>,
442
(<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
443
443
<em class="parameter"><code><a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="type">GdkColormap</span></a> *colormap</code></em>,
444
444
<em class="parameter"><code><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a> **pixmap_return</code></em>,
445
445
<em class="parameter"><code><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap" title="GdkBitmap"><span class="type">GdkBitmap</span></a> **mask_return</code></em>,
460
460
If the pixbuf does not have an alpha channel, then *<em class="parameter"><code>mask_return</code></em> will be set
461
to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
461
to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
463
463
<div class="variablelist"><table border="0">
464
464
<col align="left" valign="top">
477
477
<td><p><span class="term"><em class="parameter"><code>pixmap_return</code></em> :</span></p></td>
478
478
<td>Location to store a pointer to the created pixmap,
479
or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the pixmap is not needed.
479
or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the pixmap is not needed.
483
483
<td><p><span class="term"><em class="parameter"><code>mask_return</code></em> :</span></p></td>
484
484
<td>Location to store a pointer to the created mask,
485
or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the mask is not needed.
485
or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the mask is not needed.
497
497
<div class="refsect2" title="gdk_pixbuf_get_from_drawable ()">
498
498
<a name="gdk-pixbuf-get-from-drawable"></a><h3>gdk_pixbuf_get_from_drawable ()</h3>
499
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_get_from_drawable (<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> *dest</code></em>,
499
<pre class="programlisting"><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_get_from_drawable (<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *dest</code></em>,
500
500
<em class="parameter"><code><a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> *src</code></em>,
501
501
<em class="parameter"><code><a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="type">GdkColormap</span></a> *cmap</code></em>,
502
502
<em class="parameter"><code><span class="type">int</span> src_x</code></em>,
507
507
<em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
509
509
Transfers image data from a <a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> and converts it to an RGB(A)
510
representation inside a <a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>. In other words, copies
510
representation inside a <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>. In other words, copies
511
511
image data from a server-side drawable to a client-side RGB(A) buffer.
512
512
This allows you to efficiently read individual pixels on the client side.
515
515
If the drawable <em class="parameter"><code>src</code></em> has no colormap (<a class="link" href="gdk-Drawing-Primitives.html#gdk-drawable-get-colormap" title="gdk_drawable_get_colormap ()"><code class="function">gdk_drawable_get_colormap()</code></a>
516
returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>), then a suitable colormap must be specified.
516
returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>), then a suitable colormap must be specified.
517
517
Typically a <a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> or a pixmap created by passing a <a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>
518
518
to <a class="link" href="gdk-Bitmaps-and-Pixmaps.html#gdk-pixmap-new" title="gdk_pixmap_new ()"><code class="function">gdk_pixmap_new()</code></a> will already have a colormap associated with
519
519
it. If the drawable has a colormap, the <em class="parameter"><code>cmap</code></em> argument will be
524
524
the correct colormap to use.
527
If the specified destination pixbuf <em class="parameter"><code>dest</code></em> is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then this
527
If the specified destination pixbuf <em class="parameter"><code>dest</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then this
528
528
function will create an RGB pixbuf with 8 bits per channel and no
529
529
alpha, with the same size specified by the <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em>
530
530
arguments. In this case, the <em class="parameter"><code>dest_x</code></em> and <em class="parameter"><code>dest_y</code></em> arguments must be
531
specified as 0. If the specified destination pixbuf is not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
531
specified as 0. If the specified destination pixbuf is not <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
532
532
and it contains alpha information, then the filled pixels will be
533
533
set to full opacity (alpha = 255).
536
536
If the specified drawable is a pixmap, then the requested source
537
537
rectangle must be completely contained within the pixmap, otherwise
538
the function will return <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. For pixmaps only (not for windows)
538
the function will return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. For pixmaps only (not for windows)
539
539
passing -1 for width or height is allowed to mean the full width
540
540
or height of the pixmap.
554
554
If the target drawable is not mapped (typically because it's
555
iconified/minimized or not on the current workspace), then <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
555
iconified/minimized or not on the current workspace), then <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
556
556
will be returned.
559
If memory can't be allocated for the return value, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will be returned
559
If memory can't be allocated for the return value, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will be returned
563
563
(In short, there are several ways this function can fail, and if it fails
564
it returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>; so check the return value.)
564
it returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>; so check the return value.)
567
567
This function calls <a class="link" href="gdk-Drawing-Primitives.html#gdk-drawable-get-image" title="gdk_drawable_get_image ()"><code class="function">gdk_drawable_get_image()</code></a> internally and
568
converts the resulting image to a <a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>, so the
568
converts the resulting image to a <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>, so the
569
569
documentation for <a class="link" href="gdk-Drawing-Primitives.html#gdk-drawable-get-image" title="gdk_drawable_get_image ()"><code class="function">gdk_drawable_get_image()</code></a> may also be relevant.
571
571
<div class="variablelist"><table border="0">
575
575
<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
576
<td> Destination pixbuf, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if a new pixbuf should be created. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
576
<td> Destination pixbuf, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if a new pixbuf should be created. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
620
620
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
621
<td> The same pixbuf as <em class="parameter"><code>dest</code></em> if it was non-<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, or a newly-created
622
pixbuf with a reference count of 1 if no destination pixbuf was specified, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error
621
<td> The same pixbuf as <em class="parameter"><code>dest</code></em> if it was non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, or a newly-created
622
pixbuf with a reference count of 1 if no destination pixbuf was specified, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error
629
629
<div class="refsect2" title="gdk_pixbuf_get_from_image ()">
630
630
<a name="gdk-pixbuf-get-from-image"></a><h3>gdk_pixbuf_get_from_image ()</h3>
631
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_get_from_image (<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> *dest</code></em>,
631
<pre class="programlisting"><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_get_from_image (<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *dest</code></em>,
632
632
<em class="parameter"><code><a class="link" href="gdk-Images.html#GdkImage" title="GdkImage"><span class="type">GdkImage</span></a> *src</code></em>,
633
633
<em class="parameter"><code><a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="type">GdkColormap</span></a> *cmap</code></em>,
634
634
<em class="parameter"><code><span class="type">int</span> src_x</code></em>,
648
648
<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
649
<td> Destination pixbuf, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if a new pixbuf should be created. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
649
<td> Destination pixbuf, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if a new pixbuf should be created. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
658
658
<td><p><span class="term"><em class="parameter"><code>cmap</code></em> :</span></p></td>
659
<td> A colormap, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to use the one for <em class="parameter"><code>src</code></em>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
659
<td> A colormap, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to use the one for <em class="parameter"><code>src</code></em>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
693
693
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
694
<td> <em class="parameter"><code>dest</code></em>, newly-created pixbuf if <em class="parameter"><code>dest</code></em> was <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error
694
<td> <em class="parameter"><code>dest</code></em>, newly-created pixbuf if <em class="parameter"><code>dest</code></em> was <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error