KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/share/gtk-doc/html/gdk/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/gtk-doc/html/gdk/gdk-Graphics-Contexts.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Graphics Contexts</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GDK Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="gdk-Points-Rectangles-and-Regions.html" title="Points, Rectangles and Regions">
<link rel="next" href="gdk-Drawing-Primitives.html" title="Drawing Primitives">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="reference" href="reference.html" title="API Reference">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gdk-Points-Rectangles-and-Regions.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GDK Reference Manual</th>
<td><a accesskey="n" href="gdk-Drawing-Primitives.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2930478" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2931522" class="shortcut">Description</a>
                  &#160;|&#160;
                  <a href="#id2931498" class="shortcut">Object Hierarchy</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="gdk-Graphics-Contexts"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2930478"></a><span class="refentrytitle">Graphics Contexts</span>
</h2>
<p>Graphics Contexts &#8212; Objects to encapsulate drawing properties</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<a name="GdkGC"></a><pre class="synopsis">

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


            <a href="gdk-Graphics-Contexts.html#GdkGC-struct">GdkGC</a>;
            <a href="gdk-Graphics-Contexts.html#GdkGCValues">GdkGCValues</a>;
enum        <a href="gdk-Graphics-Contexts.html#GdkGCValuesMask">GdkGCValuesMask</a>;
enum        <a href="gdk-Graphics-Contexts.html#GdkFunction">GdkFunction</a>;
<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a>*      <a href="gdk-Graphics-Contexts.html#gdk-gc-new">gdk_gc_new</a>                      (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable);
<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a>*      <a href="gdk-Graphics-Contexts.html#gdk-gc-new-with-values">gdk_gc_new_with_values</a>          (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
                                             <a href="gdk-Graphics-Contexts.html#GdkGCValues">GdkGCValues</a> *values,
                                             <a href="gdk-Graphics-Contexts.html#GdkGCValuesMask">GdkGCValuesMask</a> values_mask);
<a href="GdkScreen.html" title="GdkScreen">GdkScreen</a>*  <a href="gdk-Graphics-Contexts.html#gdk-gc-get-screen">gdk_gc_get_screen</a>               (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc);
<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a>*      <a href="gdk-Graphics-Contexts.html#gdk-gc-ref">gdk_gc_ref</a>                      (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-unref">gdk_gc_unref</a>                    (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc);
#define     <a href="gdk-Graphics-Contexts.html#gdk-gc-destroy">gdk_gc_destroy</a>
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-values">gdk_gc_set_values</a>               (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Graphics-Contexts.html#GdkGCValues">GdkGCValues</a> *values,
                                             <a href="gdk-Graphics-Contexts.html#GdkGCValuesMask">GdkGCValuesMask</a> values_mask);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-get-values">gdk_gc_get_values</a>               (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Graphics-Contexts.html#GdkGCValues">GdkGCValues</a> *values);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-foreground">gdk_gc_set_foreground</a>           (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *color);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-background">gdk_gc_set_background</a>           (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *color);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-rgb-fg-color">gdk_gc_set_rgb_fg_color</a>         (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *color);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-rgb-bg-color">gdk_gc_set_rgb_bg_color</a>         (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *color);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-font">gdk_gc_set_font</a>                 (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-function">gdk_gc_set_function</a>             (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Graphics-Contexts.html#GdkFunction">GdkFunction</a> function);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-fill">gdk_gc_set_fill</a>                 (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Graphics-Contexts.html#GdkFill">GdkFill</a> fill);
enum        <a href="gdk-Graphics-Contexts.html#GdkFill">GdkFill</a>;
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-tile">gdk_gc_set_tile</a>                 (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a> *tile);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-stipple">gdk_gc_set_stipple</a>              (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a> *stipple);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-ts-origin">gdk_gc_set_ts_origin</a>            (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> x,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> y);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-clip-origin">gdk_gc_set_clip_origin</a>          (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> x,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> y);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-clip-mask">gdk_gc_set_clip_mask</a>            (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap">GdkBitmap</a> *mask);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-clip-rectangle">gdk_gc_set_clip_rectangle</a>       (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Points-Rectangles-and-Regions.html#GdkRectangle">GdkRectangle</a> *rectangle);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-clip-region">gdk_gc_set_clip_region</a>          (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Points-Rectangles-and-Regions.html#GdkRegion">GdkRegion</a> *region);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-subwindow">gdk_gc_set_subwindow</a>            (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Graphics-Contexts.html#GdkSubwindowMode">GdkSubwindowMode</a> mode);
enum        <a href="gdk-Graphics-Contexts.html#GdkSubwindowMode">GdkSubwindowMode</a>;
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-exposures">gdk_gc_set_exposures</a>            (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> exposures);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-line-attributes">gdk_gc_set_line_attributes</a>      (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> line_width,
                                             <a href="gdk-Graphics-Contexts.html#GdkLineStyle">GdkLineStyle</a> line_style,
                                             <a href="gdk-Graphics-Contexts.html#GdkCapStyle">GdkCapStyle</a> cap_style,
                                             <a href="gdk-Graphics-Contexts.html#GdkJoinStyle">GdkJoinStyle</a> join_style);
enum        <a href="gdk-Graphics-Contexts.html#GdkLineStyle">GdkLineStyle</a>;
enum        <a href="gdk-Graphics-Contexts.html#GdkCapStyle">GdkCapStyle</a>;
enum        <a href="gdk-Graphics-Contexts.html#GdkJoinStyle">GdkJoinStyle</a>;
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-dashes">gdk_gc_set_dashes</a>               (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> dash_offset,
                                             <a
href="../glib/glib-Basic-Types.html#gint8"
>gint8</a> dash_list[],
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-copy">gdk_gc_copy</a>                     (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *dst_gc,
                                             <a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *src_gc);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-set-colormap">gdk_gc_set_colormap</a>             (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a> *colormap);
<a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a>* <a href="gdk-Graphics-Contexts.html#gdk-gc-get-colormap">gdk_gc_get_colormap</a>            (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc);
void        <a href="gdk-Graphics-Contexts.html#gdk-gc-offset">gdk_gc_offset</a>                   (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> x_offset,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> y_offset);


</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2931498"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">

  <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
   +----GdkGC
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2931522"></a><h2>Description</h2>
<p>
All drawing operations in GDK take a 
<em class="firstterm">graphics context</em> (GC) argument. 
A graphics context encapsulates information about
the way things are drawn, such as the foreground
color or line width. By using graphics contexts, 
the number of arguments to each drawing call is
greatly reduced, and communication overhead is
minimized, since identical arguments do not need
to be passed repeatedly.
</p>
<p>
Most values of a graphics context can be set at
creation time by using <a href="gdk-Graphics-Contexts.html#gdk-gc-new-with-values"><code class="function">gdk_gc_new_with_values()</code></a>,
or can be set one-by-one using functions such
as <a href="gdk-Graphics-Contexts.html#gdk-gc-set-foreground"><code class="function">gdk_gc_set_foreground()</code></a>. A few of the values
in the GC, such as the dash pattern, can only
be set by the latter method.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2931576"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2931586"></a><h3>
<a name="GdkGC-struct"></a>GdkGC</h3>
<a class="indexterm" name="id2931599"></a><pre class="programlisting">typedef struct _GdkGC GdkGC;</pre>
<p>
The <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> structure represents a graphics context.
It is an opaque structure with no user-visible
elements.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2931623"></a><h3>
<a name="GdkGCValues"></a>GdkGCValues</h3>
<a class="indexterm" name="id2931636"></a><pre class="programlisting">typedef struct {
  GdkColor	    foreground;
  GdkColor	    background;
  GdkFont	   *font;
  GdkFunction	    function;
  GdkFill	    fill;
  GdkPixmap	   *tile;
  GdkPixmap	   *stipple;
  GdkPixmap	   *clip_mask;
  GdkSubwindowMode  subwindow_mode;
  gint		    ts_x_origin;
  gint		    ts_y_origin;
  gint		    clip_x_origin;
  gint		    clip_y_origin;
  gint		    graphics_exposures;
  gint		    line_width;
  GdkLineStyle	    line_style;
  GdkCapStyle	    cap_style;
  GdkJoinStyle	    join_style;
} GdkGCValues;
</pre>
<p>
The <a href="gdk-Graphics-Contexts.html#GdkGCValues"><span class="type">GdkGCValues</span></a> structure holds a set of values used
to create or modify a graphics context.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a>&#160;<em class="structfield"><code>foreground</code></em>;</span></td>
<td>the foreground color. Note that <a href="gdk-Graphics-Contexts.html#gdk-gc-get-values"><code class="function">gdk_gc_get_values()</code></a>
  only sets the pixel value.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a>&#160;<em class="structfield"><code>background</code></em>;</span></td>
<td>the background color. Note that <a href="gdk-Graphics-Contexts.html#gdk-gc-get-values"><code class="function">gdk_gc_get_values()</code></a>
  only sets the pixel value.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="gdk-Fonts.html#GdkFont">GdkFont</a>&#160;*<em class="structfield"><code>font</code></em>;</span></td>
<td>the default font.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="gdk-Graphics-Contexts.html#GdkFunction">GdkFunction</a>&#160;<em class="structfield"><code>function</code></em>;</span></td>
<td>the bitwise operation used when drawing.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="gdk-Graphics-Contexts.html#GdkFill">GdkFill</a>&#160;<em class="structfield"><code>fill</code></em>;</span></td>
<td>the fill style.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a>&#160;*<em class="structfield"><code>tile</code></em>;</span></td>
<td>the tile pixmap.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a>&#160;*<em class="structfield"><code>stipple</code></em>;</span></td>
<td>the stipple bitmap.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a>&#160;*<em class="structfield"><code>clip_mask</code></em>;</span></td>
<td>the clip mask bitmap.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="gdk-Graphics-Contexts.html#GdkSubwindowMode">GdkSubwindowMode</a>&#160;<em class="structfield"><code>subwindow_mode</code></em>;</span></td>
<td>the subwindow mode.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>&#160;<em class="structfield"><code>ts_x_origin</code></em>;</span></td>
<td>the x origin of the tile or stipple.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>&#160;<em class="structfield"><code>ts_y_origin</code></em>;</span></td>
<td>the y origin of the tile or stipple.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>&#160;<em class="structfield"><code>clip_x_origin</code></em>;</span></td>
<td>the x origin of the clip mask.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>&#160;<em class="structfield"><code>clip_y_origin</code></em>;</span></td>
<td>the y origin of the clip mask.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>&#160;<em class="structfield"><code>graphics_exposures</code></em>;</span></td>
<td>whether graphics exposures are enabled.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>&#160;<em class="structfield"><code>line_width</code></em>;</span></td>
<td>the line width.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="gdk-Graphics-Contexts.html#GdkLineStyle">GdkLineStyle</a>&#160;<em class="structfield"><code>line_style</code></em>;</span></td>
<td>the way dashed lines are drawn.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="gdk-Graphics-Contexts.html#GdkCapStyle">GdkCapStyle</a>&#160;<em class="structfield"><code>cap_style</code></em>;</span></td>
<td>the way the ends of lines are drawn.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="gdk-Graphics-Contexts.html#GdkJoinStyle">GdkJoinStyle</a>&#160;<em class="structfield"><code>join_style</code></em>;</span></td>
<td>the way joins between lines are drawn.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2932068"></a><h3>
<a name="GdkGCValuesMask"></a>enum GdkGCValuesMask</h3>
<a class="indexterm" name="id2932081"></a><pre class="programlisting">typedef enum
{
  GDK_GC_FOREGROUND    = 1 &lt;&lt; 0,
  GDK_GC_BACKGROUND    = 1 &lt;&lt; 1,
  GDK_GC_FONT	       = 1 &lt;&lt; 2,
  GDK_GC_FUNCTION      = 1 &lt;&lt; 3,
  GDK_GC_FILL	       = 1 &lt;&lt; 4,
  GDK_GC_TILE	       = 1 &lt;&lt; 5,
  GDK_GC_STIPPLE       = 1 &lt;&lt; 6,
  GDK_GC_CLIP_MASK     = 1 &lt;&lt; 7,
  GDK_GC_SUBWINDOW     = 1 &lt;&lt; 8,
  GDK_GC_TS_X_ORIGIN   = 1 &lt;&lt; 9,
  GDK_GC_TS_Y_ORIGIN   = 1 &lt;&lt; 10,
  GDK_GC_CLIP_X_ORIGIN = 1 &lt;&lt; 11,
  GDK_GC_CLIP_Y_ORIGIN = 1 &lt;&lt; 12,
  GDK_GC_EXPOSURES     = 1 &lt;&lt; 13,
  GDK_GC_LINE_WIDTH    = 1 &lt;&lt; 14,
  GDK_GC_LINE_STYLE    = 1 &lt;&lt; 15,
  GDK_GC_CAP_STYLE     = 1 &lt;&lt; 16,
  GDK_GC_JOIN_STYLE    = 1 &lt;&lt; 17
} GdkGCValuesMask;
</pre>
<p>
A set of bit flags used to indicate which fields
<a href="gdk-Graphics-Contexts.html#GdkGCValues"><span class="type">GdkGCValues</span></a> structure are set.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GDK-GC-FOREGROUND:CAPS"></a><code class="literal">GDK_GC_FOREGROUND</code></span></td>
<td>the <em class="parameter"><code>foreground</code></em> is set.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-GC-BACKGROUND:CAPS"></a><code class="literal">GDK_GC_BACKGROUND</code></span></td>
<td>the <em class="parameter"><code>background</code></em> is set.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-GC-FONT:CAPS"></a><code class="literal">GDK_GC_FONT</code></span></td>
<td>the <em class="parameter"><code>font</code></em> is set.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-GC-FUNCTION:CAPS"></a><code class="literal">GDK_GC_FUNCTION</code></span></td>
<td>the <em class="parameter"><code>function</code></em> is set.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-GC-FILL:CAPS"></a><code class="literal">GDK_GC_FILL</code></span></td>
<td>the <em class="parameter"><code>fill</code></em> is set.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-GC-TILE:CAPS"></a><code class="literal">GDK_GC_TILE</code></span></td>
<td>the <em class="parameter"><code>tile</code></em> is set.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-GC-STIPPLE:CAPS"></a><code class="literal">GDK_GC_STIPPLE</code></span></td>
<td>the <em class="parameter"><code>stipple</code></em> is set.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-GC-CLIP-MASK:CAPS"></a><code class="literal">GDK_GC_CLIP_MASK</code></span></td>
<td>the <em class="parameter"><code>clip_mask</code></em> is set.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-GC-SUBWINDOW:CAPS"></a><code class="literal">GDK_GC_SUBWINDOW</code></span></td>
<td>the <em class="parameter"><code>subwindow_mode</code></em> is set.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-GC-TS-X-ORIGIN:CAPS"></a><code class="literal">GDK_GC_TS_X_ORIGIN</code></span></td>
<td>the <em class="parameter"><code>ts_x_origin</code></em> is set.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-GC-TS-Y-ORIGIN:CAPS"></a><code class="literal">GDK_GC_TS_Y_ORIGIN</code></span></td>
<td>the <em class="parameter"><code>ts_y_origin</code></em> is set.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-GC-CLIP-X-ORIGIN:CAPS"></a><code class="literal">GDK_GC_CLIP_X_ORIGIN</code></span></td>
<td>the <em class="parameter"><code>clip_x_origin</code></em> is set.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-GC-CLIP-Y-ORIGIN:CAPS"></a><code class="literal">GDK_GC_CLIP_Y_ORIGIN</code></span></td>
<td>the <em class="parameter"><code>clip_y_origin</code></em> is set.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-GC-EXPOSURES:CAPS"></a><code class="literal">GDK_GC_EXPOSURES</code></span></td>
<td>the <em class="parameter"><code>graphics_exposures</code></em> is set.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-GC-LINE-WIDTH:CAPS"></a><code class="literal">GDK_GC_LINE_WIDTH</code></span></td>
<td>the <em class="parameter"><code>line_width</code></em> is set.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-GC-LINE-STYLE:CAPS"></a><code class="literal">GDK_GC_LINE_STYLE</code></span></td>
<td>the <em class="parameter"><code>line_style</code></em> is set.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-GC-CAP-STYLE:CAPS"></a><code class="literal">GDK_GC_CAP_STYLE</code></span></td>
<td>the <em class="parameter"><code>cap_style</code></em> is set.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-GC-JOIN-STYLE:CAPS"></a><code class="literal">GDK_GC_JOIN_STYLE</code></span></td>
<td>the <em class="parameter"><code>join_style</code></em> is set.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2932633"></a><h3>
<a name="GdkFunction"></a>enum GdkFunction</h3>
<a class="indexterm" name="id2932646"></a><pre class="programlisting">typedef enum
{
  GDK_COPY,
  GDK_INVERT,
  GDK_XOR,
  GDK_CLEAR,
  GDK_AND,
  GDK_AND_REVERSE,
  GDK_AND_INVERT,
  GDK_NOOP,
  GDK_OR,
  GDK_EQUIV,
  GDK_OR_REVERSE,
  GDK_COPY_INVERT,
  GDK_OR_INVERT,
  GDK_NAND,
  GDK_NOR,
  GDK_SET
} GdkFunction;
</pre>
<p>
Determines how the bit values for the source pixels are combined with
the bit values for destination pixels to produce the final result. The
sixteen values here correspond to the 16 different possible 2x2 truth
tables.  Only a couple of these values are usually useful; for colored
images, only <code class="literal">GDK_COPY</code>, <code class="literal">GDK_XOR</code> and <code class="literal">GDK_INVERT</code> are generally
useful. For bitmaps, <code class="literal">GDK_AND</code> and <code class="literal">GDK_OR</code> are also useful.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2932727"></a><h3>
<a name="gdk-gc-new"></a>gdk_gc_new ()</h3>
<a class="indexterm" name="id2932739"></a><pre class="programlisting"><a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a>*      gdk_gc_new                      (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable);</pre>
<p>
Create a new graphics context with default values.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td> a <a href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>. The created GC must always be used
  with drawables of the same depth as this one.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the new graphics context.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2932809"></a><h3>
<a name="gdk-gc-new-with-values"></a>gdk_gc_new_with_values ()</h3>
<a class="indexterm" name="id2932823"></a><pre class="programlisting"><a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a>*      gdk_gc_new_with_values          (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
                                             <a href="gdk-Graphics-Contexts.html#GdkGCValues">GdkGCValues</a> *values,
                                             <a href="gdk-Graphics-Contexts.html#GdkGCValuesMask">GdkGCValuesMask</a> values_mask);</pre>
<p>
Create a new GC with the given initial values.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td> a <a href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>. The created GC must always be used
  with drawables of the same depth as this one.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>values</code></em>&#160;:</span></td>
<td> a structure containing initial values for the GC.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>values_mask</code></em>&#160;:</span></td>
<td> a bit mask indicating which fields in <em class="parameter"><code>values</code></em>
  are set.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the new graphics context.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2932944"></a><h3>
<a name="gdk-gc-get-screen"></a>gdk_gc_get_screen ()</h3>
<a class="indexterm" name="id2932959"></a><pre class="programlisting"><a href="GdkScreen.html" title="GdkScreen">GdkScreen</a>*  gdk_gc_get_screen               (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc);</pre>
<p>
Gets the <a href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a> for which <em class="parameter"><code>gc</code></em> was created</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the <a href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a> for <em class="parameter"><code>gc</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2933058"></a><h3>
<a name="gdk-gc-ref"></a>gdk_gc_ref ()</h3>
<a class="indexterm" name="id2933073"></a><pre class="programlisting"><a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a>*      gdk_gc_ref                      (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_ref</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Deprecated function; use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-ref"
><code class="function">g_object_ref()</code></a> instead.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the gc.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2933164"></a><h3>
<a name="gdk-gc-unref"></a>gdk_gc_unref ()</h3>
<a class="indexterm" name="id2933180"></a><pre class="programlisting">void        gdk_gc_unref                    (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_unref</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"
><code class="function">g_object_unref()</code></a> instead.</p>
</div>
<p>
Decrement the reference count of <em class="parameter"><code>gc</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2933266"></a><h3>
<a name="gdk-gc-destroy"></a>gdk_gc_destroy</h3>
<a class="indexterm" name="id2933281"></a><pre class="programlisting">#define gdk_gc_destroy                 gdk_gc_unref
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_destroy</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"
><code class="function">g_object_unref()</code></a> instead</p>
</div>
<p>
This function is obsolete and should not be used.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2933321"></a><h3>
<a name="gdk-gc-set-values"></a>gdk_gc_set_values ()</h3>
<a class="indexterm" name="id2933334"></a><pre class="programlisting">void        gdk_gc_set_values               (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Graphics-Contexts.html#GdkGCValues">GdkGCValues</a> *values,
                                             <a href="gdk-Graphics-Contexts.html#GdkGCValuesMask">GdkGCValuesMask</a> values_mask);</pre>
<p>
Sets attributes of a graphics context in bulk. For each flag set in
<em class="parameter"><code>values_mask</code></em>, the corresponding field will be read from <em class="parameter"><code>values</code></em> and
set as the new value for <em class="parameter"><code>gc</code></em>. If you're only setting a few values
on <em class="parameter"><code>gc</code></em>, calling individual "setter" functions is likely more
convenient.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>values</code></em>&#160;:</span></td>
<td> struct containing the new values
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>values_mask</code></em>&#160;:</span></td>
<td> mask indicating which struct fields are to be used
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2933462"></a><h3>
<a name="gdk-gc-get-values"></a>gdk_gc_get_values ()</h3>
<a class="indexterm" name="id2933475"></a><pre class="programlisting">void        gdk_gc_get_values               (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Graphics-Contexts.html#GdkGCValues">GdkGCValues</a> *values);</pre>
<p>
Retrieves the current values from a graphics context. Note that 
only the pixel values of the <em class="parameter"><code>values-&gt;foreground</code></em> and <em class="parameter"><code>values-&gt;background</code></em>
are filled, use <a href="gdk-Colormaps-and-Colors.html#gdk-colormap-query-color"><code class="function">gdk_colormap_query_color()</code></a> to obtain the rgb values
if you need them.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td>  a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>values</code></em>&#160;:</span></td>
<td> the <a href="gdk-Graphics-Contexts.html#GdkGCValues"><span class="type">GdkGCValues</span></a> structure in which to store the results.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2933589"></a><h3>
<a name="gdk-gc-set-foreground"></a>gdk_gc_set_foreground ()</h3>
<a class="indexterm" name="id2933602"></a><pre class="programlisting">void        gdk_gc_set_foreground           (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *color);</pre>
<p>
Sets the foreground color for a graphics context.
Note that this function uses <em class="parameter"><code>color-&gt;pixel</code></em>, use 
<a href="gdk-Graphics-Contexts.html#gdk-gc-set-rgb-fg-color"><code class="function">gdk_gc_set_rgb_fg_color()</code></a> to specify the foreground 
color as red, green, blue components.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>color</code></em>&#160;:</span></td>
<td> the new foreground color.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2933700"></a><h3>
<a name="gdk-gc-set-background"></a>gdk_gc_set_background ()</h3>
<a class="indexterm" name="id2933713"></a><pre class="programlisting">void        gdk_gc_set_background           (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *color);</pre>
<p>
Sets the background color for a graphics context.
Note that this function uses <em class="parameter"><code>color-&gt;pixel</code></em>, use 
<a href="gdk-Graphics-Contexts.html#gdk-gc-set-rgb-bg-color"><code class="function">gdk_gc_set_rgb_bg_color()</code></a> to specify the background 
color as red, green, blue components.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>color</code></em>&#160;:</span></td>
<td> the new background color.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2933811"></a><h3>
<a name="gdk-gc-set-rgb-fg-color"></a>gdk_gc_set_rgb_fg_color ()</h3>
<a class="indexterm" name="id2933824"></a><pre class="programlisting">void        gdk_gc_set_rgb_fg_color         (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *color);</pre>
<p>
Set the foreground color of a GC using an unallocated color. The
pixel value for the color will be determined using GdkRGB. If the
colormap for the GC has not previously been initialized for GdkRGB,
then for pseudo-color colormaps (colormaps with a small modifiable
number of colors), a colorcube will be allocated in the colormap.
</p>
<p>
Calling this function for a GC without a colormap is an error.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>color</code></em>&#160;:</span></td>
<td> an unallocated <a href="gdk-Colormaps-and-Colors.html#GdkColor"><span class="type">GdkColor</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2933920"></a><h3>
<a name="gdk-gc-set-rgb-bg-color"></a>gdk_gc_set_rgb_bg_color ()</h3>
<a class="indexterm" name="id2933932"></a><pre class="programlisting">void        gdk_gc_set_rgb_bg_color         (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *color);</pre>
<p>
Set the background color of a GC using an unallocated color. The
pixel value for the color will be determined using GdkRGB. If the
colormap for the GC has not previously been initialized for GdkRGB,
then for pseudo-color colormaps (colormaps with a small modifiable
number of colors), a colorcube will be allocated in the colormap.
</p>
<p>
Calling this function for a GC without a colormap is an error.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>color</code></em>&#160;:</span></td>
<td> an unallocated <a href="gdk-Colormaps-and-Colors.html#GdkColor"><span class="type">GdkColor</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2934029"></a><h3>
<a name="gdk-gc-set-font"></a>gdk_gc_set_font ()</h3>
<a class="indexterm" name="id2934044"></a><pre class="programlisting">void        gdk_gc_set_font                 (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_font</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Sets the font for a graphics context. (Note that
all text-drawing functions in GDK take a <em class="parameter"><code>font</code></em>
argument; the value set here is used when that
argument is <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.)</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em>&#160;:</span></td>
<td> the new font. 
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2934153"></a><h3>
<a name="gdk-gc-set-function"></a>gdk_gc_set_function ()</h3>
<a class="indexterm" name="id2934166"></a><pre class="programlisting">void        gdk_gc_set_function             (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Graphics-Contexts.html#GdkFunction">GdkFunction</a> function);</pre>
<p>
Determines how the current pixel values and the
pixel values being drawn are combined to produce
the final pixel values.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>function</code></em>&#160;:</span></td>
<td> the <a href="gdk-Graphics-Contexts.html#GdkFunction"><span class="type">GdkFunction</span></a> to use
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2934253"></a><h3>
<a name="gdk-gc-set-fill"></a>gdk_gc_set_fill ()</h3>
<a class="indexterm" name="id2934266"></a><pre class="programlisting">void        gdk_gc_set_fill                 (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Graphics-Contexts.html#GdkFill">GdkFill</a> fill);</pre>
<p>
Set the fill mode for a graphics context.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>fill</code></em>&#160;:</span></td>
<td> the new fill mode.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2934345"></a><h3>
<a name="GdkFill"></a>enum GdkFill</h3>
<a class="indexterm" name="id2934357"></a><pre class="programlisting">typedef enum
{
  GDK_SOLID,
  GDK_TILED,
  GDK_STIPPLED,
  GDK_OPAQUE_STIPPLED
} GdkFill;
</pre>
<p>
Determines how primitives are drawn.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GDK-SOLID:CAPS"></a><code class="literal">GDK_SOLID</code></span></td>
<td>draw with the foreground color.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-TILED:CAPS"></a><code class="literal">GDK_TILED</code></span></td>
<td>draw with a tiled pixmap.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-STIPPLED:CAPS"></a><code class="literal">GDK_STIPPLED</code></span></td>
<td>draw using the stipple bitmap. Pixels corresponding
  to bits in the stipple bitmap that are set will be drawn in the
  foreground color; pixels corresponding to bits that are
  not set will be left untouched.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-OPAQUE-STIPPLED:CAPS"></a><code class="literal">GDK_OPAQUE_STIPPLED</code></span></td>
<td>draw using the stipple bitmap. Pixels corresponding
  to bits in the stipple bitmap that are set will be drawn in the
  foreground color; pixels corresponding to bits that are
  not set will be drawn with the background color.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2934473"></a><h3>
<a name="gdk-gc-set-tile"></a>gdk_gc_set_tile ()</h3>
<a class="indexterm" name="id2934485"></a><pre class="programlisting">void        gdk_gc_set_tile                 (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a> *tile);</pre>
<p>
Set a tile pixmap for a graphics context.
This will only be used if the fill mode
is <a href="gdk-Graphics-Contexts.html#GDK-TILED:CAPS"><code class="literal">GDK_TILED</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td>  a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>tile</code></em>&#160;:</span></td>
<td>  the new tile pixmap.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2934577"></a><h3>
<a name="gdk-gc-set-stipple"></a>gdk_gc_set_stipple ()</h3>
<a class="indexterm" name="id2934590"></a><pre class="programlisting">void        gdk_gc_set_stipple              (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a> *stipple);</pre>
<p>
Set the stipple bitmap for a graphics context. The
stipple will only be used if the fill mode is
<a href="gdk-Graphics-Contexts.html#GDK-STIPPLED:CAPS"><code class="literal">GDK_STIPPLED</code></a> or <a href="gdk-Graphics-Contexts.html#GDK-OPAQUE-STIPPLED:CAPS"><code class="literal">GDK_OPAQUE_STIPPLED</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>stipple</code></em>&#160;:</span></td>
<td> the new stipple bitmap.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2934692"></a><h3>
<a name="gdk-gc-set-ts-origin"></a>gdk_gc_set_ts_origin ()</h3>
<a class="indexterm" name="id2934705"></a><pre class="programlisting">void        gdk_gc_set_ts_origin            (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> x,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> y);</pre>
<p>
Set the origin when using tiles or stipples with
the GC. The tile or stipple will be aligned such
that the upper left corner of the tile or stipple
will coincide with this point.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td>  a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
<td> the x-coordinate of the origin.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
<td> the y-coordinate of the origin.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2934808"></a><h3>
<a name="gdk-gc-set-clip-origin"></a>gdk_gc_set_clip_origin ()</h3>
<a class="indexterm" name="id2934821"></a><pre class="programlisting">void        gdk_gc_set_clip_origin          (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> x,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> y);</pre>
<p>
Sets the origin of the clip mask. The coordinates are
interpreted relative to the upper-left corner of
the destination drawable of the current operation.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
<td> the x-coordinate of the origin.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
<td> the y-coordinate of the origin.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2934923"></a><h3>
<a name="gdk-gc-set-clip-mask"></a>gdk_gc_set_clip_mask ()</h3>
<a class="indexterm" name="id2934936"></a><pre class="programlisting">void        gdk_gc_set_clip_mask            (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap">GdkBitmap</a> *mask);</pre>
<p>
Sets the clip mask for a graphics context from a bitmap.
The clip mask is interpreted relative to the clip
origin. (See <a href="gdk-Graphics-Contexts.html#gdk-gc-set-clip-origin"><code class="function">gdk_gc_set_clip_origin()</code></a>).</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> the <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mask</code></em>&#160;:</span></td>
<td> a bitmap.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2935027"></a><h3>
<a name="gdk-gc-set-clip-rectangle"></a>gdk_gc_set_clip_rectangle ()</h3>
<a class="indexterm" name="id2935040"></a><pre class="programlisting">void        gdk_gc_set_clip_rectangle       (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Points-Rectangles-and-Regions.html#GdkRectangle">GdkRectangle</a> *rectangle);</pre>
<p>
Sets the clip mask for a graphics context from a
rectangle. The clip mask is interpreted relative to the clip
origin. (See <a href="gdk-Graphics-Contexts.html#gdk-gc-set-clip-origin"><code class="function">gdk_gc_set_clip_origin()</code></a>).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>rectangle</code></em>&#160;:</span></td>
<td> the rectangle to clip to.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2935132"></a><h3>
<a name="gdk-gc-set-clip-region"></a>gdk_gc_set_clip_region ()</h3>
<a class="indexterm" name="id2935144"></a><pre class="programlisting">void        gdk_gc_set_clip_region          (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Points-Rectangles-and-Regions.html#GdkRegion">GdkRegion</a> *region);</pre>
<p>
Sets the clip mask for a graphics context from a region structure.
The clip mask is interpreted relative to the clip origin. (See
<a href="gdk-Graphics-Contexts.html#gdk-gc-set-clip-origin"><code class="function">gdk_gc_set_clip_origin()</code></a>).</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>region</code></em>&#160;:</span></td>
<td> the <a href="gdk-Points-Rectangles-and-Regions.html#GdkRegion"><span class="type">GdkRegion</span></a>. 
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2935243"></a><h3>
<a name="gdk-gc-set-subwindow"></a>gdk_gc_set_subwindow ()</h3>
<a class="indexterm" name="id2935256"></a><pre class="programlisting">void        gdk_gc_set_subwindow            (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Graphics-Contexts.html#GdkSubwindowMode">GdkSubwindowMode</a> mode);</pre>
<p>
Sets how drawing with this GC on a window will affect child
windows of that window.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mode</code></em>&#160;:</span></td>
<td> the subwindow mode.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2935336"></a><h3>
<a name="GdkSubwindowMode"></a>enum GdkSubwindowMode</h3>
<a class="indexterm" name="id2935350"></a><pre class="programlisting">typedef enum
{
  GDK_CLIP_BY_CHILDREN	= 0,
  GDK_INCLUDE_INFERIORS = 1
} GdkSubwindowMode;
</pre>
<p>
Determines how drawing onto a window will affect child
windows of that window. 
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GDK-CLIP-BY-CHILDREN:CAPS"></a><code class="literal">GDK_CLIP_BY_CHILDREN</code></span></td>
<td>only draw onto the window itself.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-INCLUDE-INFERIORS:CAPS"></a><code class="literal">GDK_INCLUDE_INFERIORS</code></span></td>
<td>draw onto the window and child windows.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2935418"></a><h3>
<a name="gdk-gc-set-exposures"></a>gdk_gc_set_exposures ()</h3>
<a class="indexterm" name="id2935431"></a><pre class="programlisting">void        gdk_gc_set_exposures            (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> exposures);</pre>
<p>
Sets whether copying non-visible portions of a drawable
using this graphics context generate exposure events
for the corresponding regions of the destination
drawable. (See <a href="gdk-Drawing-Primitives.html#gdk-draw-drawable"><code class="function">gdk_draw_drawable()</code></a>).</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>exposures</code></em>&#160;:</span></td>
<td> if <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>, exposure events will be generated.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2935534"></a><h3>
<a name="gdk-gc-set-line-attributes"></a>gdk_gc_set_line_attributes ()</h3>
<a class="indexterm" name="id2935548"></a><pre class="programlisting">void        gdk_gc_set_line_attributes      (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> line_width,
                                             <a href="gdk-Graphics-Contexts.html#GdkLineStyle">GdkLineStyle</a> line_style,
                                             <a href="gdk-Graphics-Contexts.html#GdkCapStyle">GdkCapStyle</a> cap_style,
                                             <a href="gdk-Graphics-Contexts.html#GdkJoinStyle">GdkJoinStyle</a> join_style);</pre>
<p>
Sets various attributes of how lines are drawn. See
the corresponding members of <a href="gdk-Graphics-Contexts.html#GdkGCValues"><span class="type">GdkGCValues</span></a> for full
explanations of the arguments.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>line_width</code></em>&#160;:</span></td>
<td> the width of lines.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>line_style</code></em>&#160;:</span></td>
<td> the dash-style for lines.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>cap_style</code></em>&#160;:</span></td>
<td> the manner in which the ends of lines are drawn.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>join_style</code></em>&#160;:</span></td>
<td> the in which lines are joined together.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2935702"></a><h3>
<a name="GdkLineStyle"></a>enum GdkLineStyle</h3>
<a class="indexterm" name="id2935715"></a><pre class="programlisting">typedef enum
{
  GDK_LINE_SOLID,
  GDK_LINE_ON_OFF_DASH,
  GDK_LINE_DOUBLE_DASH
} GdkLineStyle;
</pre>
<p>
Determines how lines are drawn.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GDK-LINE-SOLID:CAPS"></a><code class="literal">GDK_LINE_SOLID</code></span></td>
<td>lines are drawn solid.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-LINE-ON-OFF-DASH:CAPS"></a><code class="literal">GDK_LINE_ON_OFF_DASH</code></span></td>
<td>even segments are drawn; odd segments are not drawn.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-LINE-DOUBLE-DASH:CAPS"></a><code class="literal">GDK_LINE_DOUBLE_DASH</code></span></td>
<td>even segments are normally. Odd segments are drawn
  in the background color if the fill style is <a href="gdk-Graphics-Contexts.html#GDK-SOLID:CAPS"><code class="literal">GDK_SOLID</code></a>, or in the background
  color masked by the stipple if the fill style is <a href="gdk-Graphics-Contexts.html#GDK-STIPPLED:CAPS"><code class="literal">GDK_STIPPLED</code></a>.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2935829"></a><h3>
<a name="GdkCapStyle"></a>enum GdkCapStyle</h3>
<a class="indexterm" name="id2935842"></a><pre class="programlisting">typedef enum
{
  GDK_CAP_NOT_LAST,
  GDK_CAP_BUTT,
  GDK_CAP_ROUND,
  GDK_CAP_PROJECTING
} GdkCapStyle;
</pre>
<p>
Determines how the end of lines are drawn.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GDK-CAP-NOT-LAST:CAPS"></a><code class="literal">GDK_CAP_NOT_LAST</code></span></td>
<td>the same as <a href="gdk-Graphics-Contexts.html#GDK-CAP-BUTT:CAPS"><code class="literal">GDK_CAP_BUTT</code></a> for lines of non-zero width.
       for zero width lines, the final point on the line will not be drawn.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-CAP-BUTT:CAPS"></a><code class="literal">GDK_CAP_BUTT</code></span></td>
<td>the ends of the lines are drawn squared off and extending
       to the coordinates of the end point.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-CAP-ROUND:CAPS"></a><code class="literal">GDK_CAP_ROUND</code></span></td>
<td>the ends of the lines are drawn as semicircles with the
       diameter equal to the line width and centered at the end point.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-CAP-PROJECTING:CAPS"></a><code class="literal">GDK_CAP_PROJECTING</code></span></td>
<td>the ends of the lines are drawn squared off and extending
       half the width of the line beyond the end point.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2935970"></a><h3>
<a name="GdkJoinStyle"></a>enum GdkJoinStyle</h3>
<a class="indexterm" name="id2935981"></a><pre class="programlisting">typedef enum
{
  GDK_JOIN_MITER,
  GDK_JOIN_ROUND,
  GDK_JOIN_BEVEL
} GdkJoinStyle;
</pre>
<p>
Determines how the joins between segments of a polygon are drawn.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GDK-JOIN-MITER:CAPS"></a><code class="literal">GDK_JOIN_MITER</code></span></td>
<td>the sides of each line are extended to meet at an angle.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-JOIN-ROUND:CAPS"></a><code class="literal">GDK_JOIN_ROUND</code></span></td>
<td>the sides of the two lines are joined by a circular arc.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-JOIN-BEVEL:CAPS"></a><code class="literal">GDK_JOIN_BEVEL</code></span></td>
<td>the sides of the two lines are joined by a straight line which
       makes an equal angle with each line.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2936072"></a><h3>
<a name="gdk-gc-set-dashes"></a>gdk_gc_set_dashes ()</h3>
<a class="indexterm" name="id2936085"></a><pre class="programlisting">void        gdk_gc_set_dashes               (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> dash_offset,
                                             <a
href="../glib/glib-Basic-Types.html#gint8"
>gint8</a> dash_list[],
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n);</pre>
<p>
Sets the way dashed-lines are drawn. Lines will be
drawn with alternating on and off segments of the
lengths specified in <em class="parameter"><code>dash_list</code></em>. The manner in
which the on and off segments are drawn is determined
by the <em class="parameter"><code>line_style</code></em> value of the GC. (This can
be changed with <a href="gdk-Graphics-Contexts.html#gdk-gc-set-line-attributes"><code class="function">gdk_gc_set_line_attributes()</code></a>.)
</p>
<p>
The <em class="parameter"><code>dash_offset</code></em> defines the phase of the pattern, 
specifying how many pixels into the dash-list the pattern 
should actually begin.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dash_offset</code></em>&#160;:</span></td>
<td> the phase of the dash pattern.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dash_list</code></em>&#160;:</span></td>
<td> an array of dash lengths.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></td>
<td> the number of elements in <em class="parameter"><code>dash_list</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2936250"></a><h3>
<a name="gdk-gc-copy"></a>gdk_gc_copy ()</h3>
<a class="indexterm" name="id2936263"></a><pre class="programlisting">void        gdk_gc_copy                     (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *dst_gc,
                                             <a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *src_gc);</pre>
<p>
Copy the set of values from one graphics context
onto another graphics context.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>dst_gc</code></em>&#160;:</span></td>
<td> the destination graphics context.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>src_gc</code></em>&#160;:</span></td>
<td> the source graphics context.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2936336"></a><h3>
<a name="gdk-gc-set-colormap"></a>gdk_gc_set_colormap ()</h3>
<a class="indexterm" name="id2936349"></a><pre class="programlisting">void        gdk_gc_set_colormap             (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a> *colormap);</pre>
<p>
Sets the colormap for the GC to the given colormap. The depth
of the colormap's visual must match the depth of the drawable
for which the GC was created.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>colormap</code></em>&#160;:</span></td>
<td> a <a href="gdk-Colormaps-and-Colors.html#GdkColormap"><span class="type">GdkColormap</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2936437"></a><h3>
<a name="gdk-gc-get-colormap"></a>gdk_gc_get_colormap ()</h3>
<a class="indexterm" name="id2936450"></a><pre class="programlisting"><a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a>* gdk_gc_get_colormap            (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc);</pre>
<p>
Retrieves the colormap for a given GC, if it exists.
A GC will have a colormap if the drawable for which it was created
has a colormap, or if a colormap was set explicitely with
gdk_gc_set_colormap.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the colormap of <em class="parameter"><code>gc</code></em>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if <em class="parameter"><code>gc</code></em> doesn't have one.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2936542"></a><h3>
<a name="gdk-gc-offset"></a>gdk_gc_offset ()</h3>
<a class="indexterm" name="id2936554"></a><pre class="programlisting">void        gdk_gc_offset                   (<a href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> x_offset,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> y_offset);</pre>
<p>
Offset attributes such as the clip and tile-stipple origins
of the GC so that drawing at x - x_offset, y - y_offset with
the offset GC  has the same effect as drawing at x, y with the original
GC.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>gc</code></em>&#160;:</span></td>
<td> a <a href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>x_offset</code></em>&#160;:</span></td>
<td> amount by which to offset the GC in the X direction
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>y_offset</code></em>&#160;:</span></td>
<td> amount by which to offset the GC in the Y direction
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>

Anon7 - 2021