/usr/share/gtk-doc/html/pygoocanvas/class-canvas-item-simple.html is in python-pygoocanvas 0.14.1-1ubuntu8.
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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>goocanvas.ItemSimple</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGooCanvas Reference Manual"><link rel="up" href="pygoocanvas-core-classes.html" title="PyGooCanvas Core Class Reference"><link rel="prev" href="class-canvas-item.html" title="goocanvas.Item"><link rel="next" href="class-canvas-item-model.html" title="goocanvas.ItemModel"></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">goocanvas.ItemSimple</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-canvas-item.html">Prev</a> </td><th width="60%" align="center">PyGooCanvas Core Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-canvas-item-model.html">Next</a></td></tr></table><hr></div><div class="refentry" title="goocanvas.ItemSimple"><a name="class-canvas-item-simple"></a><div class="titlepage"></div><div class="refnamediv"><h2>goocanvas.ItemSimple</h2><p>goocanvas.ItemSimple — The base class for the standard canvas items.</p></div><div class="refsect1" title="Synopsis"><a name="idp4326240"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">goocanvas.ItemSimple</span></span>(<span class="ooclass"><span class="classname">gobject.GObject</span></span>):
<code class="methodsynopsis"> def <span class="methodname">changed</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>recompute_bounds</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">check_in_path</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>cr</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pointer_events</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">check_style</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">get_line_width</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">get_path_bounds</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cr</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">paint_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cr</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">set_model</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>model</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">user_bounds_to_device</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cr</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bounds</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">user_bounds_to_parent</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cr</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bounds</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="idp4354112"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a
href="../pygobject/class-gobject.html"
>gobject.GObject</a>
+-- goocanvas.ItemSimple
</pre></div><div class="refsect1" title="goocanvas.ItemSimple Properties"><a name="properties-goocanvasitemsimple"></a><h2>goocanvas.ItemSimple Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="3.5in"></colgroup><tbody><tr valign="top"><td valign="top">"antialias"</td><td valign="top">Read/Write</td><td valign="top">The antialiasing mode to use. Default value: cairo.ANTIALIAS_DEFAULT</td></tr><tr valign="top"><td valign="top">"clip-fill-rule"</td><td valign="top">Read/Write</td><td valign="top">The fill rule used to determine which parts of the item are clipped.
Default value: cairo.FILL_RULE_WINDING</td></tr><tr valign="top"><td valign="top">"clip-path"</td><td valign="top">Write</td><td valign="top">The sequence of commands describing the clip path of the item,
specified as a string using the same syntax as in the
Scalable Vector Graphics (SVG) path element.
Default value: None</td></tr><tr valign="top"><td valign="top">"fill-color"</td><td valign="top">Write</td><td valign="top">The color to use to paint the interior of the item. Default value: None</td></tr><tr valign="top"><td valign="top">"fill-color-rgba"</td><td valign="top">Read/Write</td><td valign="top">The color to use to paint the interior of the item, specified as a 32-bit integer value. Default value: 0</td></tr><tr valign="top"><td valign="top">"fill-pattern"</td><td valign="top">Read/Write</td><td valign="top">The pattern to use to paint the interior of the item.</td></tr><tr valign="top"><td valign="top">"fill-pixbuf"</td><td valign="top">Write</td><td valign="top">The pixbuf to use to paint the interior of the item.</td></tr><tr valign="top"><td valign="top">"fill-rule"</td><td valign="top">Read/Write</td><td valign="top">The fill rule used to determine which parts of the item are filled. Default value: cairo.FILL_RULE_WINDING</td></tr><tr valign="top"><td valign="top">"font"</td><td valign="top">Read/Write</td><td valign="top">The base font to use for the text. Default value: None</td></tr><tr valign="top"><td valign="top">"font-desc"</td><td valign="top">Read/Write</td><td valign="top">The attributes specifying which font to use.</td></tr><tr valign="top"><td valign="top">"line-cap"</td><td valign="top">Read/Write</td><td valign="top">The line cap style to use. Default value: cairo.LINE_CAP_BUTT</td></tr><tr valign="top"><td valign="top">"line-dash"</td><td valign="top">Read/Write</td><td valign="top">The dash pattern to use.</td></tr><tr valign="top"><td valign="top">"line-join"</td><td valign="top">Read/Write</td><td valign="top">The line join style to use. Default value: cairo.LINE_JOIN_MITER</td></tr><tr valign="top"><td valign="top">"line-join-miter-limit"</td><td valign="top">Read/Write</td><td valign="top">The smallest angle to use with miter joins, in degrees.
Bevel joins will be used below this limit. Allowed values: >= 0 Default value: 10.</td></tr><tr valign="top"><td valign="top">"line-width"</td><td valign="top">Read/Write</td><td valign="top">The line width to use for the item's perimeter. Allowed values: >= 0 Default value: 0</td></tr><tr valign="top"><td valign="top">"operator"</td><td valign="top">Read/Write</td><td valign="top">The compositing operator to use. Default value: cairo.OPERATOR_OVER</td></tr><tr valign="top"><td valign="top">"stroke-color"</td><td valign="top">Write</td><td valign="top">The color to use for the item's perimeter. Default value: None</td></tr><tr valign="top"><td valign="top">"stroke-color-rgba"</td><td valign="top">Read/Write</td><td valign="top">The color to use for the item's perimeter, specified as a 32-bit integer value. Default value: 0</td></tr><tr valign="top"><td valign="top">"stroke-pattern"</td><td valign="top">Read/Write</td><td valign="top">The pattern to use to paint the perimeter of the item.</td></tr><tr valign="top"><td valign="top">"stroke-pixbuf"</td><td valign="top">Write</td><td valign="top">The pixbuf to use to draw the item's perimeter.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Known Implementation"><a name="idp4406256"></a><h2>Known Implementation</h2><p>
<code class="classname">goocanvas.ItemSimple</code>
is implementated by
<code class="classname">goocanvas.Rect</code>
<code class="classname">goocanvas.Ellipse</code>
<code class="classname">goocanvas.Path</code>
<code class="classname">goocanvas.Polyline</code>
<code class="classname">goocanvas.Text</code>
<code class="classname">goocanvas.Image</code>
<code class="classname">goocanvas.Group</code>
</p></div><div class="refsect1" title="Implemented Interfaces"><a name="idp4414416"></a><h2>Implemented Interfaces</h2><p>
<code class="classname">goocanvas.ItemSimple</code>
implements
<code class="classname">goocanvas.Item</code>
</p></div><div class="refsect1" title="Description"><a name="idp4417472"></a><h2>Description</h2><code class="classname">goocanvas.ItemSimple</code>
is used as a base class for all of the standard canvas items.
It can also be used as the base class for new custom canvas items.
It provides default implementations for many of the
<code class="classname">goocanvas.Item</code> methods.
For very simple items, all that is needed is to implement the create_path() method.
(GooCanvasEllipse, GooCanvasRect and GooCanvasPath do this.)
More complicated items need to implement the update(), paint() and get_item_at() methods.
(GooCanvasImage, GooCanvasPolyline, GooCanvasText and GooCanvasWidget do this.)
They may also need to override some of the other GooCanvasItem methods such as set_canvas(),
set_parent() or allocate_area() if special code is needed. (GooCanvasWidget does this to make
sure the GtkWidget is embedded in the GooCanvas widget correctly.)
</div><div class="refsect1" title="Methods"><a name="idp4420944"></a><h2>Methods</h2><div class="refsect2" title="goocanvas.ItemSimple.changed"><a name="method-goocanvasitemsimple--changed"></a><h3>goocanvas.ItemSimple.changed</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">changed</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>recompute_bounds</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>recompute_bounds</code></strong>:</span></p></td><td>If the item's bounds need to be recomputed.</td></tr></tbody></table><p>
This method is intended to be used by subclasses of
<code class="classname">goocanvas.ItemSimple</code>.
It is used as a callback for the "changed" signal of the item models.
It requests an update or redraw of the item as appropriate.
</p></div><div class="refsect2" title="goocanvas.ItemSimple.check_in_path"><a name="method-goocanvasitemsimple--check-in-path"></a><h3>goocanvas.ItemSimple.check_in_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">check_in_path</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>cr</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pointer_events</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 point.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong>:</span></p></td><td>the y coordinate of the point.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cr</code></strong>:</span></p></td><td>a cairo context.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>pointer_events</code></strong>:</span></p></td><td>specifies which parts of the path to check.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>True if the given point is in the current path.</td></tr></tbody></table><p>
Checks if the given point is in the current path.
</p></div><div class="refsect2" title="goocanvas.ItemSimple.check_style"><a name="method-goocanvasitemsimple--check-style"></a><h3>goocanvas.ItemSimple.check_style</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">check_style</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
This method is intended to be used by subclasses of
<code class="classname">goocanvas.ItemSimple</code>,
typically in their update() or get_requested_area() methods.
It ensures that the item's style is setup correctly. If the item has its own
<code class="classname">goocanvas.Style</code>
it makes sure the parent is set correctly.
If it doesn't have its own style it uses the parent item's style.
</p></div><div class="refsect2" title="goocanvas.ItemSimple.get_line_width"><a name="method-goocanvasitemsimple--get-line-width"></a><h3>goocanvas.ItemSimple.get_line_width</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_line_width</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 item's line width.</td></tr></tbody></table><p>
Gets the item's line width.
</p></div><div class="refsect2" title="goocanvas.ItemSimple.get_path_bounds"><a name="method-goocanvasitemsimple--get-path-bounds"></a><h3>goocanvas.ItemSimple.get_path_bounds</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_path_bounds</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cr</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bounds</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>cr</code></strong>:</span></p></td><td>A cairo context.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>The goocanvas.Bounds holding the bounding box
of the item in device space, converted to user space coordinates</td></tr></tbody></table><p>
Calculates the bounds of the current path in device space,
storing the results in a goocanvas.Bounds.
</p><p>
This method should be used only while implementing custom items
</p></div><div class="refsect2" title="goocanvas.ItemSimple.paint_path"><a name="method-goocanvasitemsimple--paint-path"></a><h3>goocanvas.ItemSimple.paint_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">paint_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cr</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>cr</code></strong>:</span></p></td><td>A cairo context.</td></tr></tbody></table><p>
Paints the current path, using the item's style settings.
</p></div><div class="refsect2" title="goocanvas.ItemSimple.set_model"><a name="method-goocanvasitemsimple--set-model"></a><h3>goocanvas.ItemSimple.set_model</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_model</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>model</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>model</code></strong>:</span></p></td><td>The model that item will view.</td></tr></tbody></table><p>
This function should be called by subclasses of
<code class="classname">goocanvas.ItemSimple</code>
in their set_model() method.
</p></div><div class="refsect2" title="goocanvas.ItemSimple.user_bounds_to_device"><a name="method-goocanvasitemsimple--user-bounds-to-device"></a><h3>goocanvas.ItemSimple.user_bounds_to_device</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">user_bounds_to_device</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cr</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bounds</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>cr</code></strong>:</span></p></td><td>a cairo context.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>bounds</code></strong>:</span></p></td><td>the bounds of the item, in the item's coordinate space.</td></tr></tbody></table><p>
Converts the item's bounds to a bounding box in device space.
</p></div><div class="refsect2" title="goocanvas.ItemSimple.user_bounds_to_parent"><a name="method-goocanvasitemsimple--user-bounds-to-parent"></a><h3>goocanvas.ItemSimple.user_bounds_to_parent</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">user_bounds_to_parent</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cr</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bounds</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>cr</code></strong>:</span></p></td><td>A cairo context.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>bounds</code></strong>:</span></p></td><td>the bounds of the item, in the item's coordinate space.</td></tr></tbody></table><p>
Converts the item's bounds to a bounding box in its parent's coordinate space.
If the item has no transformation matrix set then no conversion is needed.
This is typically needed when implementing the get_requested_area() method for subclasses of
<code class="classname">goocanvas.ItemSimple</code>.
</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-canvas-item.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pygoocanvas-core-classes.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-canvas-item-model.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">goocanvas.Item </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> goocanvas.ItemModel</td></tr></table></div></body></html>
|