/usr/share/gtk-doc/html/pygtk/class-gdkimage.html is in python-gtk2-doc 2.24.0-4.
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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.gdk.Image</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-gdkgc.html" title="gtk.gdk.GC"><link rel="next" href="class-gdkkeymap.html" title="gtk.gdk.Keymap"></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.Image</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gdkgc.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-gdkkeymap.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.gdk.Image"><a name="class-gdkimage"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.gdk.Image</h2><p>gtk.gdk.Image — an area for bit-mapped graphics stored on the X Windows
client.</p></div><div class="refsect1" title="Synopsis"><a name="id3461190"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.gdk.Image</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gdkimage.html#constructor-gdkimage" title="Constructor">gtk.gdk.Image</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>visual</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkimage.html#method-gdkimage--put-pixel" title="gtk.gdk.Image.put_pixel">put_pixel</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixel</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkimage.html#method-gdkimage--get-pixel" title="gtk.gdk.Image.get_pixel">get_pixel</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkimage.html#method-gdkimage--set-colormap" title="gtk.gdk.Image.set_colormap">set_colormap</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>colormap</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkimage.html#method-gdkimage--get-colormap" title="gtk.gdk.Image.get_colormap">get_colormap</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3461429"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
+-- <a class="link" href="class-gdkimage.html" title="gtk.gdk.Image">gtk.gdk.Image</a>
</pre></div><div class="refsect1" title="Description"><a name="id3461455"></a><h2>Description</h2><p>The <a class="link" href="class-gdkimage.html" title="gtk.gdk.Image"><code class="classname">gtk.gdk.Image</code></a> type
represents an area for drawing graphics. It has now been superseded to a
large extent by the much more flexible RGB methods (see <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a>).</p></div><div class="refsect1" title="Constructor"><a name="constructor-gdkimage"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.gdk.Image</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>visual</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</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>type</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkimage.html" title="gtk.gdk.Image"><code class="classname">gtk.gdk.Image</code></a>
type</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>visual</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkvisual.html" title="gtk.gdk.Visual"><code class="classname">gtk.gdk.Visual</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the width in pixels of the
image</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height in pixels of the
image</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-gdkimage.html" title="gtk.gdk.Image"><code class="classname">gtk.gdk.Image</code></a>
object</td></tr></tbody></table><p>Creates a new <a class="link" href="class-gdkimage.html" title="gtk.gdk.Image"><code class="classname">gtk.gdk.Image</code></a> object
of the specified <em class="parameter"><code>type</code></em>, <em class="parameter"><code>width</code></em>
and <em class="parameter"><code>height</code></em> and using the <a class="link" href="class-gdkvisual.html" title="gtk.gdk.Visual"><code class="classname">gtk.gdk.Visual</code></a>
specified by <em class="parameter"><code>visual</code></em>. The value of
<em class="parameter"><code>type</code></em> must be one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gtk.gdk.IMAGE_NORMAL</code></span></p></td><td>The original X image type, which is quite slow since the
image has to be transferred from the client to the server to display
it.</td></tr><tr><td><p><span class="term"><code class="literal">gtk.gdk.IMAGE_SHARED</code></span></p></td><td>A faster image type, which uses shared memory to transfer
the image data between client and server. However this will only be
available if client and server are on the same machine and the shared memory
extension is supported by the server.</td></tr><tr><td><p><span class="term"><code class="literal">gtk.gdk.IMAGE_FASTEST</code></span></p></td><td>Specifies that gtk.gdk.IMAGE_SHARED should be tried
first, and if that fails then gtk.gdk.IMAGE_NORMAL will be used.</td></tr></tbody></table><p>Usually using <code class="literal">gtk.gdk.IMAGE_FASTEST</code> is the best
choice.</p></div><div class="refsect1" title="Methods"><a name="id3217660"></a><h2>Methods</h2><div class="refsect2" title="gtk.gdk.Image.put_pixel"><a name="method-gdkimage--put-pixel"></a><h3>gtk.gdk.Image.put_pixel</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_pixel</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixel</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>x</code></strong> :</span></p></td><td>the x coordinate of the pixel to
set.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the y coordinate of the pixel to
set.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>pixel</code></strong> :</span></p></td><td>the pixel value to set.</td></tr></tbody></table><p>The <code class="methodname">put_pixel</code>() method sets the value
of the pixel in the image at the location specified by
<em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> to the value specified
by <em class="parameter"><code>pixel</code></em>.</p></div><div class="refsect2" title="gtk.gdk.Image.get_pixel"><a name="method-gdkimage--get-pixel"></a><h3>gtk.gdk.Image.get_pixel</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_pixel</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>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>x</code></strong> :</span></p></td><td>the x coordinate of the pixel to
get.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the y coordinate of the pixel to
get.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the pixel value at the image
location</td></tr></tbody></table><p>The <code class="methodname">get_pixel</code>() method returns the
value of the pixel at the image location specified by
<em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em>.</p></div><div class="refsect2" title="gtk.gdk.Image.set_colormap"><a name="method-gdkimage--set-colormap"></a><h3>gtk.gdk.Image.set_colormap</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_colormap</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>colormap</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>colormap</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><code class="classname">gtk.gdk.Colormap</code></a></td></tr></tbody></table><p>The <code class="methodname">set_colormap</code>() method sets the
colormap for the image to the specified <em class="parameter"><code>colormap</code></em>.
Normally there's no need to use this method since images are created with
the correct colormap if you get the image from a drawable. If you create the
image from scratch, use the colormap of the drawable you intend to render
the image to.</p></div><div class="refsect2" title="gtk.gdk.Image.get_colormap"><a name="method-gdkimage--get-colormap"></a><h3>gtk.gdk.Image.get_colormap</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_colormap</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the colormap for the image</td></tr></tbody></table><p>The <code class="methodname">get_colormap</code>() method returns the
colormap for a given image, if it exists. An image will have a colormap if
the drawable from which it was created has a colormap, or if a colormap was
set explicitly with the <a class="link" href="class-gdkimage.html#method-gdkimage--set-colormap" title="gtk.gdk.Image.set_colormap"><code class="methodname">set_colormap</code>()</a>
method.</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-gdkgc.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-gdkkeymap.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.gdk.GC </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.gdk.Keymap</td></tr></table></div></body></html>
|