<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="gdk-Drawing-Primitives">
<refmeta>
<refentrytitle role="top_of_page" id="gdk-Drawing-Primitives.top_of_page">Drawing Primitives</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GDK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>Drawing Primitives</refname>
<refpurpose>Functions for drawing points, lines, arcs, and text</refpurpose>
</refnamediv>

<refsynopsisdiv id="gdk-Drawing-Primitives.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>
<anchor id="GdkDrawable"/>
<synopsis>

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

                    <link linkend="GdkDrawable-struct">GdkDrawable</link>;
<link linkend="GdkDrawable">GdkDrawable</link>*        <link linkend="gdk-drawable-ref">gdk_drawable_ref</link>                    (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);
<link linkend="void">void</link>                <link linkend="gdk-drawable-unref">gdk_drawable_unref</link>                  (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);
<link linkend="void">void</link>                <link linkend="gdk-drawable-set-data">gdk_drawable_set_data</link>               (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         const <link linkend="gchar">gchar</link> *key,
                                                         <link linkend="gpointer">gpointer</link> data,
                                                         <link linkend="GDestroyNotify">GDestroyNotify</link> destroy_func);
<link linkend="gpointer">gpointer</link>            <link linkend="gdk-drawable-get-data">gdk_drawable_get_data</link>               (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         const <link linkend="gchar">gchar</link> *key);
<link linkend="GdkDisplay">GdkDisplay</link>*         <link linkend="gdk-drawable-get-display">gdk_drawable_get_display</link>            (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);
<link linkend="GdkScreen">GdkScreen</link>*          <link linkend="gdk-drawable-get-screen">gdk_drawable_get_screen</link>             (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);
<link linkend="GdkVisual">GdkVisual</link>*          <link linkend="gdk-drawable-get-visual">gdk_drawable_get_visual</link>             (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);
<link linkend="void">void</link>                <link linkend="gdk-drawable-set-colormap">gdk_drawable_set_colormap</link>           (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkColormap">GdkColormap</link> *colormap);
<link linkend="GdkColormap">GdkColormap</link>*        <link linkend="gdk-drawable-get-colormap">gdk_drawable_get_colormap</link>           (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);
<link linkend="gint">gint</link>                <link linkend="gdk-drawable-get-depth">gdk_drawable_get_depth</link>              (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);
<link linkend="void">void</link>                <link linkend="gdk-drawable-get-size">gdk_drawable_get_size</link>               (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="gint">gint</link> *width,
                                                         <link linkend="gint">gint</link> *height);
<link linkend="GdkRegion">GdkRegion</link> *         <link linkend="gdk-drawable-get-clip-region">gdk_drawable_get_clip_region</link>        (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);
<link linkend="GdkRegion">GdkRegion</link> *         <link linkend="gdk-drawable-get-visible-region">gdk_drawable_get_visible_region</link>     (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);

<link linkend="void">void</link>                <link linkend="gdk-draw-point">gdk_draw_point</link>                      (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y);
<link linkend="void">void</link>                <link linkend="gdk-draw-points">gdk_draw_points</link>                     (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         const <link linkend="GdkPoint">GdkPoint</link> *points,
                                                         <link linkend="gint">gint</link> n_points);
<link linkend="void">void</link>                <link linkend="gdk-draw-line">gdk_draw_line</link>                       (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x1_,
                                                         <link linkend="gint">gint</link> y1_,
                                                         <link linkend="gint">gint</link> x2_,
                                                         <link linkend="gint">gint</link> y2_);
<link linkend="void">void</link>                <link linkend="gdk-draw-lines">gdk_draw_lines</link>                      (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         const <link linkend="GdkPoint">GdkPoint</link> *points,
                                                         <link linkend="gint">gint</link> n_points);
<link linkend="void">void</link>                <link linkend="gdk-draw-pixbuf">gdk_draw_pixbuf</link>                     (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf,
                                                         <link linkend="gint">gint</link> src_x,
                                                         <link linkend="gint">gint</link> src_y,
                                                         <link linkend="gint">gint</link> dest_x,
                                                         <link linkend="gint">gint</link> dest_y,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height,
                                                         <link linkend="GdkRgbDither">GdkRgbDither</link> dither,
                                                         <link linkend="gint">gint</link> x_dither,
                                                         <link linkend="gint">gint</link> y_dither);
<link linkend="void">void</link>                <link linkend="gdk-draw-segments">gdk_draw_segments</link>                   (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         const <link linkend="GdkSegment">GdkSegment</link> *segs,
                                                         <link linkend="gint">gint</link> n_segs);
                    <link linkend="GdkSegment">GdkSegment</link>;
<link linkend="void">void</link>                <link linkend="gdk-draw-rectangle">gdk_draw_rectangle</link>                  (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gboolean">gboolean</link> filled,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height);
<link linkend="void">void</link>                <link linkend="gdk-draw-arc">gdk_draw_arc</link>                        (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gboolean">gboolean</link> filled,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height,
                                                         <link linkend="gint">gint</link> angle1,
                                                         <link linkend="gint">gint</link> angle2);
<link linkend="void">void</link>                <link linkend="gdk-draw-polygon">gdk_draw_polygon</link>                    (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gboolean">gboolean</link> filled,
                                                         const <link linkend="GdkPoint">GdkPoint</link> *points,
                                                         <link linkend="gint">gint</link> n_points);
<link linkend="void">void</link>                <link linkend="gdk-draw-trapezoids">gdk_draw_trapezoids</link>                 (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         const <link linkend="GdkTrapezoid">GdkTrapezoid</link> *trapezoids,
                                                         <link linkend="gint">gint</link> n_trapezoids);
                    <link linkend="GdkTrapezoid">GdkTrapezoid</link>;
<link linkend="void">void</link>                <link linkend="gdk-draw-glyphs">gdk_draw_glyphs</link>                     (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="PangoFont">PangoFont</link> *font,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs);
<link linkend="void">void</link>                <link linkend="gdk-draw-glyphs-transformed">gdk_draw_glyphs_transformed</link>         (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         const <link linkend="PangoMatrix">PangoMatrix</link> *matrix,
                                                         <link linkend="PangoFont">PangoFont</link> *font,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs);
<link linkend="void">void</link>                <link linkend="gdk-draw-layout-line">gdk_draw_layout_line</link>                (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="PangoLayoutLine">PangoLayoutLine</link> *line);
<link linkend="void">void</link>                <link linkend="gdk-draw-layout-line-with-colors">gdk_draw_layout_line_with_colors</link>    (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="PangoLayoutLine">PangoLayoutLine</link> *line,
                                                         const <link linkend="GdkColor">GdkColor</link> *foreground,
                                                         const <link linkend="GdkColor">GdkColor</link> *background);
<link linkend="void">void</link>                <link linkend="gdk-draw-layout">gdk_draw_layout</link>                     (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="PangoLayout">PangoLayout</link> *layout);
<link linkend="void">void</link>                <link linkend="gdk-draw-layout-with-colors">gdk_draw_layout_with_colors</link>         (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="PangoLayout">PangoLayout</link> *layout,
                                                         const <link linkend="GdkColor">GdkColor</link> *foreground,
                                                         const <link linkend="GdkColor">GdkColor</link> *background);

<link linkend="void">void</link>                <link linkend="gdk-draw-string">gdk_draw_string</link>                     (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkFont">GdkFont</link> *font,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         const <link linkend="gchar">gchar</link> *string);
<link linkend="void">void</link>                <link linkend="gdk-draw-text">gdk_draw_text</link>                       (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkFont">GdkFont</link> *font,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         const <link linkend="gchar">gchar</link> *text,
                                                         <link linkend="gint">gint</link> text_length);
<link linkend="void">void</link>                <link linkend="gdk-draw-text-wc">gdk_draw_text_wc</link>                    (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkFont">GdkFont</link> *font,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         const <link linkend="GdkWChar">GdkWChar</link> *text,
                                                         <link linkend="gint">gint</link> text_length);

#define             <link linkend="gdk-draw-pixmap">gdk_draw_pixmap</link>
<link linkend="void">void</link>                <link linkend="gdk-draw-drawable">gdk_draw_drawable</link>                   (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="GdkDrawable">GdkDrawable</link> *src,
                                                         <link linkend="gint">gint</link> xsrc,
                                                         <link linkend="gint">gint</link> ysrc,
                                                         <link linkend="gint">gint</link> xdest,
                                                         <link linkend="gint">gint</link> ydest,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height);
<link linkend="void">void</link>                <link linkend="gdk-draw-image">gdk_draw_image</link>                      (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="GdkImage">GdkImage</link> *image,
                                                         <link linkend="gint">gint</link> xsrc,
                                                         <link linkend="gint">gint</link> ysrc,
                                                         <link linkend="gint">gint</link> xdest,
                                                         <link linkend="gint">gint</link> ydest,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height);
<link linkend="GdkImage">GdkImage</link>*           <link linkend="gdk-drawable-get-image">gdk_drawable_get_image</link>              (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height);
<link linkend="GdkImage">GdkImage</link> *          <link linkend="gdk-drawable-copy-to-image">gdk_drawable_copy_to_image</link>          (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkImage">GdkImage</link> *image,
                                                         <link linkend="gint">gint</link> src_x,
                                                         <link linkend="gint">gint</link> src_y,
                                                         <link linkend="gint">gint</link> dest_x,
                                                         <link linkend="gint">gint</link> dest_y,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height);
</synopsis>
</refsynopsisdiv>

<refsect1 id="gdk-Drawing-Primitives.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----GdkDrawable
         +----<link linkend="GdkWindow">GdkWindow</link>
         +----<link linkend="GdkPixmap">GdkPixmap</link>
</synopsis>
</refsect1>








<refsect1 id="gdk-Drawing-Primitives.description" role="desc">
<title role="desc.title">Description</title>
<para>
These functions provide support for drawing points, lines, arcs and text
onto what are called 'drawables'. Drawables, as the name suggests, are things
which support drawing onto them, and are either <link linkend="GdkWindow"><type>GdkWindow</type></link> or <link linkend="GdkPixmap"><type>GdkPixmap</type></link>
objects.
</para>
<para>
Many of the drawing operations take a <link linkend="GdkGC"><type>GdkGC</type></link> argument, which represents a
graphics context. This <link linkend="GdkGC"><type>GdkGC</type></link> contains a number of drawing attributes such
as foreground color, background color and line width, and is used to reduce
the number of arguments needed for each drawing operation. See the
<link linkend="gdk-Graphics-Contexts">Graphics Contexts</link> section for
more information.
</para>
<para id="pango-data-structures">
Some of the drawing operations take Pango data structures like <link linkend="PangoContext"><type>PangoContext</type></link>,
<link linkend="PangoLayout"><type>PangoLayout</type></link> or <link linkend="PangoLayoutLine"><type>PangoLayoutLine</type></link> as arguments. If you're using GTK+, the ususal
way to obtain these structures is via <link linkend="gtk-widget-create-pango-context"><function>gtk_widget_create_pango_context()</function></link> or
<link linkend="gtk-widget-create-pango-layout"><function>gtk_widget_create_pango_layout()</function></link>.
</para>
</refsect1>

<refsect1 id="gdk-Drawing-Primitives.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GdkDrawable-struct" role="struct">
<title>GdkDrawable</title>
<indexterm zone="GdkDrawable-struct"><primary sortas="Drawable">GdkDrawable</primary></indexterm><programlisting>typedef struct _GdkDrawable GdkDrawable;</programlisting>
<para>
An opaque structure representing an object that can be
drawn onto. This can be a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>, a <link linkend="GdkBitmap"><type>GdkBitmap</type></link>,
or a <link linkend="GdkWindow"><type>GdkWindow</type></link>.
</para></refsect2>
<refsect2 id="gdk-drawable-ref" role="function" condition="deprecated:">
<title>gdk_drawable_ref ()</title>
<indexterm zone="gdk-drawable-ref" role="deprecated"><primary sortas="drawable_ref">gdk_drawable_ref</primary></indexterm><programlisting><link linkend="GdkDrawable">GdkDrawable</link>*        gdk_drawable_ref                    (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);</programlisting>
<warning><para><literal>gdk_drawable_ref</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Deprecated equivalent of calling <link linkend="g-object-ref"><function>g_object_ref()</function></link> on <parameter>drawable</parameter>.
(Drawables were not objects in previous versions of GDK.)</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the same <parameter>drawable</parameter> passed in
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-drawable-unref" role="function" condition="deprecated:">
<title>gdk_drawable_unref ()</title>
<indexterm zone="gdk-drawable-unref" role="deprecated"><primary sortas="drawable_unref">gdk_drawable_unref</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_drawable_unref                  (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);</programlisting>
<warning><para><literal>gdk_drawable_unref</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Deprecated equivalent of calling <link linkend="g-object-unref"><function>g_object_unref()</function></link> on <parameter>drawable</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-drawable-set-data" role="function" condition="deprecated:">
<title>gdk_drawable_set_data ()</title>
<indexterm zone="gdk-drawable-set-data" role="deprecated"><primary sortas="drawable_set_data">gdk_drawable_set_data</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_drawable_set_data               (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         const <link linkend="gchar">gchar</link> *key,
                                                         <link linkend="gpointer">gpointer</link> data,
                                                         <link linkend="GDestroyNotify">GDestroyNotify</link> destroy_func);</programlisting>
<warning><para><literal>gdk_drawable_set_data</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This function is equivalent to <link linkend="g-object-set-data"><function>g_object_set_data()</function></link>,
the <link linkend="GObject"><type>GObject</type></link> variant should be used instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key</parameter>&#160;:</term>
<listitem><simpara> name to store the data under
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara> arbitrary data
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>destroy_func</parameter>&#160;:</term>
<listitem><simpara> function to free <parameter>data</parameter>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-drawable-get-data" role="function" condition="deprecated:">
<title>gdk_drawable_get_data ()</title>
<indexterm zone="gdk-drawable-get-data" role="deprecated"><primary sortas="drawable_get_data">gdk_drawable_get_data</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            gdk_drawable_get_data               (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         const <link linkend="gchar">gchar</link> *key);</programlisting>
<warning><para><literal>gdk_drawable_get_data</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Equivalent to <link linkend="g-object-get-data"><function>g_object_get_data()</function></link>; the <link linkend="GObject"><type>GObject</type></link> variant should be
used instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key</parameter>&#160;:</term>
<listitem><simpara> name the data was stored under
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the data stored at <parameter>key</parameter>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-drawable-get-display" role="function" condition="since:2.2">
<title>gdk_drawable_get_display ()</title>
<indexterm zone="gdk-drawable-get-display" role="2.2"><primary sortas="drawable_get_display">gdk_drawable_get_display</primary></indexterm><programlisting><link linkend="GdkDisplay">GdkDisplay</link>*         gdk_drawable_get_display            (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);</programlisting>
<para>
Gets the <link linkend="GdkDisplay"><type>GdkDisplay</type></link> associated with a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GdkDisplay"><type>GdkDisplay</type></link> associated with <parameter>drawable</parameter>

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-drawable-get-screen" role="function" condition="since:2.2">
<title>gdk_drawable_get_screen ()</title>
<indexterm zone="gdk-drawable-get-screen" role="2.2"><primary sortas="drawable_get_screen">gdk_drawable_get_screen</primary></indexterm><programlisting><link linkend="GdkScreen">GdkScreen</link>*          gdk_drawable_get_screen             (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);</programlisting>
<para>
Gets the <link linkend="GdkScreen"><type>GdkScreen</type></link> associated with a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GdkScreen"><type>GdkScreen</type></link> associated with <parameter>drawable</parameter>

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-drawable-get-visual" role="function">
<title>gdk_drawable_get_visual ()</title>
<indexterm zone="gdk-drawable-get-visual"><primary sortas="drawable_get_visual">gdk_drawable_get_visual</primary></indexterm><programlisting><link linkend="GdkVisual">GdkVisual</link>*          gdk_drawable_get_visual             (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);</programlisting>
<para>
Gets the <link linkend="GdkVisual"><type>GdkVisual</type></link> describing the pixel format of <parameter>drawable</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GdkVisual"><type>GdkVisual</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-drawable-set-colormap" role="function">
<title>gdk_drawable_set_colormap ()</title>
<indexterm zone="gdk-drawable-set-colormap"><primary sortas="drawable_set_colormap">gdk_drawable_set_colormap</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_drawable_set_colormap           (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkColormap">GdkColormap</link> *colormap);</programlisting>
<para>
Sets the colormap associated with <parameter>drawable</parameter>. Normally this will
happen automatically when the drawable is created; you only need to
use this function if the drawable-creating function did not have a
way to determine the colormap, and you then use drawable operations
that require a colormap. The colormap for all drawables and
graphics contexts you intend to use together should match. i.e.
when using a <link linkend="GdkGC"><type>GdkGC</type></link> to draw to a drawable, or copying one drawable
to another, the colormaps should match.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>colormap</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkColormap"><type>GdkColormap</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-drawable-get-colormap" role="function">
<title>gdk_drawable_get_colormap ()</title>
<indexterm zone="gdk-drawable-get-colormap"><primary sortas="drawable_get_colormap">gdk_drawable_get_colormap</primary></indexterm><programlisting><link linkend="GdkColormap">GdkColormap</link>*        gdk_drawable_get_colormap           (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);</programlisting>
<para>
Gets the colormap for <parameter>drawable</parameter>, if one is set; returns
<link linkend="NULL--CAPS"><literal>NULL</literal></link> otherwise.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the colormap, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-drawable-get-depth" role="function">
<title>gdk_drawable_get_depth ()</title>
<indexterm zone="gdk-drawable-get-depth"><primary sortas="drawable_get_depth">gdk_drawable_get_depth</primary></indexterm><programlisting><link linkend="gint">gint</link>                gdk_drawable_get_depth              (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);</programlisting>
<para>
Obtains the bit depth of the drawable, that is, the number of bits
that make up a pixel in the drawable's visual. Examples are 8 bits
per pixel, 24 bits per pixel, etc.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> number of bits per pixel
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-drawable-get-size" role="function">
<title>gdk_drawable_get_size ()</title>
<indexterm zone="gdk-drawable-get-size"><primary sortas="drawable_get_size">gdk_drawable_get_size</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_drawable_get_size               (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="gint">gint</link> *width,
                                                         <link linkend="gint">gint</link> *height);</programlisting>
<para>
Fills *<parameter>width</parameter> and *<parameter>height</parameter> with the size of <parameter>drawable</parameter>.
<parameter>width</parameter> or <parameter>height</parameter> can be <link linkend="NULL--CAPS"><literal>NULL</literal></link> if you only want the other one.
</para>
<para>
On the X11 platform, if <parameter>drawable</parameter> is a <link linkend="GdkWindow"><type>GdkWindow</type></link>, the returned
size is the size reported in the most-recently-processed configure
event, rather than the current size on the X server.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&#160;:</term>
<listitem><simpara> location to store drawable's width, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&#160;:</term>
<listitem><simpara> location to store drawable's height, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-drawable-get-clip-region" role="function">
<title>gdk_drawable_get_clip_region ()</title>
<indexterm zone="gdk-drawable-get-clip-region"><primary sortas="drawable_get_clip_region">gdk_drawable_get_clip_region</primary></indexterm><programlisting><link linkend="GdkRegion">GdkRegion</link> *         gdk_drawable_get_clip_region        (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);</programlisting>
<para>
Computes the region of a drawable that potentially can be written
to by drawing primitives. This region will not take into account
the clip region for the GC, and may also not take into account
other factors such as if the window is obscured by other windows,
but no area outside of this region will be affected by drawing
primitives.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GdkRegion"><type>GdkRegion</type></link>. This must be freed with <link linkend="gdk-region-destroy"><function>gdk_region_destroy()</function></link>
         when you are done.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-drawable-get-visible-region" role="function">
<title>gdk_drawable_get_visible_region ()</title>
<indexterm zone="gdk-drawable-get-visible-region"><primary sortas="drawable_get_visible_region">gdk_drawable_get_visible_region</primary></indexterm><programlisting><link linkend="GdkRegion">GdkRegion</link> *         gdk_drawable_get_visible_region     (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);</programlisting>
<para>
Computes the region of a drawable that is potentially visible.
This does not necessarily take into account if the window is
obscured by other windows, but no area outside of this region
is visible.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GdkRegion"><type>GdkRegion</type></link>. This must be freed with <link linkend="gdk-region-destroy"><function>gdk_region_destroy()</function></link>
         when you are done.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-point" role="function">
<title>gdk_draw_point ()</title>
<indexterm zone="gdk-draw-point"><primary sortas="draw_point">gdk_draw_point</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_point                      (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y);</programlisting>
<para>
Draws a point, using the foreground color and other attributes of 
the <link linkend="GdkGC"><type>GdkGC</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link> (a <link linkend="GdkWindow"><type>GdkWindow</type></link> or a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara> the x coordinate of the point.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara> the y coordinate of the point.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-points" role="function">
<title>gdk_draw_points ()</title>
<indexterm zone="gdk-draw-points"><primary sortas="draw_points">gdk_draw_points</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_points                     (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         const <link linkend="GdkPoint">GdkPoint</link> *points,
                                                         <link linkend="gint">gint</link> n_points);</programlisting>
<para>
Draws a number of points, using the foreground color and other 
attributes of the <link linkend="GdkGC"><type>GdkGC</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link> (a <link linkend="GdkWindow"><type>GdkWindow</type></link> or a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>points</parameter>&#160;:</term>
<listitem><simpara> an array of <link linkend="GdkPoint"><type>GdkPoint</type></link> structures.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_points</parameter>&#160;:</term>
<listitem><simpara> the number of points to be drawn.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-line" role="function">
<title>gdk_draw_line ()</title>
<indexterm zone="gdk-draw-line"><primary sortas="draw_line">gdk_draw_line</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_line                       (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x1_,
                                                         <link linkend="gint">gint</link> y1_,
                                                         <link linkend="gint">gint</link> x2_,
                                                         <link linkend="gint">gint</link> y2_);</programlisting>
<para>
Draws a line, using the foreground color and other attributes of 
the <link linkend="GdkGC"><type>GdkGC</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link> (a <link linkend="GdkWindow"><type>GdkWindow</type></link> or a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>). 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x1_</parameter>&#160;:</term>
<listitem><simpara> the x coordinate of the start point.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y1_</parameter>&#160;:</term>
<listitem><simpara> the y coordinate of the start point.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x2_</parameter>&#160;:</term>
<listitem><simpara> the x coordinate of the end point.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y2_</parameter>&#160;:</term>
<listitem><simpara> the y coordinate of the end point.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-lines" role="function">
<title>gdk_draw_lines ()</title>
<indexterm zone="gdk-draw-lines"><primary sortas="draw_lines">gdk_draw_lines</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_lines                      (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         const <link linkend="GdkPoint">GdkPoint</link> *points,
                                                         <link linkend="gint">gint</link> n_points);</programlisting>
<para>
Draws a series of lines connecting the given points.
The way in which joins between lines are draw is determined by the
<link linkend="GdkCapStyle"><type>GdkCapStyle</type></link> value in the <link linkend="GdkGC"><type>GdkGC</type></link>. This can be set with
<link linkend="gdk-gc-set-line-attributes"><function>gdk_gc_set_line_attributes()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link> (a <link linkend="GdkWindow"><type>GdkWindow</type></link> or a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>points</parameter>&#160;:</term>
<listitem><simpara> an array of <link linkend="GdkPoint"><type>GdkPoint</type></link> structures specifying the endpoints of the
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_points</parameter>&#160;:</term>
<listitem><simpara> the size of the <parameter>points</parameter> array.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-pixbuf" role="function" condition="since:2.2">
<title>gdk_draw_pixbuf ()</title>
<indexterm zone="gdk-draw-pixbuf" role="2.2"><primary sortas="draw_pixbuf">gdk_draw_pixbuf</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_pixbuf                     (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf,
                                                         <link linkend="gint">gint</link> src_x,
                                                         <link linkend="gint">gint</link> src_y,
                                                         <link linkend="gint">gint</link> dest_x,
                                                         <link linkend="gint">gint</link> dest_y,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height,
                                                         <link linkend="GdkRgbDither">GdkRgbDither</link> dither,
                                                         <link linkend="gint">gint</link> x_dither,
                                                         <link linkend="gint">gint</link> y_dither);</programlisting>
<para>
Renders a rectangular portion of a pixbuf to a drawable.  The destination
drawable must have a colormap. All windows have a colormap, however, pixmaps
only have colormap by default if they were created with a non-<link linkend="NULL--CAPS"><literal>NULL</literal></link> window 
argument. Otherwise a colormap must be set on them with 
<link linkend="gdk-drawable-set-colormap"><function>gdk_drawable_set_colormap()</function></link>.
</para>
<para>
On older X servers, rendering pixbufs with an alpha channel involves round 
trips to the X server, and may be somewhat slow.
</para>
<para>
If GDK is built with the Sun mediaLib library, the gdk_draw_pixbuf
function is accelerated using mediaLib, which provides hardware
acceleration on Intel, AMD, and Sparc chipsets.  If desired, mediaLib
support can be turned off by setting the GDK_DISABLE_MEDIALIB environment
variable.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> Destination drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>, used for clipping, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pixbuf</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>src_x</parameter>&#160;:</term>
<listitem><simpara> Source X coordinate within pixbuf.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>src_y</parameter>&#160;:</term>
<listitem><simpara> Source Y coordinates within pixbuf.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dest_x</parameter>&#160;:</term>
<listitem><simpara> Destination X coordinate within drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dest_y</parameter>&#160;:</term>
<listitem><simpara> Destination Y coordinate within drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&#160;:</term>
<listitem><simpara> Width of region to render, in pixels, or -1 to use pixbuf width.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&#160;:</term>
<listitem><simpara> Height of region to render, in pixels, or -1 to use pixbuf height.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dither</parameter>&#160;:</term>
<listitem><simpara> Dithering mode for <link linkend="GdkRGB"><type>GdkRGB</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x_dither</parameter>&#160;:</term>
<listitem><simpara> X offset for dither.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y_dither</parameter>&#160;:</term>
<listitem><simpara> Y offset for dither.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-draw-segments" role="function">
<title>gdk_draw_segments ()</title>
<indexterm zone="gdk-draw-segments"><primary sortas="draw_segments">gdk_draw_segments</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_segments                   (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         const <link linkend="GdkSegment">GdkSegment</link> *segs,
                                                         <link linkend="gint">gint</link> n_segs);</programlisting>
<para>
Draws a number of unconnected lines.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link> (a <link linkend="GdkWindow"><type>GdkWindow</type></link> or a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>segs</parameter>&#160;:</term>
<listitem><simpara> an array of <link linkend="GdkSegment"><type>GdkSegment</type></link> structures specifying the start and 
  end points of the lines to be drawn.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_segs</parameter>&#160;:</term>
<listitem><simpara> the number of line segments to draw, i.e. the size of the 
  <parameter>segs</parameter> array.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GdkSegment" role="struct">
<title>GdkSegment</title>
<indexterm zone="GdkSegment"><primary sortas="Segment">GdkSegment</primary></indexterm><programlisting>typedef struct {
  gint x1;
  gint y1;
  gint x2;
  gint y2;
} GdkSegment;
</programlisting>
<para>
Specifies the start and end point of a line for use by the <link linkend="gdk-draw-segments"><function>gdk_draw_segments()</function></link>
function.
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="gint">gint</link>&#160;<structfield>x1</structfield>;</term>
<listitem><simpara>the x coordinate of the start point.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="gint">gint</link>&#160;<structfield>y1</structfield>;</term>
<listitem><simpara>the y coordinate of the start point.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="gint">gint</link>&#160;<structfield>x2</structfield>;</term>
<listitem><simpara>the x coordinate of the end point.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="gint">gint</link>&#160;<structfield>y2</structfield>;</term>
<listitem><simpara>the y coordinate of the end point.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-rectangle" role="function">
<title>gdk_draw_rectangle ()</title>
<indexterm zone="gdk-draw-rectangle"><primary sortas="draw_rectangle">gdk_draw_rectangle</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_rectangle                  (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gboolean">gboolean</link> filled,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height);</programlisting>
<para>
Draws a rectangular outline or filled rectangle, using the foreground color
and other attributes of the <link linkend="GdkGC"><type>GdkGC</type></link>.
</para>
<para>
A rectangle drawn filled is 1 pixel smaller in both dimensions than a 
rectangle outlined. Calling 
<literal>gdk_draw_rectangle (window, gc, TRUE, 0, 0, 20, 20)</literal> 
results in a filled rectangle 20 pixels wide and 20 pixels high. Calling
<literal>gdk_draw_rectangle (window, gc, FALSE, 0, 0, 20, 20)</literal> 
results in an outlined rectangle with corners at (0, 0), (0, 20), (20, 20),
and (20, 0), which makes it 21 pixels wide and 21 pixels high.</para>
<para>
</para>
<note>
<para>
</para>
</note><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link> (a <link linkend="GdkWindow"><type>GdkWindow</type></link> or a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>filled</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the rectangle should be filled.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara> the x coordinate of the left edge of the rectangle.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara> the y coordinate of the top edge of the rectangle.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&#160;:</term>
<listitem><simpara> the width of the rectangle.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&#160;:</term>
<listitem><simpara> the height of the rectangle.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-arc" role="function">
<title>gdk_draw_arc ()</title>
<indexterm zone="gdk-draw-arc"><primary sortas="draw_arc">gdk_draw_arc</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_arc                        (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gboolean">gboolean</link> filled,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height,
                                                         <link linkend="gint">gint</link> angle1,
                                                         <link linkend="gint">gint</link> angle2);</programlisting>
<para>
Draws an arc or a filled 'pie slice'. The arc is defined by the bounding
rectangle of the entire ellipse, and the start and end angles of the part 
of the ellipse to be drawn.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link> (a <link linkend="GdkWindow"><type>GdkWindow</type></link> or a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>filled</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the arc should be filled, producing a 'pie slice'.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara> the x coordinate of the left edge of the bounding rectangle.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara> the y coordinate of the top edge of the bounding rectangle.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&#160;:</term>
<listitem><simpara> the width of the bounding rectangle.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&#160;:</term>
<listitem><simpara> the height of the bounding rectangle.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>angle1</parameter>&#160;:</term>
<listitem><simpara> the start angle of the arc, relative to the 3 o'clock position,
    counter-clockwise, in 1/64ths of a degree.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>angle2</parameter>&#160;:</term>
<listitem><simpara> the end angle of the arc, relative to <parameter>angle1</parameter>, in 1/64ths 
    of a degree.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-polygon" role="function">
<title>gdk_draw_polygon ()</title>
<indexterm zone="gdk-draw-polygon"><primary sortas="draw_polygon">gdk_draw_polygon</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_polygon                    (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gboolean">gboolean</link> filled,
                                                         const <link linkend="GdkPoint">GdkPoint</link> *points,
                                                         <link linkend="gint">gint</link> n_points);</programlisting>
<para>
Draws an outlined or filled polygon.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link> (a <link linkend="GdkWindow"><type>GdkWindow</type></link> or a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>filled</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the polygon should be filled. The polygon is closed
    automatically, connecting the last point to the first point if 
    necessary.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>points</parameter>&#160;:</term>
<listitem><simpara> an array of <link linkend="GdkPoint"><type>GdkPoint</type></link> structures specifying the points making 
    up the polygon.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_points</parameter>&#160;:</term>
<listitem><simpara> the number of points.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-trapezoids" role="function" condition="since:2.6">
<title>gdk_draw_trapezoids ()</title>
<indexterm zone="gdk-draw-trapezoids" role="2.6"><primary sortas="draw_trapezoids">gdk_draw_trapezoids</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_trapezoids                 (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         const <link linkend="GdkTrapezoid">GdkTrapezoid</link> *trapezoids,
                                                         <link linkend="gint">gint</link> n_trapezoids);</programlisting>
<para>
Draws a set of anti-aliased trapezoids. The trapezoids are
combined using saturation addition, then drawn over the background
as a set. This is low level functionality used internally to implement
rotated underlines and backgrouds when rendering a PangoLayout and is
likely not useful for applications.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>trapezoids</parameter>&#160;:</term>
<listitem><simpara> an array of <link linkend="GdkTrapezoid"><type>GdkTrapezoid</type></link> structures
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_trapezoids</parameter>&#160;:</term>
<listitem><simpara> the number of trapezoids to draw
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="GdkTrapezoid" role="struct">
<title>GdkTrapezoid</title>
<indexterm zone="GdkTrapezoid"><primary sortas="Trapezoid">GdkTrapezoid</primary></indexterm><programlisting>typedef struct {
  double y1, x11, x21, y2, x12, x22;
} GdkTrapezoid;
</programlisting>
<para>
Specifies a trapezpoid for use by the <link linkend="gdk-draw-trapezoids"><function>gdk_draw_trapezoids()</function></link>.
The trapezoids used here have parallel, horizontal top and
bottom edges.
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="double">double</link>&#160;<structfield>y1</structfield>;</term>
<listitem><simpara>the y coordinate of the start point.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="double">double</link>&#160;<structfield>x11</structfield>;</term>
<listitem><simpara>the x coordinate of the top left corner
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="double">double</link>&#160;<structfield>x21</structfield>;</term>
<listitem><simpara>the x coordinate of the top right corner
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="double">double</link>&#160;<structfield>y2</structfield>;</term>
<listitem><simpara>the y coordinate of the end point.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="double">double</link>&#160;<structfield>x12</structfield>;</term>
<listitem><simpara>the x coordinate of the bottom left corner
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="double">double</link>&#160;<structfield>x22</structfield>;</term>
<listitem><simpara>the x coordinate of the bottom right corner
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-glyphs" role="function">
<title>gdk_draw_glyphs ()</title>
<indexterm zone="gdk-draw-glyphs"><primary sortas="draw_glyphs">gdk_draw_glyphs</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_glyphs                     (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="PangoFont">PangoFont</link> *font,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs);</programlisting>
<para>
This is a low-level function; 99% of text rendering should be done
using <link linkend="gdk-draw-layout"><function>gdk_draw_layout()</function></link> instead.
</para>
<para>
A glyph is a single image in a font. This function draws a sequence of
glyphs.  To obtain a sequence of glyphs you have to understand a
lot about internationalized text handling, which you don't want to
understand; thus, use <link linkend="gdk-draw-layout"><function>gdk_draw_layout()</function></link> instead of this function,
<link linkend="gdk-draw-layout"><function>gdk_draw_layout()</function></link> handles the details.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>font</parameter>&#160;:</term>
<listitem><simpara> font to be used
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara> X coordinate of baseline origin
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara> Y coordinate of baseline origin
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>glyphs</parameter>&#160;:</term>
<listitem><simpara> the glyph string to draw
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-glyphs-transformed" role="function" condition="since:2.6">
<title>gdk_draw_glyphs_transformed ()</title>
<indexterm zone="gdk-draw-glyphs-transformed" role="2.6"><primary sortas="draw_glyphs_transformed">gdk_draw_glyphs_transformed</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_glyphs_transformed         (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         const <link linkend="PangoMatrix">PangoMatrix</link> *matrix,
                                                         <link linkend="PangoFont">PangoFont</link> *font,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs);</programlisting>
<para>
Renders a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> onto a drawable, possibly
transforming the layed-out coordinates through a transformation
matrix. Note that the transformation matrix for <parameter>font</parameter> is not
changed, so to produce correct rendering results, the <parameter>font</parameter>
must have been loaded using a <link linkend="PangoContext"><type>PangoContext</type></link> with an identical
transformation matrix to that passed in to this function.
</para>
<para>
See also <link linkend="gdk-draw-glyphs"><function>gdk_draw_glyphs()</function></link>, <link linkend="gdk-draw-layout"><function>gdk_draw_layout()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>matrix</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> to use an identity transformation
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>font</parameter>&#160;:</term>
<listitem><simpara> the font in which to draw the string
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara>       the x position of the start of the string (in Pango
          units in user space coordinates)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara>       the y position of the baseline (in Pango units
          in user space coordinates)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>glyphs</parameter>&#160;:</term>
<listitem><simpara>  the glyph string to draw
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gdk-draw-layout-line" role="function">
<title>gdk_draw_layout_line ()</title>
<indexterm zone="gdk-draw-layout-line"><primary sortas="draw_layout_line">gdk_draw_layout_line</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_layout_line                (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="PangoLayoutLine">PangoLayoutLine</link> *line);</programlisting>
<para>
Render a <link linkend="PangoLayoutLine"><type>PangoLayoutLine</type></link> onto an GDK drawable
</para>
<para>
If the layout's <link linkend="PangoContext"><type>PangoContext</type></link> has a transformation matrix set, then
<parameter>x</parameter> and <parameter>y</parameter> specify the position of the left edge of the baseline
(left is in before-tranform user coordinates) in after-transform
device coordinates.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara>  the drawable on which to draw the line
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara>        base graphics to use
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara>         the x position of start of string (in pixels)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara>         the y position of baseline (in pixels)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>line</parameter>&#160;:</term>
<listitem><simpara>      a <link linkend="PangoLayoutLine"><type>PangoLayoutLine</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-layout-line-with-colors" role="function">
<title>gdk_draw_layout_line_with_colors ()</title>
<indexterm zone="gdk-draw-layout-line-with-colors"><primary sortas="draw_layout_line_with_colors">gdk_draw_layout_line_with_colors</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_layout_line_with_colors    (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="PangoLayoutLine">PangoLayoutLine</link> *line,
                                                         const <link linkend="GdkColor">GdkColor</link> *foreground,
                                                         const <link linkend="GdkColor">GdkColor</link> *background);</programlisting>
<para>
Render a <link linkend="PangoLayoutLine"><type>PangoLayoutLine</type></link> onto a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>, overriding the
layout's normal colors with <parameter>foreground</parameter> and/or <parameter>background</parameter>.
<parameter>foreground</parameter> and <parameter>background</parameter> need not be allocated.
</para>
<para>
If the layout's <link linkend="PangoContext"><type>PangoContext</type></link> has a transformation matrix set, then
<parameter>x</parameter> and <parameter>y</parameter> specify the position of the left edge of the baseline
(left is in before-tranform user coordinates) in after-transform
device coordinates.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara>  the drawable on which to draw the line
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara>        base graphics to use
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara>         the x position of start of string (in pixels)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara>         the y position of baseline (in pixels)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>line</parameter>&#160;:</term>
<listitem><simpara>      a <link linkend="PangoLayoutLine"><type>PangoLayoutLine</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>foreground</parameter>&#160;:</term>
<listitem><simpara> foreground override color, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> for none
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>background</parameter>&#160;:</term>
<listitem><simpara> background override color, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> for none
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-layout" role="function">
<title>gdk_draw_layout ()</title>
<indexterm zone="gdk-draw-layout"><primary sortas="draw_layout">gdk_draw_layout</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_layout                     (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="PangoLayout">PangoLayout</link> *layout);</programlisting>
<para>
Render a <link linkend="PangoLayout"><type>PangoLayout</type></link> onto a GDK drawable
</para>
<para>
If the layout's <link linkend="PangoContext"><type>PangoContext</type></link> has a transformation matrix set, then
<parameter>x</parameter> and <parameter>y</parameter> specify the position of the top left corner of the
bounding box (in device space) of the transformed layout.
</para>
<para>
If you're using GTK+, the usual way to obtain a <link linkend="PangoLayout"><type>PangoLayout</type></link>
is <link linkend="gtk-widget-create-pango-layout"><function>gtk_widget_create_pango_layout()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara>  the drawable on which to draw string
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara>        base graphics context to use
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara>         the X position of the left of the layout (in pixels)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara>         the Y position of the top of the layout (in pixels)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>layout</parameter>&#160;:</term>
<listitem><simpara>    a <link linkend="PangoLayout"><type>PangoLayout</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-layout-with-colors" role="function">
<title>gdk_draw_layout_with_colors ()</title>
<indexterm zone="gdk-draw-layout-with-colors"><primary sortas="draw_layout_with_colors">gdk_draw_layout_with_colors</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_layout_with_colors         (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="PangoLayout">PangoLayout</link> *layout,
                                                         const <link linkend="GdkColor">GdkColor</link> *foreground,
                                                         const <link linkend="GdkColor">GdkColor</link> *background);</programlisting>
<para>
Render a <link linkend="PangoLayout"><type>PangoLayout</type></link> onto a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>, overriding the
layout's normal colors with <parameter>foreground</parameter> and/or <parameter>background</parameter>.
<parameter>foreground</parameter> and <parameter>background</parameter> need not be allocated.
</para>
<para>
If the layout's <link linkend="PangoContext"><type>PangoContext</type></link> has a transformation matrix set, then
<parameter>x</parameter> and <parameter>y</parameter> specify the position of the top left corner of the
bounding box (in device space) of the transformed layout.
</para>
<para>
If you're using GTK+, the ususal way to obtain a <link linkend="PangoLayout"><type>PangoLayout</type></link>
is <link linkend="gtk-widget-create-pango-layout"><function>gtk_widget_create_pango_layout()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara>  the drawable on which to draw string
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara>        base graphics context to use
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara>         the X position of the left of the layout (in pixels)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara>         the Y position of the top of the layout (in pixels)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>layout</parameter>&#160;:</term>
<listitem><simpara>    a <link linkend="PangoLayout"><type>PangoLayout</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>foreground</parameter>&#160;:</term>
<listitem><simpara> foreground override color, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> for none
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>background</parameter>&#160;:</term>
<listitem><simpara> background override color, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> for none
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-string" role="function" condition="deprecated:Use gdk_draw_layout() instead.">
<title>gdk_draw_string ()</title>
<indexterm zone="gdk-draw-string" role="deprecated"><primary sortas="draw_string">gdk_draw_string</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_string                     (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkFont">GdkFont</link> *font,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         const <link linkend="gchar">gchar</link> *string);</programlisting>
<warning><para><literal>gdk_draw_string</literal> is deprecated and should not be used in newly-written code. Use <link linkend="gdk-draw-layout"><function>gdk_draw_layout()</function></link> instead.</para></warning>
<para>
Draws a string of characters in the given font or fontset.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link> (a <link linkend="GdkWindow"><type>GdkWindow</type></link> or a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>font</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkFont"><type>GdkFont</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara> the x coordinate of the left edge of the text.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara> the y coordinate of the baseline of the text.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>string</parameter>&#160;:</term>
<listitem><simpara>  the string of characters to draw.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-text" role="function" condition="deprecated:Use gdk_draw_layout() instead.">
<title>gdk_draw_text ()</title>
<indexterm zone="gdk-draw-text" role="deprecated"><primary sortas="draw_text">gdk_draw_text</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_text                       (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkFont">GdkFont</link> *font,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         const <link linkend="gchar">gchar</link> *text,
                                                         <link linkend="gint">gint</link> text_length);</programlisting>
<warning><para><literal>gdk_draw_text</literal> is deprecated and should not be used in newly-written code. Use <link linkend="gdk-draw-layout"><function>gdk_draw_layout()</function></link> instead.</para></warning>
<para>
Draws a number of characters in the given font or fontset.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link> (a <link linkend="GdkWindow"><type>GdkWindow</type></link> or a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>font</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkFont"><type>GdkFont</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara> the x coordinate of the left edge of the text.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara> the y coordinate of the baseline of the text.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text</parameter>&#160;:</term>
<listitem><simpara>  the characters to draw.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text_length</parameter>&#160;:</term>
<listitem><simpara> the number of characters of <parameter>text</parameter> to draw.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-text-wc" role="function" condition="deprecated:Use gdk_draw_layout() instead.">
<title>gdk_draw_text_wc ()</title>
<indexterm zone="gdk-draw-text-wc" role="deprecated"><primary sortas="draw_text_wc">gdk_draw_text_wc</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_text_wc                    (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkFont">GdkFont</link> *font,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         const <link linkend="GdkWChar">GdkWChar</link> *text,
                                                         <link linkend="gint">gint</link> text_length);</programlisting>
<warning><para><literal>gdk_draw_text_wc</literal> is deprecated and should not be used in newly-written code. Use <link linkend="gdk-draw-layout"><function>gdk_draw_layout()</function></link> instead.</para></warning>
<para>
Draws a number of wide characters using the given font of fontset.
If the font is a 1-byte font, the string is converted into 1-byte 
characters (discarding the high bytes) before output.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link> (a <link linkend="GdkWindow"><type>GdkWindow</type></link> or a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>font</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkFont"><type>GdkFont</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara> the x coordinate of the left edge of the text.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara> the y coordinate of the baseline of the text.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text</parameter>&#160;:</term>
<listitem><simpara> the wide characters to draw.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text_length</parameter>&#160;:</term>
<listitem><simpara> the number of characters to draw.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-pixmap" role="macro" condition="deprecated:Use gdk_draw_drawable() instead.">
<title>gdk_draw_pixmap</title>
<indexterm zone="gdk-draw-pixmap" role="deprecated"><primary sortas="draw_pixmap">gdk_draw_pixmap</primary></indexterm><programlisting>#define gdk_draw_pixmap                gdk_draw_drawable
</programlisting>
<warning><para><literal>gdk_draw_pixmap</literal> is deprecated and should not be used in newly-written code. Use <link linkend="gdk-draw-drawable"><function>gdk_draw_drawable()</function></link> instead.</para></warning>
<para>
Draws a pixmap, or a part of a pixmap, onto another drawable.
</para></refsect2>
<refsect2 id="gdk-draw-drawable" role="function">
<title>gdk_draw_drawable ()</title>
<indexterm zone="gdk-draw-drawable"><primary sortas="draw_drawable">gdk_draw_drawable</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_drawable                   (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="GdkDrawable">GdkDrawable</link> *src,
                                                         <link linkend="gint">gint</link> xsrc,
                                                         <link linkend="gint">gint</link> ysrc,
                                                         <link linkend="gint">gint</link> xdest,
                                                         <link linkend="gint">gint</link> ydest,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height);</programlisting>
<para>
Copies the <parameter>width</parameter> x <parameter>height</parameter> region of <parameter>src</parameter> at coordinates (<parameter>xsrc</parameter>,
<parameter>ysrc</parameter>) to coordinates (<parameter>xdest</parameter>, <parameter>ydest</parameter>) in <parameter>drawable</parameter>.
<parameter>width</parameter> and/or <parameter>height</parameter> may be given as -1, in which case the entire
<parameter>src</parameter> drawable will be copied.
</para>
<para>
Most fields in <parameter>gc</parameter> are not used for this operation, but notably the
clip mask or clip region will be honored.
</para>
<para>
The source and destination drawables must have the same visual and
colormap, or errors will result. (On X11, failure to match
visual/colormap results in a BadMatch error from the X server.)
A common cause of this problem is an attempt to draw a bitmap to
a color drawable. The way to draw a bitmap is to set the bitmap as 
the stipple on the <link linkend="GdkGC"><type>GdkGC</type></link>, set the fill mode to <link linkend="GDK-STIPPLED--CAPS"><literal>GDK_STIPPLED</literal></link>, and 
then draw the rectangle.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link> sharing the drawable's visual and colormap
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>src</parameter>&#160;:</term>
<listitem><simpara> the source <link linkend="GdkDrawable"><type>GdkDrawable</type></link>, which may be the same as <parameter>drawable</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>xsrc</parameter>&#160;:</term>
<listitem><simpara> X position in <parameter>src</parameter> of rectangle to draw
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ysrc</parameter>&#160;:</term>
<listitem><simpara> Y position in <parameter>src</parameter> of rectangle to draw
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>xdest</parameter>&#160;:</term>
<listitem><simpara> X position in <parameter>drawable</parameter> where the rectangle should be drawn
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ydest</parameter>&#160;:</term>
<listitem><simpara> Y position in <parameter>drawable</parameter> where the rectangle should be drawn
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&#160;:</term>
<listitem><simpara> width of rectangle to draw, or -1 for entire <parameter>src</parameter> width
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&#160;:</term>
<listitem><simpara> height of rectangle to draw, or -1 for entire <parameter>src</parameter> height
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-draw-image" role="function">
<title>gdk_draw_image ()</title>
<indexterm zone="gdk-draw-image"><primary sortas="draw_image">gdk_draw_image</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_draw_image                      (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkGC">GdkGC</link> *gc,
                                                         <link linkend="GdkImage">GdkImage</link> *image,
                                                         <link linkend="gint">gint</link> xsrc,
                                                         <link linkend="gint">gint</link> ysrc,
                                                         <link linkend="gint">gint</link> xdest,
                                                         <link linkend="gint">gint</link> ydest,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height);</programlisting>
<para>
Draws a <link linkend="GdkImage"><type>GdkImage</type></link> onto a drawable.
The depth of the <link linkend="GdkImage"><type>GdkImage</type></link> must match the depth of the <link linkend="GdkDrawable"><type>GdkDrawable</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link> (a <link linkend="GdkWindow"><type>GdkWindow</type></link> or a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>image</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="GdkImage"><type>GdkImage</type></link> to draw.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>xsrc</parameter>&#160;:</term>
<listitem><simpara> the left edge of the source rectangle within <parameter>image</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ysrc</parameter>&#160;:</term>
<listitem><simpara> the top of the source rectangle within <parameter>image</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>xdest</parameter>&#160;:</term>
<listitem><simpara> the x coordinate of the destination within <parameter>drawable</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ydest</parameter>&#160;:</term>
<listitem><simpara> the y coordinate of the destination within <parameter>drawable</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&#160;:</term>
<listitem><simpara> the width of the area to be copied, or -1 to make the area 
    extend to the right edge of <parameter>image</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&#160;:</term>
<listitem><simpara> the height of the area to be copied, or -1 to make the area 
    extend to the bottom edge of <parameter>image</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-drawable-get-image" role="function">
<title>gdk_drawable_get_image ()</title>
<indexterm zone="gdk-drawable-get-image"><primary sortas="drawable_get_image">gdk_drawable_get_image</primary></indexterm><programlisting><link linkend="GdkImage">GdkImage</link>*           gdk_drawable_get_image              (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height);</programlisting>
<para>
A <link linkend="GdkImage"><type>GdkImage</type></link> stores client-side image data (pixels). In contrast,
<link linkend="GdkPixmap"><type>GdkPixmap</type></link> and <link linkend="GdkWindow"><type>GdkWindow</type></link> are server-side
objects. <link linkend="gdk-drawable-get-image"><function>gdk_drawable_get_image()</function></link> obtains the pixels from a
server-side drawable as a client-side <link linkend="GdkImage"><type>GdkImage</type></link>.  The format of a
<link linkend="GdkImage"><type>GdkImage</type></link> depends on the <link linkend="GdkVisual"><type>GdkVisual</type></link> of the current display, which
makes manipulating <link linkend="GdkImage"><type>GdkImage</type></link> extremely difficult; therefore, in
most cases you should use <link linkend="gdk-pixbuf-get-from-drawable"><function>gdk_pixbuf_get_from_drawable()</function></link> instead of
this lower-level function. A <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> contains image data in a
canonicalized RGB format, rather than a display-dependent format.
Of course, there's a convenience vs. speed tradeoff here, so you'll
want to think about what makes sense for your application.
</para>
<para>
<parameter>x</parameter>, <parameter>y</parameter>, <parameter>width</parameter>, and <parameter>height</parameter> define the region of <parameter>drawable</parameter> to
obtain as an image.
</para>
<para>
You would usually copy image data to the client side if you intend
to examine the values of individual pixels, for example to darken
an image or add a red tint. It would be prohibitively slow to
make a round-trip request to the windowing system for each pixel,
so instead you get all of them at once, modify them, then copy
them all back at once.
</para>
<para>
If the X server or other windowing system backend is on the local
machine, this function may use shared memory to avoid copying
the image data.
</para>
<para>
If the source drawable is a <link linkend="GdkWindow"><type>GdkWindow</type></link> and partially offscreen
or obscured, then the obscured portions of the returned image
will contain undefined data.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara> x coordinate on <parameter>drawable</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara> y coordinate on <parameter>drawable</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&#160;:</term>
<listitem><simpara> width of region to get
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&#160;:</term>
<listitem><simpara> height or region to get
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GdkImage"><type>GdkImage</type></link> containing the contents of <parameter>drawable</parameter>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-drawable-copy-to-image" role="function" condition="since:2.4">
<title>gdk_drawable_copy_to_image ()</title>
<indexterm zone="gdk-drawable-copy-to-image" role="2.4"><primary sortas="drawable_copy_to_image">gdk_drawable_copy_to_image</primary></indexterm><programlisting><link linkend="GdkImage">GdkImage</link> *          gdk_drawable_copy_to_image          (<link linkend="GdkDrawable">GdkDrawable</link> *drawable,
                                                         <link linkend="GdkImage">GdkImage</link> *image,
                                                         <link linkend="gint">gint</link> src_x,
                                                         <link linkend="gint">gint</link> src_y,
                                                         <link linkend="gint">gint</link> dest_x,
                                                         <link linkend="gint">gint</link> dest_y,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height);</programlisting>
<para>
Copies a portion of <parameter>drawable</parameter> into the client side image structure
<parameter>image</parameter>. If <parameter>image</parameter> is <link linkend="NULL--CAPS"><literal>NULL</literal></link>, creates a new image of size <parameter>width</parameter> x <parameter>height</parameter>
and copies into that. See <link linkend="gdk-drawable-get-image"><function>gdk_drawable_get_image()</function></link> for further details.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>image</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if a new <parameter>image</parameter> should be created.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>src_x</parameter>&#160;:</term>
<listitem><simpara> x coordinate on <parameter>drawable</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>src_y</parameter>&#160;:</term>
<listitem><simpara> y coordinate on <parameter>drawable</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dest_x</parameter>&#160;:</term>
<listitem><simpara> x coordinate within <parameter>image</parameter>. Must be 0 if <parameter>image</parameter> is <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dest_y</parameter>&#160;:</term>
<listitem><simpara> y coordinate within <parameter>image</parameter>. Must be 0 if <parameter>image</parameter> is <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&#160;:</term>
<listitem><simpara> width of region to get
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&#160;:</term>
<listitem><simpara> height or region to get
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <parameter>image</parameter>, or a new a <link linkend="GdkImage"><type>GdkImage</type></link> containing the contents
              of <parameter>drawable</parameter>

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>

</refsect1>




</refentry>
