File: class-gnomeprintglyphlist.html

package info (click to toggle)
gnome-python-desktop 2.32.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,548 kB
  • sloc: sh: 10,214; xml: 8,851; ansic: 3,428; python: 1,457; makefile: 664
file content (48 lines) | stat: -rw-r--r-- 22,400 bytes parent folder | download | duplicates (2)
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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>gnomeprint.Glyphlist</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Python Gnomeprint Reference Manual"><link rel="up" href="gnomeprint-class-reference.html" title="The Gnomeprint Class Reference"><link rel="prev" href="class-gnomeprintfontface.html" title="gnomeprint.FontFace"></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">gnomeprint.Glyphlist</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gnomeprintfontface.html">Prev</a> </td><th width="60%" align="center">The Gnomeprint Class Reference</th><td width="20%" align="right"> </td></tr></table><hr></div><div class="refentry" title="gnomeprint.Glyphlist"><a name="class-gnomeprintglyphlist"></a><div class="titlepage"></div><div class="refnamediv"><h2>gnomeprint.Glyphlist</h2><p>gnomeprint.Glyphlist — Glyphlist object for GnomePrint</p></div><div class="refsect1" title="Synopsis"><a name="id2584649"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gnomeprint.Glyphlist</span></span>(<span class="ooclass"><span class="classname">gobject.GBoxed</span></span>):
<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gnomeprintglyphlist.html#constructor-gnomeprintglyphlist" title="Constructor">gnomeprint.Glyphlist</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code></code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gnomeprintglyphlist.html#method-gnomeprintglyphlist--advance" title="gnomeprint.Glyphlist.advance">advance</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>advance</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gnomeprintglyphlist.html#method-gnomeprintglyphlist--bbox" title="gnomeprint.Glyphlist.bbox">bbox</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>transform</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bbox</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gnomeprintglyphlist.html#method-gnomeprintglyphlist--color" title="gnomeprint.Glyphlist.color">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-gnomeprintglyphlist.html#method-gnomeprintglyphlist--duplicate" title="gnomeprint.Glyphlist.duplicate">duplicate</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gnomeprintglyphlist.html#method-gnomeprintglyphlist--font" title="gnomeprint.Glyphlist.font">font</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>font</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gnomeprintglyphlist.html#method-gnomeprintglyphlist--glyph" title="gnomeprint.Glyphlist.glyph">glyph</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>glyph</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gnomeprintglyphlist.html#method-gnomeprintglyphlist--glyphs" title="gnomeprint.Glyphlist.glyphs">glyphs</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>glyphs</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>num_glyps</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gnomeprintglyphlist.html#method-gnomeprintglyphlist--kerning" title="gnomeprint.Glyphlist.kerning">kerning</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>kerning</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gnomeprintglyphlist.html#method-gnomeprintglyphlist--letterspace" title="gnomeprint.Glyphlist.letterspace">letterspace</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>letterspace</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gnomeprintglyphlist.html#method-gnomeprintglyphlist--moveto" title="gnomeprint.Glyphlist.moveto">moveto</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-gnomeprintglyphlist.html#method-gnomeprintglyphlist--rmoveto" title="gnomeprint.Glyphlist.rmoveto">rmoveto</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-gnomeprintglyphlist.html#method-gnomeprintglyphlist--text-dumb" title="gnomeprint.Glyphlist.text_dumb">text_dumb</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>text</code></strong></span></span>)</code><br></pre></td></tr></table><pre class="programlisting">
<span class="bold"><strong>Functions</strong></span>
    
<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gnomeprintglyphlist.html#function-gnomeprint--glyphlist-from-text-dumb" title="gnomeprint.glyphlist_from_text_dumb">gnomeprint.glyphlist_from_text_dumb</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>font</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>color</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>kerning</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>letterspace</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>text</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id2611795"></a><h2>Ancestry</h2><pre class="synopsis">+-- gobject.GBoxed
  +-- <a class="link" href="class-gnomeprintglyphlist.html" title="gnomeprint.Glyphlist">gnomeprint.Glyphlist</a>
</pre></div><div class="refsect1" title="Description"><a name="description-gnomeprintglyphlist"></a><h2>Description</h2><p>

</p></div><div class="refsect1" title="Constructor"><a name="constructor-gnomeprintglyphlist"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gnomeprint.Glyphlist</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code></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"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-gnomeprintglyphlist.html" title="gnomeprint.Glyphlist"><code class="classname">gnomeprint.Glyphlist</code></a>.
        </td></tr></tbody></table><p>
    Creates a new <a class="link" href="class-gnomeprintglyphlist.html" title="gnomeprint.Glyphlist"><code class="classname">gnomeprint.Glyphlist</code></a> object.
  </p></div><div class="refsect1" title="Methods"><a name="id2611933"></a><h2>Methods</h2><div class="refsect2" title="gnomeprint.Glyphlist.advance"><a name="method-gnomeprintglyphlist--advance"></a><h3>gnomeprint.Glyphlist.advance</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">advance</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"><strong class="parameter"><code>advance</code></strong> :</span></p></td><td> if <code class="literal">TRUE</code> move the pen position, <code class="literal">FALSE</code> otherwise.</td></tr></tbody></table><p>
            The <code class="methodname">advance</code>() method decide whether or not to move the pen position by the font standard advance vector. 
            Advancing happens immediately after glyph is sent through pipeline.
        </p></div><div class="refsect2" title="gnomeprint.Glyphlist.bbox"><a name="method-gnomeprintglyphlist--bbox"></a><h3>gnomeprint.Glyphlist.bbox</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">bbox</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>transform</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bbox</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>transform</code></strong> :</span></p></td><td> </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td> should be 0 for now.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>bbox</code></strong> :</span></p></td><td> </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> bbox or <code class="literal">None</code> on error.</td></tr></tbody></table><p>
            The <code class="methodname">bbox</code>() method gets ink dimensions of transformed glyphlist Flags are to specify user preferences, 
            should be 0 for now.
        </p></div><div class="refsect2" title="gnomeprint.Glyphlist.color"><a name="method-gnomeprintglyphlist--color"></a><h3>gnomeprint.Glyphlist.color</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">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> the color in the form RRGGBBAA.</td></tr></tbody></table><p>
            The <code class="methodname">color</code>() method specify the color as RRGGBBAA to be used for the glyphs that follow.
        </p></div><div class="refsect2" title="gnomeprint.Glyphlist.duplicate"><a name="method-gnomeprintglyphlist--duplicate"></a><h3>gnomeprint.Glyphlist.duplicate</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">duplicate</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> </td></tr></tbody></table><p>
            The <code class="methodname">duplicate</code>() method 
        </p></div><div class="refsect2" title="gnomeprint.Glyphlist.font"><a name="method-gnomeprintglyphlist--font"></a><h3>gnomeprint.Glyphlist.font</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">font</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>font</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>font</code></strong> :</span></p></td><td> </td></tr></tbody></table><p>
            The <code class="methodname">font</code>() method specify the font to be used for the glyphs that follow.
        </p></div><div class="refsect2" title="gnomeprint.Glyphlist.glyph"><a name="method-gnomeprintglyphlist--glyph"></a><h3>gnomeprint.Glyphlist.glyph</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glyph</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>glyph</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>glyph</code></strong> :</span></p></td><td> </td></tr></tbody></table><p>
            The <code class="methodname">glyph</code>() method appends a single glyph to the glyphlist. 
            It will be connected to the previous glyphs by the previously defined rules.
        </p></div><div class="refsect2" title="gnomeprint.Glyphlist.glyphs"><a name="method-gnomeprintglyphlist--glyphs"></a><h3>gnomeprint.Glyphlist.glyphs</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glyphs</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>glyphs</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>num_glyps</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>glyps</code></strong> :</span></p></td><td> </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>val</code></strong> :</span></p></td><td> </td></tr></tbody></table><p>
            The <code class="methodname">gluphs</code>() method append a string of glyphs.
        </p></div><div class="refsect2" title="gnomeprint.Glyphlist.kerning"><a name="method-gnomeprintglyphlist--kerning"></a><h3>gnomeprint.Glyphlist.kerning</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">kerning</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>kerning</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>kerning</code></strong> :</span></p></td><td> </td></tr></tbody></table><p>
            The <code class="methodname">kerning</code>() method sets the amount of kerning to add between glyphs connected by an advance rule. 
            It is specified as fraction of a full kerning value If a glyph is manually positioned, 
            the kerning value is ignored Kerning will be added immediately before placing a new glyph.
        </p></div><div class="refsect2" title="gnomeprint.Glyphlist.letterspace"><a name="method-gnomeprintglyphlist--letterspace"></a><h3>gnomeprint.Glyphlist.letterspace</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">letterspace</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>letterspace</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>letterspace</code></strong> :</span></p></td><td> </td></tr></tbody></table><p>
            The <code class="methodname">letterspace</code>() method sets the amount of white space to add between glyphs connected by an advance rule. 
            It is specified in font units (i.e. 12 for 12pt font is the width of an em square). 
            If glyph is manually positioned, letterspace value will be ignored. 
            Letterspace will be added immediately before placing a new glyph
        </p></div><div class="refsect2" title="gnomeprint.Glyphlist.moveto"><a name="method-gnomeprintglyphlist--moveto"></a><h3>gnomeprint.Glyphlist.moveto</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">moveto</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> </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td> </td></tr></tbody></table><p>
            The <code class="methodname">moveto</code>() method position manually the glyph following.
        </p></div><div class="refsect2" title="gnomeprint.Glyphlist.rmoveto"><a name="method-gnomeprintglyphlist--rmoveto"></a><h3>gnomeprint.Glyphlist.rmoveto</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">rmoveto</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> </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td> </td></tr></tbody></table><p>
            The <code class="methodname">rmoveto</code>() method position the glyph following relative to current pen position.
        </p></div><div class="refsect2" title="gnomeprint.Glyphlist.text_dumb"><a name="method-gnomeprintglyphlist--text-dumb"></a><h3>gnomeprint.Glyphlist.text_dumb</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">text_dumb</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>text</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>text</code></strong> :</span></p></td><td> </td></tr></tbody></table><p>
            The <code class="methodname">text_dumb</code>() method 
        </p></div></div><div class="refsect1" title="Functions"><a name="id2617030"></a><h2>Functions</h2><div class="refsect2" title="gnomeprint.glyphlist_from_text_dumb"><a name="function-gnomeprint--glyphlist-from-text-dumb"></a><h3>gnomeprint.glyphlist_from_text_dumb</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gnomeprint.glyphlist_from_text_dumb</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>font</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>color</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>kerning</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>letterspace</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>text</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>font</code></strong> :</span></p></td><td> </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>color</code></strong> :</span></p></td><td> </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>kerning</code></strong> :</span></p></td><td> </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>letterspace</code></strong> :</span></p></td><td> </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>text</code></strong> :</span></p></td><td> </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> </td></tr></tbody></table><p>
              The <code class="methodname">glyphlist_from_text_dumb</code>() function appends utf8 text, converting it to glyphs and 
              connecting it as specified by rules. You cannot expect anything about language-specific typesetting rules, 
              so if the given script does not use trivial placement, you should better avoid this.
          </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-gnomeprintfontface.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gnomeprint-class-reference.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">gnomeprint.FontFace </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>