/usr/share/gtk-doc/html/pygtk/class-gdkcairocontext.html is in python-gtk2-doc 2.24.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.gdk.CairoContext</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gdk-class-reference.html" title="The gtk.gdk Class Reference"><link rel="prev" href="class-gdkatom.html" title="gtk.gdk.Atom"><link rel="next" href="class-gdkcolor.html" title="gtk.gdk.Color"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.gdk.CairoContext</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gdkatom.html">Prev</a> </td><th width="60%" align="center">The gtk.gdk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gdkcolor.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.gdk.CairoContext"><a name="class-gdkcairocontext"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.gdk.CairoContext</h2><p>gtk.gdk.CairoContext — object providing support for drawing using Cairo (new in
PyGTK 2.8)</p></div><div class="refsect1" title="Synopsis"><a name="id3215913"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.gdk.CairoContext</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-pangocairocairocontext.html" title="pangocairo.CairoContext">pangocairo.CairoContext</a></span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkcairocontext.html#method-gdkcairocontext--set-source-color" title="gtk.gdk.CairoContext.set_source_color">set_source_color</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>color</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkcairocontext.html#method-gdkcairocontext--set-source-pixbuf" title="gtk.gdk.CairoContext.set_source_pixbuf">set_source_pixbuf</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf_y</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkcairocontext.html#method-gdkcairocontext--rectangle" title="gtk.gdk.CairoContext.rectangle">rectangle</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>rectangle</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkcairocontext.html#method-gdkcairocontext--region" title="gtk.gdk.CairoContext.region">region</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>region</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkcairocontext.html#method-gdkcairocontext--set-source-pixmap" title="gtk.gdk.CairoContext.set_source_pixmap">set_source_pixmap</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixmap</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixmap_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixmap_y</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3215731"></a><h2>Ancestry</h2><pre class="synopsis">+-- cairo.Context
+-- <a class="link" href="class-pangocairocairocontext.html" title="pangocairo.CairoContext">pangocairo.CairoContext</a>
+-- <a class="link" href="class-gdkcairocontext.html" title="gtk.gdk.CairoContext">gtk.gdk.CairoContext</a>
</pre></div><div class="refsect1" title="Description"><a name="id3215708"></a><h2>Description</h2><p>Cairo is a graphics library that supports vector graphics and
image compositing that can be used with PyGTK. Since 2.8, GTK+ and Pango do
most of their drawing using Cairo. The Cairo drawing model and primitives
are similar to PostScript which uses an imaging model of painting on a two
dimensional surface. There is a Python module that wraps the Cairo API that
is used by PyGTK via subclassing of the cairo.Context class by the <a class="link" href="class-pangocairocairocontext.html" title="pangocairo.CairoContext"><code class="classname">pangocairo.CairoContext</code></a>
class. The cairo.Context class provides most of the drawing primitives used
for drawing on Cairo surfaces.</p><p>PyGTK (and GTK+ and GDK) does not wrap the Cairo API, instead
<a class="link" href="class-gdkcairocontext.html" title="gtk.gdk.CairoContext"><code class="classname">gtk.gdk.CairoContext</code></a>
objects can be used to draw on <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a>
objects. A <a class="link" href="class-gdkcairocontext.html" title="gtk.gdk.CairoContext"><code class="classname">gtk.gdk.CairoContext</code></a>
is created using the <a class="link" href="class-gdkdrawable.html#method-gdkdrawable--cairo-create" title="gtk.gdk.Drawable.cairo_create"><code class="methodname">gtk.gdk.Drawable.cairo_create</code>()</a>
method. See the <a class="link" href="class-pangocairocairocontext.html" title="pangocairo.CairoContext"><code class="classname">pangocairo.CairoContext</code></a>
and Python cairo module documentation for additional methods.</p></div><div class="refsect1" title="Methods"><a name="id3215654"></a><h2>Methods</h2><div class="refsect2" title="gtk.gdk.CairoContext.set_source_color"><a name="method-gdkcairocontext--set-source-color"></a><h3>gtk.gdk.CairoContext.set_source_color</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_source_color</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>color</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>color</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.8 and above.</p></div><p>The <code class="methodname">set_source_color</code>() method sets the
source color of the cairo context to the <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a>
specified by <em class="parameter"><code>color</code></em>. See the
cairo.Context.set_source_rgb() method for more information.</p></div><div class="refsect2" title="gtk.gdk.CairoContext.set_source_pixbuf"><a name="method-gdkcairocontext--set-source-pixbuf"></a><h3>gtk.gdk.CairoContext.set_source_pixbuf</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_source_pixbuf</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf_y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>pixbuf</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>pixbuf_x</code></strong> :</span></p></td><td>the X coordinate of the location to place the
upper left corner of <em class="parameter"><code>pixbuf</code></em>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>pixbuf_y</code></strong> :</span></p></td><td>the Y coordinate of the location to place the
upper left corner of <em class="parameter"><code>pixbuf</code></em>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.8 and above.</p></div><p>The <code class="methodname">set_source_pixbuf</code>() method sets the
<a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a>
specified by <em class="parameter"><code>pixbuf</code></em> as the source pattern for the
cairo context. The pattern has an extend mode of
<code class="literal">cairo.EXTEND_NONE</code> and is aligned so that the origin of
<em class="parameter"><code>pixbuf</code></em> is at the location specified by
<em class="parameter"><code>pixbuf_x</code></em>, <em class="parameter"><code>pixbuf_y</code></em>.</p></div><div class="refsect2" title="gtk.gdk.CairoContext.rectangle"><a name="method-gdkcairocontext--rectangle"></a><h3>gtk.gdk.CairoContext.rectangle</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">rectangle</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>rectangle</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>rectangle</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkrectangle.html" title="gtk.gdk.Rectangle"><code class="classname">gtk.gdk.Rectangle</code></a>
or a 4-tuple representing a rectangle</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">rectangle</code>() method adds the
rectangle specified by <em class="parameter"><code>rectangle</code></em> to the current
path.</p></div><div class="refsect2" title="gtk.gdk.CairoContext.region"><a name="method-gdkcairocontext--region"></a><h3>gtk.gdk.CairoContext.region</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">region</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>region</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>region</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkregion.html" title="gtk.gdk.Region"><code class="classname">gtk.gdk.Region</code></a></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">region</code>() method adds the
<a class="link" href="class-gdkregion.html" title="gtk.gdk.Region"><code class="classname">gtk.gdk.Region</code></a> specified by <em class="parameter"><code>region</code></em> to the current
path.</p></div><div class="refsect2" title="gtk.gdk.CairoContext.set_source_pixmap"><a name="method-gdkcairocontext--set-source-pixmap"></a><h3>gtk.gdk.CairoContext.set_source_pixmap</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_source_pixmap</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixmap</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixmap_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixmap_y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>pixmap</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>pixmap_x</code></strong> :</span></p></td><td>the X coordinate of the location to place the
upper left corner of <em class="parameter"><code>pixmap</code></em>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>pixmap_y</code></strong> :</span></p></td><td>the Y coordinate of the location to place the
upper left corner of <em class="parameter"><code>pixmap</code></em>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">set_source_pixmap</code>() method sets the
<a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>
specified by <em class="parameter"><code>pixmap</code></em> as the source pattern for the
cairo context. The pattern has an extend mode of
<code class="literal">cairo.EXTEND_NONE</code> and is aligned so that the origin of
<em class="parameter"><code>pixmap</code></em> is at the location specified by
<em class="parameter"><code>pixmap_x</code></em>, <em class="parameter"><code>pixmap_y</code></em>.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gdkatom.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gdk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gdkcolor.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.gdk.Atom </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.gdk.Color</td></tr></table></div></body></html>
|