MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //usr/local/ssl/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf-xlib-rgb.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>XlibRGB</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="The gdk-pixbuf Library">
<link rel="up" href="rn01.html" title="API Reference">
<link rel="prev" href="gdk-pixbuf-gdk-pixbuf-xlib-from-drawables.html" title="X Drawables to Pixbufs">
<link rel="next" href="rn02.html" title="Tools Reference">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="reference" href="rn01.html" title="API Reference">
<link rel="reference" href="rn02.html" title="Tools Reference">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="appendix" href="apa.html" title="Appendix&#160;A.&#160;Porting applications from Imlib to gdk-pixbuf">
<link rel="appendix" href="license.html" title="Appendix&#160;B.&#160;License">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gdk-pixbuf-gdk-pixbuf-xlib-from-drawables.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="rn01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">The <span class="application">gdk-pixbuf</span> Library</th>
<td><a accesskey="n" href="rn02.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3142496" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id3143332" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="gdk-pixbuf-gdk-pixbuf-xlib-rgb"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id3142496"></a><span class="refentrytitle">XlibRGB</span>
</h2>
<p>XlibRGB &#8212; Rendering RGB buffers to X drawables.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;gdk-pixbuf/gdk-pixbuf.h&gt;


            <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbCmap">XlibRgbCmap</a>;
enum        <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither">XlibRgbDither</a>;
void        <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-init">xlib_rgb_init</a>                   (Display *display,
                                             Screen *screen);
void        <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-init-with-depth">xlib_rgb_init_with_depth</a>        (Display *display,
                                             Screen *screen,
                                             int prefDepth);
unsigned long <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-xpixel-from-rgb">xlib_rgb_xpixel_from_rgb</a>      (<a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a> rgb);
void        <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-gc-set-foreground">xlib_rgb_gc_set_foreground</a>      (GC gc,
                                             <a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a> rgb);
void        <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-gc-set-background">xlib_rgb_gc_set_background</a>      (GC gc,
                                             <a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a> rgb);
void        <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-draw-rgb-image">xlib_draw_rgb_image</a>             (Drawable drawable,
                                             GC gc,
                                             int x,
                                             int y,
                                             int width,
                                             int height,
                                             <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither">XlibRgbDither</a> dith,
                                             unsigned char *rgb_buf,
                                             int rowstride);
void        <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-draw-rgb-image-dithalign">xlib_draw_rgb_image_dithalign</a>   (Drawable drawable,
                                             GC gc,
                                             int x,
                                             int y,
                                             int width,
                                             int height,
                                             <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither">XlibRgbDither</a> dith,
                                             unsigned char *rgb_buf,
                                             int rowstride,
                                             int xdith,
                                             int ydith);
void        <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-draw-rgb-32-image">xlib_draw_rgb_32_image</a>          (Drawable drawable,
                                             GC gc,
                                             int x,
                                             int y,
                                             int width,
                                             int height,
                                             <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither">XlibRgbDither</a> dith,
                                             unsigned char *buf,
                                             int rowstride);
void        <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-draw-gray-image">xlib_draw_gray_image</a>            (Drawable drawable,
                                             GC gc,
                                             int x,
                                             int y,
                                             int width,
                                             int height,
                                             <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither">XlibRgbDither</a> dith,
                                             unsigned char *buf,
                                             int rowstride);
<a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbCmap">XlibRgbCmap</a>* <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-cmap-new">xlib_rgb_cmap_new</a>              (<a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a> *colors,
                                             int n_colors);
void        <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-cmap-free">xlib_rgb_cmap_free</a>              (<a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbCmap">XlibRgbCmap</a> *cmap);
void        <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-draw-indexed-image">xlib_draw_indexed_image</a>         (Drawable drawable,
                                             GC gc,
                                             int x,
                                             int y,
                                             int width,
                                             int height,
                                             <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither">XlibRgbDither</a> dith,
                                             unsigned char *buf,
                                             int rowstride,
                                             <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbCmap">XlibRgbCmap</a> *cmap);
Bool        <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-ditherable">xlib_rgb_ditherable</a>             (void);
void        <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-set-verbose">xlib_rgb_set_verbose</a>            (Bool verbose);
void        <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-set-install">xlib_rgb_set_install</a>            (Bool install);
void        <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-set-min-colors">xlib_rgb_set_min_colors</a>         (int min_colors);
Colormap    <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-get-cmap">xlib_rgb_get_cmap</a>               (void);
Visual*     <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-get-visual">xlib_rgb_get_visual</a>             (void);
XVisualInfo* <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-get-visual-info">xlib_rgb_get_visual_info</a>       (void);
int         <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-get-depth">xlib_rgb_get_depth</a>              (void);
Display*    <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-get-display">xlib_rgb_get_display</a>            (void);
Screen*     <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-get-screen">xlib_rgb_get_screen</a>             (void);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3143332"></a><h2>Description</h2>
<p>
    The XlibRGB set of functions is a port of the <span class="type">GdkRGB</span> library to
    use plain Xlib and X drawables.  You can use these functions to
    render RGB buffers into drawables very quickly with high-quality
    dithering.
  </p>
</div>
<div class="refsect1" lang="en">
<a name="id3143359"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id3143370"></a><h3>
<a name="XlibRgbCmap"></a>XlibRgbCmap</h3>
<a class="indexterm" name="id3143382"></a><pre class="programlisting">typedef struct {
  unsigned int colors[256];
  unsigned char lut[256]; /* for 8-bit modes */
} XlibRgbCmap;
</pre>
<p>
    FIXME: Describe this.
  </p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term">unsigned&#160;int&#160;<em class="structfield"><code>colors</code></em>[256];</span></td>
<td>FIXME.
</td>
</tr>
<tr>
<td>
<span class="term">unsigned&#160;char&#160;<em class="structfield"><code>lut</code></em>[256];</span></td>
<td>FIXME.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3143447"></a><h3>
<a name="XlibRgbDither"></a>enum XlibRgbDither</h3>
<a class="indexterm" name="id3143460"></a><pre class="programlisting">typedef enum
{
  XLIB_RGB_DITHER_NONE,
  XLIB_RGB_DITHER_NORMAL,
  XLIB_RGB_DITHER_MAX
} XlibRgbDither;
</pre>
<p>
    These values are used to specify which dithering method should be
    used.  <span class="symbol">XLIB_RGB_DITHER_NONE</span> will use no dithering
    and simply map the colors in an RGB buffer to the closest colors
    that the display can provide.
    <span class="symbol">XLIB_RGB_DITHER_NORMAL</span> will provide dithering
    only on pseudocolor displays.
    <span class="symbol">XLIB_RGB_DITHER_MAX</span> will provide dithering on
    pseudocolor and 16-bit truecolor or &#8220;high color&#8221;
    displays.
  </p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="XLIB-RGB-DITHER-NONE:CAPS"></a><code class="literal">XLIB_RGB_DITHER_NONE</code></span></td>
<td>Specifies no dithering.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="XLIB-RGB-DITHER-NORMAL:CAPS"></a><code class="literal">XLIB_RGB_DITHER_NORMAL</code></span></td>
<td>Specifies dithering only on pseudocolor
displays.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="XLIB-RGB-DITHER-MAX:CAPS"></a><code class="literal">XLIB_RGB_DITHER_MAX</code></span></td>
<td>Specifies dithering on high color displays.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3143573"></a><h3>
<a name="xlib-rgb-init"></a>xlib_rgb_init ()</h3>
<a class="indexterm" name="id3143585"></a><pre class="programlisting">void        xlib_rgb_init                   (Display *display,
                                             Screen *screen);</pre>
<p>
Initializes the XlibRGB machinery with the default depth.  If you use this
function XlibRGB will automatically pick the best visual available on your
display.  This function or <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-init-with-depth"><code class="function">xlib_rgb_init_with_depth()</code></a> must be called before
using any of the other functions in XlibRGB.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>display</code></em>&#160;:</span></td>
<td> X Display to use.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>screen</code></em>&#160;:</span></td>
<td> Screen to use.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3143669"></a><h3>
<a name="xlib-rgb-init-with-depth"></a>xlib_rgb_init_with_depth ()</h3>
<a class="indexterm" name="id3143684"></a><pre class="programlisting">void        xlib_rgb_init_with_depth        (Display *display,
                                             Screen *screen,
                                             int prefDepth);</pre>
<p>
Initializes the XlibRGB machinery with a particular depth you specify,
instead of automatically picking the best depth in the display.  This
function or <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-init"><code class="function">xlib_rgb_init()</code></a> must be called before using any of the other
functions in XlibRGB.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>display</code></em>&#160;:</span></td>
<td> X display to use.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>screen</code></em>&#160;:</span></td>
<td> Screen to use.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>prefDepth</code></em>&#160;:</span></td>
<td> Visual depth to use for color substitution tables.  This must
be one of the supported visual depths in the specified <em class="parameter"><code>display</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3143797"></a><h3>
<a name="xlib-rgb-xpixel-from-rgb"></a>xlib_rgb_xpixel_from_rgb ()</h3>
<a class="indexterm" name="id3143810"></a><pre class="programlisting">unsigned long xlib_rgb_xpixel_from_rgb      (<a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a> rgb);</pre>
<p>
Converts an RGB triplet into the closest color that XlibRGB visual can
handle.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>rgb</code></em>&#160;:</span></td>
<td> 32-bit representation of an RGB value, specified as 0x00RRGGBB.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> X pixel value that corresponds to the closest color in the
XlibRGB visual and colormap.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3143874"></a><h3>
<a name="xlib-rgb-gc-set-foreground"></a>xlib_rgb_gc_set_foreground ()</h3>
<a class="indexterm" name="id3143887"></a><pre class="programlisting">void        xlib_rgb_gc_set_foreground      (GC gc,
                                             <a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a> rgb);</pre>
<p>
This is a convenience function to set the foreground of a GC from an RGB
triplet.  It calls <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-xpixel-from-rgb"><code class="function">xlib_rgb_xpixel_from_rgb()</code></a> internally and uses the
returned pixel value to set the GC's foreground.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> A graphic context.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>rgb</code></em>&#160;:</span></td>
<td> 32-bit representation of an RGB value, specified as 0x00RRGGBB.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3143971"></a><h3>
<a name="xlib-rgb-gc-set-background"></a>xlib_rgb_gc_set_background ()</h3>
<a class="indexterm" name="id3143984"></a><pre class="programlisting">void        xlib_rgb_gc_set_background      (GC gc,
                                             <a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a> rgb);</pre>
<p>
This is a convenience function to set the background of a GC from an RGB
triplet.  It calls <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-rgb-xpixel-from-rgb"><code class="function">xlib_rgb_xpixel_from_rgb()</code></a> internally and uses the
returned pixel value to set the GC's background.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> A graphic context.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>rgb</code></em>&#160;:</span></td>
<td> 32-bit representation of an RGB value, specified as 0x00RRGGBB.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3144069"></a><h3>
<a name="xlib-draw-rgb-image"></a>xlib_draw_rgb_image ()</h3>
<a class="indexterm" name="id3144082"></a><pre class="programlisting">void        xlib_draw_rgb_image             (Drawable drawable,
                                             GC gc,
                                             int x,
                                             int y,
                                             int width,
                                             int height,
                                             <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither">XlibRgbDither</a> dith,
                                             unsigned char *rgb_buf,
                                             int rowstride);</pre>
<p>
Renders an RGB buffer to a drawable.  Pixels are specified as RGB triplets
with 8 bits per channel.  An image will thus look like an RGBRGBRGBRGB
sequence of 8-bit values.  This function does not let you specify dither
offsets; applications that need to render partial regions of a buffer to
build the final image should use <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-draw-rgb-image-dithalign"><code class="function">xlib_draw_rgb_image_dithalign()</code></a> instead.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td> Destination drawable.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> A graphic context.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
<td> Leftmost coordinate of the destination rectangle.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
<td> Upper coordinate of the destination rectangle.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></td>
<td> Width of the destination rectangle, in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></td>
<td> Height of the destination rectangle, in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dith</code></em>&#160;:</span></td>
<td> Dithering method to use.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>rgb_buf</code></em>&#160;:</span></td>
<td> Pointer to the pixel in the RGB buffer that corresponds to the
upper-left corner of the rectangular region to render.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>rowstride</code></em>&#160;:</span></td>
<td> Offset between pixel rows in the RGB buffer, in bytes.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3144323"></a><h3>
<a name="xlib-draw-rgb-image-dithalign"></a>xlib_draw_rgb_image_dithalign ()</h3>
<a class="indexterm" name="id3144336"></a><pre class="programlisting">void        xlib_draw_rgb_image_dithalign   (Drawable drawable,
                                             GC gc,
                                             int x,
                                             int y,
                                             int width,
                                             int height,
                                             <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither">XlibRgbDither</a> dith,
                                             unsigned char *rgb_buf,
                                             int rowstride,
                                             int xdith,
                                             int ydith);</pre>
<p>
Renders an RGB buffer to a drawable.  Pixels are specified as RGB triplets
with 8 bits per channel.  An image will thus look like an RGBRGBRGBRGB
sequence of 8-bit values.  This function lets you specify a pair of dither
offsets.  It should be used when you need to render regions of an RGB buffer
separately to form the final image; the dither offsets let you align the
dither mask appropriately.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td> Destination drawable.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> A graphic context.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
<td> Leftmost coordinate of the destination rectangle.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
<td> Upper coordinate of the destination rectangle.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></td>
<td> Width of the destination rectangle, in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></td>
<td> Height of the destination rectangle, in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dith</code></em>&#160;:</span></td>
<td> Dithering method to use.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>rgb_buf</code></em>&#160;:</span></td>
<td> Pointer to the pixel in the RGB buffer that corresponds to the
upper-left corner of the rectangular region to render.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>rowstride</code></em>&#160;:</span></td>
<td> Offset between pixel rows in the RGB buffer, in bytes.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>xdith</code></em>&#160;:</span></td>
<td> X offset for the dither mask.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ydith</code></em>&#160;:</span></td>
<td> Y offset for the dither mask.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3144610"></a><h3>
<a name="xlib-draw-rgb-32-image"></a>xlib_draw_rgb_32_image ()</h3>
<a class="indexterm" name="id3144623"></a><pre class="programlisting">void        xlib_draw_rgb_32_image          (Drawable drawable,
                                             GC gc,
                                             int x,
                                             int y,
                                             int width,
                                             int height,
                                             <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither">XlibRgbDither</a> dith,
                                             unsigned char *buf,
                                             int rowstride);</pre>
<p>
This function is analogous to <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-draw-rgb-image"><code class="function">xlib_draw_rgb_image()</code></a>, but it lets you use
32-bit RGB buffers with pixels specified as 0xRRGGBB00.  The
least-significant 8 bits are actually discarded.  This function can lead to
faster results than <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#xlib-draw-rgb-image"><code class="function">xlib_draw_rgb_image()</code></a> since the pixels are aligned on
32-bit boundaries.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td> Destination drawable.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> A graphic context.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
<td> Leftmost coordinate of the destination rectangle.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
<td> Upper coordinate of the destination rectangle.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></td>
<td> Width of the destination rectangle, in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></td>
<td> Height of the destination rectangle, in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dith</code></em>&#160;:</span></td>
<td> Dithering method to use.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>buf</code></em>&#160;:</span></td>
<td> Pointer to the pixel in the RGB buffer that corresponds to the
upper-left corner of the rectangular region to render.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>rowstride</code></em>&#160;:</span></td>
<td> Offset between pixel rows in the RGB buffer, in bytes.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3144873"></a><h3>
<a name="xlib-draw-gray-image"></a>xlib_draw_gray_image ()</h3>
<a class="indexterm" name="id3144886"></a><pre class="programlisting">void        xlib_draw_gray_image            (Drawable drawable,
                                             GC gc,
                                             int x,
                                             int y,
                                             int width,
                                             int height,
                                             <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither">XlibRgbDither</a> dith,
                                             unsigned char *buf,
                                             int rowstride);</pre>
<p>
Renders a grayscale buffer to a drawable.  Pixels are specified as 8-bit
intensity values.  An image will thus look as a GGGGGG sequence of 8-bit
values.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td> Destination drawable.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> A graphic context.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
<td> Leftmost coordinate of the destination rectangle.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
<td> Upper coordinate of the destination rectangle.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></td>
<td> Width of the destination rectangle, in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></td>
<td> Height of thd destination rectangle, in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dith</code></em>&#160;:</span></td>
<td> Dithering method to use.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>buf</code></em>&#160;:</span></td>
<td> Pointer to the pixel in the grayscale buffer that corresponds to the
upper-left corner of the rectangular region to render.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>rowstride</code></em>&#160;:</span></td>
<td> Offset between pixel rows in the grayscale buffer, in pixels.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3145112"></a><h3>
<a name="xlib-rgb-cmap-new"></a>xlib_rgb_cmap_new ()</h3>
<a class="indexterm" name="id3145125"></a><pre class="programlisting"><a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbCmap">XlibRgbCmap</a>* xlib_rgb_cmap_new              (<a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a> *colors,
                                             int n_colors);</pre>
<p>
FIXME</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>colors</code></em>&#160;:</span></td>
<td> FIXME
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_colors</code></em>&#160;:</span></td>
<td> FIXME
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> FIXME
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3145206"></a><h3>
<a name="xlib-rgb-cmap-free"></a>xlib_rgb_cmap_free ()</h3>
<a class="indexterm" name="id3145219"></a><pre class="programlisting">void        xlib_rgb_cmap_free              (<a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbCmap">XlibRgbCmap</a> *cmap);</pre>
<p>
Frees an XlibRGB colormap.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>cmap</code></em>&#160;:</span></td>
<td> An XlibRGB colormap.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3145269"></a><h3>
<a name="xlib-draw-indexed-image"></a>xlib_draw_indexed_image ()</h3>
<a class="indexterm" name="id3145282"></a><pre class="programlisting">void        xlib_draw_indexed_image         (Drawable drawable,
                                             GC gc,
                                             int x,
                                             int y,
                                             int width,
                                             int height,
                                             <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbDither">XlibRgbDither</a> dith,
                                             unsigned char *buf,
                                             int rowstride,
                                             <a href="gdk-pixbuf-gdk-pixbuf-xlib-rgb.html#XlibRgbCmap">XlibRgbCmap</a> *cmap);</pre>
<p>
FIXME</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td> FIXME
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> FIXME
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
<td> FIXME
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
<td> FIXME
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></td>
<td> FIXME
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></td>
<td> FIXME
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dith</code></em>&#160;:</span></td>
<td> FIXME
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>buf</code></em>&#160;:</span></td>
<td> FIXME
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>rowstride</code></em>&#160;:</span></td>
<td> FIXME
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>cmap</code></em>&#160;:</span></td>
<td> FIXME
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3145521"></a><h3>
<a name="xlib-rgb-ditherable"></a>xlib_rgb_ditherable ()</h3>
<a class="indexterm" name="id3145534"></a><pre class="programlisting">Bool        xlib_rgb_ditherable             (void);</pre>
<p>
Queries whether XlibRGB supports dithering for its chosen visual.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE if dithering can be performed for the visual that XlibRGB
is using, FALSE otherwise.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3145576"></a><h3>
<a name="xlib-rgb-set-verbose"></a>xlib_rgb_set_verbose ()</h3>
<a class="indexterm" name="id3145588"></a><pre class="programlisting">void        xlib_rgb_set_verbose            (Bool verbose);</pre>
<p>
Enables/disables debug spew.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>verbose</code></em>&#160;:</span></td>
<td> <code class="literal">True</code> to be verbose
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3145649"></a><h3>
<a name="xlib-rgb-set-install"></a>xlib_rgb_set_install ()</h3>
<a class="indexterm" name="id3145662"></a><pre class="programlisting">void        xlib_rgb_set_install            (Bool install);</pre>
<p>
Sets whether we install an RGB colormap.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>install</code></em>&#160;:</span></td>
<td> <code class="literal">True</code> to install a colormap
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3145722"></a><h3>
<a name="xlib-rgb-set-min-colors"></a>xlib_rgb_set_min_colors ()</h3>
<a class="indexterm" name="id3145735"></a><pre class="programlisting">void        xlib_rgb_set_min_colors         (int min_colors);</pre>
<p>
Sets the minimum number of colors in the color cube.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>min_colors</code></em>&#160;:</span></td>
<td> minimum colors to use
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3145786"></a><h3>
<a name="xlib-rgb-get-cmap"></a>xlib_rgb_get_cmap ()</h3>
<a class="indexterm" name="id3145799"></a><pre class="programlisting">Colormap    xlib_rgb_get_cmap               (void);</pre>
<p>
Queries the X colormap that XlibRGB is using.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> An X colormap.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3145839"></a><h3>
<a name="xlib-rgb-get-visual"></a>xlib_rgb_get_visual ()</h3>
<a class="indexterm" name="id3145852"></a><pre class="programlisting">Visual*     xlib_rgb_get_visual             (void);</pre>
<p>
Queries the visual that XlibRGB is using.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> An X visual.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3145892"></a><h3>
<a name="xlib-rgb-get-visual-info"></a>xlib_rgb_get_visual_info ()</h3>
<a class="indexterm" name="id3145905"></a><pre class="programlisting">XVisualInfo* xlib_rgb_get_visual_info       (void);</pre>
<p>
Queries the visual info structure for the visual that XlibRGB is using.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> An XVisualInfo structure.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3145946"></a><h3>
<a name="xlib-rgb-get-depth"></a>xlib_rgb_get_depth ()</h3>
<a class="indexterm" name="id3145959"></a><pre class="programlisting">int         xlib_rgb_get_depth              (void);</pre>
<p>
Queries the depth of the visual that XlibRGB is using.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> Bit depth.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3145999"></a><h3>
<a name="xlib-rgb-get-display"></a>xlib_rgb_get_display ()</h3>
<a class="indexterm" name="id3146012"></a><pre class="programlisting">Display*    xlib_rgb_get_display            (void);</pre>
<p>
Queries the X display that XlibRGB is using.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> An X display.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3146052"></a><h3>
<a name="xlib-rgb-get-screen"></a>xlib_rgb_get_screen ()</h3>
<a class="indexterm" name="id3146066"></a><pre class="programlisting">Screen*     xlib_rgb_get_screen             (void);</pre>
<p>
Queries the screen that XlibRGB is using.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> An X screen.
</td>
</tr></tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id3146107"></a><h2>See Also</h2>
<p>
    GdkRGB
  </p>
</div>
</div>
</body>
</html>