File: class-pangoglyphstring.html

package info (click to toggle)
python-gtk2-doc 2.5.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,304 kB
  • ctags: 3,741
  • sloc: makefile: 38
file content (30 lines) | stat: -rw-r--r-- 12,510 bytes parent folder | download
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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>pango.GlyphString</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><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="previous" href="class-pangofontsetsimple.html" title="pango.FontsetSimple"><link rel="next" href="class-pangolanguage.html" title="pango.Language"></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.GlyphString</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-pangofontsetsimple.html">Prev</a></td><th width="60%" align="center">The pango Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-pangolanguage.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-pangoglyphstring"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>pango.GlyphString</h2><p>pango.GlyphString &#8212; an object holding strings of glyphs and glyph
information.</p></div><div class="refsect1" lang="en"><a name="id3124396"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">pango.GlyphString</span></span>(<span class="ooclass"><span class="classname">gobject.GBoxed</span></span>):
<code class="constructorsynopsis">    <span class="methodname"><a href="class-pangoglyphstring.html#constructor-pangoglyphstring" title="Constructor">pango.GlyphString</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoglyphstring.html#method-pangoglyphstring--set-size" title="pango.GlyphString.set_size">set_size</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>new_len</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoglyphstring.html#method-pangoglyphstring--copy" title="pango.GlyphString.copy">copy</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoglyphstring.html#method-pangoglyphstring--extents" title="pango.GlyphString.extents">extents</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>font</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoglyphstring.html#method-pangoglyphstring--extents-range" title="pango.GlyphString.extents_range">extents_range</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>font</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-pangoglyphstring.html#method-pangoglyphstring--get-logical-widths" title="pango.GlyphString.get_logical_widths">get_logical_widths</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>embedding_level</tt></b></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3124515"></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><col><col></colgroup><tbody><tr valign="top"><td valign="top">"num_glyphs"</td><td valign="top">Read</td><td valign="top">The number of glyphs in the glyph string.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3124567"></a><h2>Description</h2><p>A <a href="class-pangoglyphstring.html" title="pango.GlyphString"><tt class="classname">pango.GlyphString</tt></a> 
object contains strings of glyphs with geometry and visual attribute
information.</p></div><div class="refsect1" lang="en"><a name="constructor-pangoglyphstring"></a><h2>Constructor</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">pango.GlyphString</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-pangoglyphstring.html" title="pango.GlyphString"><tt class="classname">pango.GlyphString</tt></a></td></tr></tbody></table><p>Creates a new <a href="class-pangoglyphstring.html" title="pango.GlyphString"><tt class="classname">pango.GlyphString</tt></a> 
containing no glyphs.</p></div><div class="refsect1" lang="en"><a name="id3124630"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-pangoglyphstring--set-size"></a><h3>pango.GlyphString.set_size</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_size</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>new_len</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>new_len</tt></b>:</span></td><td>the new length of the
string.</td></tr></tbody></table><p>The <tt class="methodname">set_size</tt>() method resizes the glyph
string to the length specified by <i class="parameter"><tt>new_len</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-pangoglyphstring--copy"></a><h3>pango.GlyphString.copy</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">copy</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a <a href="class-pangoglyphstring.html" title="pango.GlyphString"><tt class="classname">pango.GlyphString</tt></a></td></tr></tbody></table><p>The <tt class="methodname">copy</tt>() method returns a <a href="class-pangoglyphstring.html" title="pango.GlyphString"><tt class="classname">pango.GlyphString</tt></a> 
that is a copy of the glyph string.</p></div><div class="refsect2" lang="en"><a name="method-pangoglyphstring--extents"></a><h3>pango.GlyphString.extents</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">extents</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>font</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>font</tt></b>:</span></td><td>a <a href="class-pangofont.html" title="pango.Font"><tt class="classname">pango.Font</tt></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a 2-tuple containing two 4-tuples representing
the ink and logical extents rectangles of the glyph
string.</td></tr></tbody></table><p>The <tt class="methodname">extents</tt>() method returns a 2-tuple
containing two 4-tuples representing the logical and ink extents rectangles
of the glyph string as rendered in the <a href="class-pangofont.html" title="pango.Font"><tt class="classname">pango.Font</tt></a> specified
by <i class="parameter"><tt>font</tt></i>. See the <a href="class-pangofont.html#method-pangofont--get-glyph-extents" title="pango.Font.get_glyph_extents"><tt class="methodname">pango.Font.get_glyph_extents</tt>()</a> 
for details about the interpretation of the rectangles.</p></div><div class="refsect2" lang="en"><a name="method-pangoglyphstring--extents-range"></a><h3>pango.GlyphString.extents_range</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">extents_range</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>font</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>start</tt></b>:</span></td><td>start index</td></tr><tr><td><span class="term"><b class="parameter"><tt>end</tt></b>:</span></td><td>end index</td></tr><tr><td><span class="term"><b class="parameter"><tt>font</tt></b>:</span></td><td>a <a href="class-pangofont.html" title="pango.Font"><tt class="classname">pango.Font</tt></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a 2-tuple containing two 4-tuples representing
the ink and logical extents rectangles of the glyph string
range.</td></tr></tbody></table><p>The <tt class="methodname">extents_range</tt>() method returns a
2-tuple containing two 4-tuples representing the logical and ink extents
rectangles of a range (specified by <i class="parameter"><tt>start</tt></i> and
<i class="parameter"><tt>end</tt></i>) of the glyph string as rendered in the <a href="class-pangofont.html" title="pango.Font"><tt class="classname">pango.Font</tt></a> specified
by <i class="parameter"><tt>font</tt></i>. The extents are relative to the start of the
glyph string range (the origin of their coordinate system is at the start of
the range, not at the start of the entire glyph string).</p></div><div class="refsect2" lang="en"><a name="method-pangoglyphstring--get-logical-widths"></a><h3>pango.GlyphString.get_logical_widths</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_logical_widths</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>embedding_level</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>text</tt></b>:</span></td><td>the text corresponding to the
glyphs</td></tr><tr><td><span class="term"><b class="parameter"><tt>embedding_level</tt></b>:</span></td><td>the embedding level of the
string</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a list containing the calculated character
widths.</td></tr></tbody></table><p>The <tt class="methodname">get_logical_widths</tt>() method returns
a list of the screen width of the characters in the specified
<i class="parameter"><tt>text</tt></i> that corresponds to the glyph string. When
multiple characters compose a single cluster, the width of the entire
cluster is divided equally among the characters.</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-pangofontsetsimple.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-pangolanguage.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">pango.FontsetSimple</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">pango.Language</td></tr></table></div></body></html>