/usr/share/gtk-doc/html/pygtk/class-pangolayoutline.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 44 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>pango.LayoutLine</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="pango-class-reference.html" title="The pango Class Reference"><link rel="prev" href="class-pangolayoutiter.html" title="pango.LayoutIter"><link rel="next" href="class-pangorenderer.html" title="pango.Renderer"></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">pango.LayoutLine</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-pangolayoutiter.html">Prev</a> </td><th width="60%" align="center">The pango Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-pangorenderer.html">Next</a></td></tr></table><hr></div><div class="refentry" title="pango.LayoutLine"><a name="class-pangolayoutline"></a><div class="titlepage"></div><div class="refnamediv"><h2>pango.LayoutLine</h2><p>pango.LayoutLine — a line in a <a class="link" href="class-pangolayout.html" title="pango.Layout"><code class="classname">pango.Layout</code></a>
(new in PyGTK 2.8)</p></div><div class="refsect1" title="Synopsis"><a name="id2935670"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">pango.LayoutLine</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-gobjectgboxed">gobject.GBoxed</PYGTKDOCLINK></span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutline.html#method-pangolayoutline--get-extents" title="pango.LayoutLine.get_extents">get_extents</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutline.html#method-pangolayoutline--get-pixel-extents" title="pango.LayoutLine.get_pixel_extents">get_pixel_extents</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutline.html#method-pangolayoutline--index-to-x" title="pango.LayoutLine.index_to_x">index_to_x</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>index</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>trailing</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-pangolayoutline.html#method-pangolayoutline--x-to-index" title="pango.LayoutLine.x_to_index">x_to_index</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x_pos</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3539039"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobjectgboxed">gobject.GBoxed</PYGTKDOCLINK>
+-- <a class="link" href="class-pangolayoutline.html" title="pango.LayoutLine">pango.LayoutLine</a>
</pre></div><div class="refsect1" title="Attributes"><a name="id3347553"></a><h2>Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"is_paragraph_start"</td><td valign="top">Read</td><td valign="top"><code class="literal">True</code> if this is the first line of
the paragraph</td></tr><tr valign="top"><td valign="top">"length"</td><td valign="top">Read</td><td valign="top">the length of the line in bytes</td></tr><tr valign="top"><td valign="top">"resolved_dir"</td><td valign="top">Read</td><td valign="top">the resolved direction of line</td></tr><tr valign="top"><td valign="top">"runs"</td><td valign="top">Read</td><td valign="top">a list containing the runs of the line in visual
order.</td></tr><tr valign="top"><td valign="top">"start_index"</td><td valign="top">Read</td><td valign="top">the start of the line as byte index into the
layout.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id2864248"></a><h2>Description</h2><p>A <a class="link" href="class-pangolayoutline.html" title="pango.LayoutLine"><code class="classname">pango.LayoutLine</code></a>
object represents one of the lines resulting from laying out a paragraph via
<a class="link" href="class-pangolayout.html" title="pango.Layout"><code class="classname">pango.Layout</code></a>. <a class="link" href="class-pangolayoutline.html" title="pango.LayoutLine"><code class="classname">pango.LayoutLine</code></a>
objects are obtained by calling the <a class="link" href="class-pangolayout.html#method-pangolayout--get-line" title="pango.Layout.get_line"><code class="methodname">pango.Layout.get_line</code>()</a>
method or the <a class="link" href="class-pangolayoutiter.html#method-pangolayoutiter--get-line" title="pango.LayoutIter.get_line"><code class="methodname">pango.LayoutIter.get_line</code>()</a>
method. <a class="link" href="class-pangolayoutline.html" title="pango.LayoutLine"><code class="classname">pango.LayoutLine</code></a>
objects are only valid until the text, attributes, or settings of the parent
<a class="link" href="class-pangolayout.html" title="pango.Layout"><code class="classname">pango.Layout</code></a>
are modified.</p></div><div class="refsect1" title="Methods"><a name="id3307765"></a><h2>Methods</h2><div class="refsect2" title="pango.LayoutLine.get_extents"><a name="method-pangolayoutline--get-extents"></a><h3>pango.LayoutLine.get_extents</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_extents</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>a 2-tuple containing 4-tuples representing
the rectangles for the logical and ink extents in Pango
units.</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">get_extents</code>() method returns the
logical and ink extents rectangles of the layout line in a 2-tuple
containing two 4-tuples which represent the rectangles. See the
documentation for the <a class="link" href="class-pangofont.html#method-pangofont--get-glyph-extents" title="pango.Font.get_glyph_extents"><code class="methodname">pango.Font.get_glyph_extents</code>()</a>
method for details about the interpretation of the rectangles. The return
extents are in Pango units (1 device unit = pango.SCALE pango units).</p></div><div class="refsect2" title="pango.LayoutLine.get_pixel_extents"><a name="method-pangolayoutline--get-pixel-extents"></a><h3>pango.LayoutLine.get_pixel_extents</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_pixel_extents</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>a 2-tuple containing 4-tuples representing
the rectangles for the logical and ink extents in device
units.</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">get_pixel_extents</code>() method returns
the logical and ink extents rectangles of the layout line in a 2-tuple
containing two 4-tuples which represent the rectangles. See the
documentation for the <a class="link" href="class-pangofont.html#method-pangofont--get-glyph-extents" title="pango.Font.get_glyph_extents"><code class="methodname">pango.Font.get_glyph_extents</code>()</a>
method for details about the interpretation of the rectangles. The return
extents are in device units (1 device unit = pango.SCALE pango
units).</p></div><div class="refsect2" title="pango.LayoutLine.index_to_x"><a name="method-pangolayoutline--index-to-x"></a><h3>pango.LayoutLine.index_to_x</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">index_to_x</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>index</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>trailing</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>index</code></strong> :</span></p></td><td>the byte offset of a grapheme
within the layout</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>trailing</code></strong> :</span></p></td><td>an integer indicating the edge of the grapheme
to retrieve the position of. If 0, the trailing edge of the grapheme,
if > 0, the leading edge of the grapheme.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the X position in Pango units</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">index_to_x</code>() method returns the X
position (in Pango units) of the grapheme at the byte offset specified by
<em class="parameter"><code>index</code></em> and edge specified by
<em class="parameter"><code>trailing</code></em>.</p></div><div class="refsect2" title="pango.LayoutLine.x_to_index"><a name="method-pangolayoutline--x-to-index"></a><h3>pango.LayoutLine.x_to_index</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">x_to_index</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x_pos</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_pos</code></strong> :</span></p></td><td>the x offset (in Pango units) from the left
edge of the line.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 3-tuple containing a boolean indicating if the
<em class="parameter"><code>x_pos</code></em> is inside the line, the byte offset of the
grapheme and the location in the grapheme.</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">x_to_index</code>() method returns a
3-tuple containing a boolean that is <code class="literal">True</code> if x_pos is
inside the line, the location inside the grapheme - either zero, or the
number of characters in the grapheme. 0 represents the trailing edge of the
grapheme.</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-pangolayoutiter.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pango-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-pangorenderer.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">pango.LayoutIter </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> pango.Renderer</td></tr></table></div></body></html>
|