Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GdkRGB: GDK 2 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GDK 2 Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="gdk2-Bitmaps-and-Pixmaps.html" title="Bitmaps and Pixmaps">
<link rel="next" href="gdk2-Images.html" title="Images">
<meta name="generator" content="GTK-Doc V1.26.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#gdk2-GdkRGB.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gdk2-Bitmaps-and-Pixmaps.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gdk2-Images.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gdk2-GdkRGB"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdk2-GdkRGB.top_of_page"></a>GdkRGB</span></h2>
<p>GdkRGB</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gdk2-GdkRGB.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-rgb-init" title="gdk_rgb_init ()">gdk_rgb_init</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-draw-rgb-image" title="gdk_draw_rgb_image ()">gdk_draw_rgb_image</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-draw-rgb-image-dithalign" title="gdk_draw_rgb_image_dithalign ()">gdk_draw_rgb_image_dithalign</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-draw-indexed-image" title="gdk_draw_indexed_image ()">gdk_draw_indexed_image</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-draw-gray-image" title="gdk_draw_gray_image ()">gdk_draw_gray_image</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-draw-rgb-32-image" title="gdk_draw_rgb_32_image ()">gdk_draw_rgb_32_image</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-draw-rgb-32-image-dithalign" title="gdk_draw_rgb_32_image_dithalign ()">gdk_draw_rgb_32_image_dithalign</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk2-GdkRGB.html#GdkRgbCmap" title="struct GdkRgbCmap"><span class="returnvalue">GdkRgbCmap</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-rgb-cmap-new" title="gdk_rgb_cmap_new ()">gdk_rgb_cmap_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-rgb-cmap-free" title="gdk_rgb_cmap_free ()">gdk_rgb_cmap_free</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-rgb-gc-set-foreground" title="gdk_rgb_gc_set_foreground ()">gdk_rgb_gc_set_foreground</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-rgb-gc-set-background" title="gdk_rgb_gc_set_background ()">gdk_rgb_gc_set_background</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a>
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-rgb-xpixel-from-rgb" title="gdk_rgb_xpixel_from_rgb ()">gdk_rgb_xpixel_from_rgb</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-rgb-find-color" title="gdk_rgb_find_color ()">gdk_rgb_find_color</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-rgb-set-install" title="gdk_rgb_set_install ()">gdk_rgb_set_install</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-rgb-set-min-colors" title="gdk_rgb_set_min_colors ()">gdk_rgb_set_min_colors</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="returnvalue">GdkVisual</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-rgb-get-visual" title="gdk_rgb_get_visual ()">gdk_rgb_get_visual</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk2-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="returnvalue">GdkColormap</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-rgb-get-colormap" title="gdk_rgb_get_colormap ()">gdk_rgb_get_colormap</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-rgb-ditherable" title="gdk_rgb_ditherable ()">gdk_rgb_ditherable</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-rgb-colormap-ditherable" title="gdk_rgb_colormap_ditherable ()">gdk_rgb_colormap_ditherable</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-GdkRGB.html#gdk-rgb-set-verbose" title="gdk_rgb_set_verbose ()">gdk_rgb_set_verbose</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gdk2-GdkRGB.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="gdk2-GdkRGB.html#GdkRgbDither" title="enum GdkRgbDither">GdkRgbDither</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gdk2-GdkRGB.html#GdkRgbCmap" title="struct GdkRgbCmap">GdkRgbCmap</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gdk2-GdkRGB.html#gdk-rgb-get-cmap" title="gdk_rgb_get_cmap">gdk_rgb_get_cmap</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gdk2-GdkRGB.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gdk/gdk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="gdk2-GdkRGB.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="gdk2-GdkRGB.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gdk-rgb-init"></a><h3>gdk_rgb_init ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_rgb_init (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_rgb_init</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-draw-rgb-image"></a><h3>gdk_draw_rgb_image ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_draw_rgb_image (<em class="parameter"><code><a class="link" href="gdk2-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> *drawable</code></em>,
                    <em class="parameter"><code><a class="link" href="gdk2-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                    <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x</code></em>,
                    <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y</code></em>,
                    <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
                    <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
                    <em class="parameter"><code><a class="link" href="gdk2-GdkRGB.html#GdkRgbDither" title="enum GdkRgbDither"><span class="type">GdkRgbDither</span></a> dith</code></em>,
                    <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *rgb_buf</code></em>,
                    <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> rowstride</code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_draw_rgb_image</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-draw-rgb-image-dithalign"></a><h3>gdk_draw_rgb_image_dithalign ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_draw_rgb_image_dithalign (<em class="parameter"><code><a class="link" href="gdk2-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> *drawable</code></em>,
                              <em class="parameter"><code><a class="link" href="gdk2-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                              <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x</code></em>,
                              <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y</code></em>,
                              <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
                              <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
                              <em class="parameter"><code><a class="link" href="gdk2-GdkRGB.html#GdkRgbDither" title="enum GdkRgbDither"><span class="type">GdkRgbDither</span></a> dith</code></em>,
                              <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *rgb_buf</code></em>,
                              <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> rowstride</code></em>,
                              <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> xdith</code></em>,
                              <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> ydith</code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_draw_rgb_image_dithalign</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-draw-indexed-image"></a><h3>gdk_draw_indexed_image ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_draw_indexed_image (<em class="parameter"><code><a class="link" href="gdk2-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> *drawable</code></em>,
                        <em class="parameter"><code><a class="link" href="gdk2-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                        <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x</code></em>,
                        <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y</code></em>,
                        <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
                        <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
                        <em class="parameter"><code><a class="link" href="gdk2-GdkRGB.html#GdkRgbDither" title="enum GdkRgbDither"><span class="type">GdkRgbDither</span></a> dith</code></em>,
                        <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *buf</code></em>,
                        <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> rowstride</code></em>,
                        <em class="parameter"><code><a class="link" href="gdk2-GdkRGB.html#GdkRgbCmap" title="struct GdkRgbCmap"><span class="type">GdkRgbCmap</span></a> *cmap</code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_draw_indexed_image</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-draw-gray-image"></a><h3>gdk_draw_gray_image ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_draw_gray_image (<em class="parameter"><code><a class="link" href="gdk2-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> *drawable</code></em>,
                     <em class="parameter"><code><a class="link" href="gdk2-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                     <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x</code></em>,
                     <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y</code></em>,
                     <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
                     <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
                     <em class="parameter"><code><a class="link" href="gdk2-GdkRGB.html#GdkRgbDither" title="enum GdkRgbDither"><span class="type">GdkRgbDither</span></a> dith</code></em>,
                     <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *buf</code></em>,
                     <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> rowstride</code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_draw_gray_image</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-draw-rgb-32-image"></a><h3>gdk_draw_rgb_32_image ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_draw_rgb_32_image (<em class="parameter"><code><a class="link" href="gdk2-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> *drawable</code></em>,
                       <em class="parameter"><code><a class="link" href="gdk2-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                       <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x</code></em>,
                       <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y</code></em>,
                       <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
                       <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
                       <em class="parameter"><code><a class="link" href="gdk2-GdkRGB.html#GdkRgbDither" title="enum GdkRgbDither"><span class="type">GdkRgbDither</span></a> dith</code></em>,
                       <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *buf</code></em>,
                       <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> rowstride</code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_draw_rgb_32_image</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-draw-rgb-32-image-dithalign"></a><h3>gdk_draw_rgb_32_image_dithalign ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_draw_rgb_32_image_dithalign (<em class="parameter"><code><a class="link" href="gdk2-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> *drawable</code></em>,
                                 <em class="parameter"><code><a class="link" href="gdk2-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x</code></em>,
                                 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y</code></em>,
                                 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
                                 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
                                 <em class="parameter"><code><a class="link" href="gdk2-GdkRGB.html#GdkRgbDither" title="enum GdkRgbDither"><span class="type">GdkRgbDither</span></a> dith</code></em>,
                                 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *buf</code></em>,
                                 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> rowstride</code></em>,
                                 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> xdith</code></em>,
                                 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> ydith</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_draw_rgb_32_image_dithalign</code> has been deprecated since version 2.22 and should not be used in newly-written code.</p>
<p>Cairo handles colors automatically.</p>
</div>
<p>Like <a class="link" href="gdk2-GdkRGB.html#gdk-draw-rgb-32-image" title="gdk_draw_rgb_32_image ()"><code class="function">gdk_draw_rgb_32_image()</code></a>, but allows you to specify the dither
offsets. See <a class="link" href="gdk2-GdkRGB.html#gdk-draw-rgb-image-dithalign" title="gdk_draw_rgb_image_dithalign ()"><code class="function">gdk_draw_rgb_image_dithalign()</code></a> for more details.</p>
<div class="refsect3">
<a name="gdk-draw-rgb-32-image-dithalign.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>drawable</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk2-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>gc</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk2-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>x</p></td>
<td class="parameter_description"><p>X coordinate on <em class="parameter"><code>drawable</code></em>
where image should go</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>y</p></td>
<td class="parameter_description"><p>Y coordinate on <em class="parameter"><code>drawable</code></em>
where image should go</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>width</p></td>
<td class="parameter_description"><p>width of area of image to draw</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>height</p></td>
<td class="parameter_description"><p>height of area of image to draw</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dith</p></td>
<td class="parameter_description"><p>dithering mode</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>RGB image data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>rowstride</p></td>
<td class="parameter_description"><p>rowstride of RGB image data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>xdith</p></td>
<td class="parameter_description"><p>X dither offset</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>ydith</p></td>
<td class="parameter_description"><p>Y dither offset</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-rgb-cmap-new"></a><h3>gdk_rgb_cmap_new ()</h3>
<pre class="programlisting"><a class="link" href="gdk2-GdkRGB.html#GdkRgbCmap" title="struct GdkRgbCmap"><span class="returnvalue">GdkRgbCmap</span></a> *
gdk_rgb_cmap_new (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *colors</code></em>,
                  <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_colors</code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_rgb_cmap_new</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-rgb-cmap-free"></a><h3>gdk_rgb_cmap_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_rgb_cmap_free (<em class="parameter"><code><a class="link" href="gdk2-GdkRGB.html#GdkRgbCmap" title="struct GdkRgbCmap"><span class="type">GdkRgbCmap</span></a> *cmap</code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_rgb_cmap_free</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-rgb-gc-set-foreground"></a><h3>gdk_rgb_gc_set_foreground ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_rgb_gc_set_foreground (<em class="parameter"><code><a class="link" href="gdk2-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                           <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> rgb</code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_rgb_gc_set_foreground</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-rgb-gc-set-background"></a><h3>gdk_rgb_gc_set_background ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_rgb_gc_set_background (<em class="parameter"><code><a class="link" href="gdk2-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                           <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> rgb</code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_rgb_gc_set_background</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-rgb-xpixel-from-rgb"></a><h3>gdk_rgb_xpixel_from_rgb ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a>
gdk_rgb_xpixel_from_rgb (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> rgb</code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_rgb_xpixel_from_rgb</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-rgb-find-color"></a><h3>gdk_rgb_find_color ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_rgb_find_color (<em class="parameter"><code><a class="link" href="gdk2-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="type">GdkColormap</span></a> *colormap</code></em>,
                    <em class="parameter"><code><a class="link" href="gdk2-Colormaps-and-Colors.html#GdkColor" title="GdkColor"><span class="type">GdkColor</span></a> *color</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_rgb_find_color</code> has been deprecated since version 2.22 and should not be used in newly-written code.</p>
<p>Cairo handles colors automatically.</p>
</div>
<p><em class="parameter"><code>colormap</code></em>
 should be the colormap for the graphics context and
drawable you're using to draw. If you're drawing to a <a href="../gtk4/GtkWidget.html#GtkWidget-struct"><span class="type">GtkWidget</span></a>,
call <code class="function">gtk_widget_get_colormap()</code>.</p>
<p><em class="parameter"><code>color</code></em>
 should have its <code class="literal">red</code>, <code class="literal">green</code>, and <code class="literal">blue</code> fields initialized;
<a class="link" href="gdk2-GdkRGB.html#gdk-rgb-find-color" title="gdk_rgb_find_color ()"><code class="function">gdk_rgb_find_color()</code></a> will fill in the <code class="literal">pixel</code> field with the best
matching pixel from a color cube. The color is then ready to be
used for drawing, e.g. you can call <a class="link" href="gdk2-Graphics-Contexts.html#gdk-gc-set-foreground" title="gdk_gc_set_foreground ()"><code class="function">gdk_gc_set_foreground()</code></a> which
expects <code class="literal">pixel</code> to be initialized.</p>
<p>In many cases, you can avoid this whole issue by calling
<a class="link" href="gdk2-Graphics-Contexts.html#gdk-gc-set-rgb-fg-color" title="gdk_gc_set_rgb_fg_color ()"><code class="function">gdk_gc_set_rgb_fg_color()</code></a> or <a class="link" href="gdk2-Graphics-Contexts.html#gdk-gc-set-rgb-bg-color" title="gdk_gc_set_rgb_bg_color ()"><code class="function">gdk_gc_set_rgb_bg_color()</code></a>, which
do not expect <code class="literal">pixel</code> to be initialized in advance. If you use those
functions, there's no need for <a class="link" href="gdk2-GdkRGB.html#gdk-rgb-find-color" title="gdk_rgb_find_color ()"><code class="function">gdk_rgb_find_color()</code></a>.</p>
<div class="refsect3">
<a name="gdk-rgb-find-color.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>colormap</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk2-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="type">GdkColormap</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>color</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk2-Colormaps-and-Colors.html#GdkColor" title="GdkColor"><span class="type">GdkColor</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-rgb-set-install"></a><h3>gdk_rgb_set_install ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_rgb_set_install (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> install</code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_rgb_set_install</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-rgb-set-min-colors"></a><h3>gdk_rgb_set_min_colors ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_rgb_set_min_colors (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> min_colors</code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_rgb_set_min_colors</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-rgb-get-visual"></a><h3>gdk_rgb_get_visual ()</h3>
<pre class="programlisting"><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="returnvalue">GdkVisual</span></a> *
gdk_rgb_get_visual (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_rgb_get_visual</code> has been deprecated since version 2.22 and should not be used in newly-written code.</p>
<p>Use gdk_visual_get_system_visual (<a class="link" href="GdkScreen.html#gdk-screen-get-default" title="gdk_screen_get_default ()"><code class="function">gdk_screen_get_default()</code></a>) instead.</p>
</div>
<p>Gets a "preferred visual" chosen by GdkRGB for rendering image data
on the default screen. In previous versions of GDK, this was the
only visual GdkRGB could use for rendering. In current versions,
it's simply the visual GdkRGB would have chosen as the optimal one
in those previous versions. GdkRGB can now render to drawables with
any visual.</p>
<div class="refsect3">
<a name="gdk-rgb-get-visual.returns"></a><h4>Returns</h4>
<p>The <a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> chosen by GdkRGB. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-rgb-get-colormap"></a><h3>gdk_rgb_get_colormap ()</h3>
<pre class="programlisting"><a class="link" href="gdk2-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="returnvalue">GdkColormap</span></a> *
gdk_rgb_get_colormap (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_rgb_get_colormap</code> has been deprecated since version 2.22 and should not be used in newly-written code.</p>
<p>Use gdk_screen_get_system_colormap (<a class="link" href="GdkScreen.html#gdk-screen-get-default" title="gdk_screen_get_default ()"><code class="function">gdk_screen_get_default()</code></a>) instead.</p>
</div>
<p>Get the preferred colormap for rendering image data.  Not a
very useful function; historically, GDK could only render RGB image
data to one colormap and visual, but in the current version it can
render to any colormap and visual. So there's no need to call this
function.</p>
<div class="refsect3">
<a name="gdk-rgb-get-colormap.returns"></a><h4>Returns</h4>
<p>the preferred colormap. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-rgb-ditherable"></a><h3>gdk_rgb_ditherable ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gdk_rgb_ditherable (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_rgb_ditherable</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-rgb-colormap-ditherable"></a><h3>gdk_rgb_colormap_ditherable ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gdk_rgb_colormap_ditherable (<em class="parameter"><code><a class="link" href="gdk2-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="type">GdkColormap</span></a> *cmap</code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_rgb_colormap_ditherable</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-rgb-set-verbose"></a><h3>gdk_rgb_set_verbose ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_rgb_set_verbose (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> verbose</code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_rgb_set_verbose</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
</div>
<div class="refsect1">
<a name="gdk2-GdkRGB.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GdkRgbDither"></a><h3>enum GdkRgbDither</h3>
<div class="refsect3">
<a name="GdkRgbDither.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GDK-RGB-DITHER-NONE:CAPS"></a>GDK_RGB_DITHER_NONE</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-RGB-DITHER-NORMAL:CAPS"></a>GDK_RGB_DITHER_NORMAL</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-RGB-DITHER-MAX:CAPS"></a>GDK_RGB_DITHER_MAX</p></td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GdkRgbCmap"></a><h3>struct GdkRgbCmap</h3>
<pre class="programlisting">struct GdkRgbCmap {
  guint32 colors[256];
  gint n_colors;
};
</pre>
<div class="warning"><p><code class="literal">GdkRgbCmap</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-rgb-get-cmap"></a><h3>gdk_rgb_get_cmap</h3>
<pre class="programlisting">#define gdk_rgb_get_cmap               gdk_rgb_get_colormap
</pre>
<div class="warning"><p><code class="literal">gdk_rgb_get_cmap</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.26.1</div>
</body>
</html>