⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pango-glyph-storage.html

📁 linux
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</tr><tr><td><span class="term"><a href="pango-Glyph-Storage.html#PangoGlyphVisAttr">PangoGlyphVisAttr</a>&#160;<em class="structfield"><code>attr</code></em>;</span></td><td>the visual attributes of the glyph.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3102564"></a><h3><a name="PangoGlyphGeometry"></a>PangoGlyphGeometry</h3><a class="indexterm" name="id3102576"></a><pre class="programlisting">typedef struct {  PangoGlyphUnit width;  PangoGlyphUnit x_offset;  PangoGlyphUnit y_offset;} PangoGlyphGeometry;</pre><p>The <a href="pango-Glyph-Storage.html#PangoGlyphGeometry"><span class="type">PangoGlyphGeometry</span></a> structure contains width and positioninginformation for a single glyph. </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><a href="pango-Glyph-Storage.html#PangoGlyphUnit">PangoGlyphUnit</a>&#160;<em class="structfield"><code>width</code></em>;</span></td><td>the logical width to use for the the character.</td></tr><tr><td><span class="term"><a href="pango-Glyph-Storage.html#PangoGlyphUnit">PangoGlyphUnit</a>&#160;<em class="structfield"><code>x_offset</code></em>;</span></td><td>horizontal offset from nominal character position.</td></tr><tr><td><span class="term"><a href="pango-Glyph-Storage.html#PangoGlyphUnit">PangoGlyphUnit</a>&#160;<em class="structfield"><code>y_offset</code></em>;</span></td><td>vertical offset from nominal character position.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3102671"></a><h3><a name="PangoGlyphUnit"></a>PangoGlyphUnit</h3><a class="indexterm" name="id3102684"></a><pre class="programlisting">typedef gint32 PangoGlyphUnit;</pre><p>The <a href="pango-Glyph-Storage.html#PangoGlyphUnit"><span class="type">PangoGlyphUnit</span></a> type is used to store dimensions withinPango. Dimensions are stored in 1/<a href="pango-Glyph-Storage.html#PANGO-SCALE:CAPS"><code class="literal">PANGO_SCALE</code></a> of a device unit.(A device unit might be a pixel for screen display, ora point on a printer.) <a href="pango-Glyph-Storage.html#PANGO-SCALE:CAPS"><code class="literal">PANGO_SCALE</code></a> is currently 1024, andmay change in the future (unlikely though), but you should notdepend on its exact value. The <a href="pango-Glyph-Storage.html#PANGO-PIXELS:CAPS"><code class="function">PANGO_PIXELS()</code></a> macro can be usedto convert from glyph units into device units with correct rounding.</p></div><hr><div class="refsect2" lang="en"><a name="id3102745"></a><h3><a name="PangoGlyphVisAttr"></a>PangoGlyphVisAttr</h3><a class="indexterm" name="id3102757"></a><pre class="programlisting">typedef struct {  guint is_cluster_start : 1;} PangoGlyphVisAttr;</pre><p>The PangoGlyphVisAttr is used to communicate information betweenthe shaping phase and the rendering phase.  More attributes may beadded in the future.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#guint">guint</a>&#160;<em class="structfield"><code>is_cluster_start</code></em>&#160;:&#160;1;</span></td><td>set for the first logical glyph in each cluster. (Clusters		   are stored in visual order, within the cluster, glyphs		   are always ordered in logical order, since visual		   order is meaningless; that is, in Arabic text, accent glyphs		   follow the glyphs for the base character.)</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3102806"></a><h3><a name="PangoGlyphString"></a>PangoGlyphString</h3><a class="indexterm" name="id3102818"></a><pre class="programlisting">typedef struct {  gint num_glyphs;  PangoGlyphInfo *glyphs;  /* This is a memory inefficient way of representing the information   * here - each value gives the byte index within the text   * corresponding to the glyph string of the start of the cluster to   * which the glyph belongs.   */  gint *log_clusters;} PangoGlyphString;</pre><p>The <a href="pango-Glyph-Storage.html#PangoGlyphString"><span class="type">PangoGlyphString</span></a> structure is used to store stringsof glyphs with geometry and visual attribute information.The storage for the glyph information is ownedby the structure which simplifies memory management.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#gint">gint</a>&#160;<em class="structfield"><code>num_glyphs</code></em>;</span></td><td>the number of glyphs in the string.</td></tr><tr><td><span class="term"><a href="pango-Glyph-Storage.html#PangoGlyphInfo">PangoGlyphInfo</a>&#160;*<em class="structfield"><code>glyphs</code></em>;</span></td><td>an array of <a href="pango-Glyph-Storage.html#PangoGlyphInfo"><span class="type">PangoGlyphInfo</span></a> structures of length <em class="structfield"><code>num_glyphs</code></em>.</td></tr><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#gint">gint</a>&#160;*<em class="structfield"><code>log_clusters</code></em>;</span></td><td>for each glyph, byte index of the starting character for thecluster. The indices are relative to the start of the textcorresponding to the PangoGlyphString.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3102931"></a><h3><a name="PangoGlyphItem"></a>PangoGlyphItem</h3><a class="indexterm" name="id3102944"></a><pre class="programlisting">typedef struct {  PangoItem        *item;  PangoGlyphString *glyphs;} PangoGlyphItem;</pre><p>A <a href="pango-Glyph-Storage.html#PangoGlyphItem"><span class="type">PangoGlyphItem</span></a> is a pair of a <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a> and the glyphsresulting from shaping the text corresponding to an item.As an example of the usage of <a href="pango-Glyph-Storage.html#PangoGlyphItem"><span class="type">PangoGlyphItem</span></a>, the resultsof shaping text with <a href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a> is a list of <a href="pango-Layout-Objects.html#PangoLayoutLine"><span class="type">PangoLayoutLine</span></a>,each of which contains a list of <a href="pango-Glyph-Storage.html#PangoGlyphItem"><span class="type">PangoGlyphItem</span></a>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><a href="pango-Text-Processing.html#PangoItem">PangoItem</a>&#160;*<em class="structfield"><code>item</code></em>;</span></td><td>a <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a> structure that provides information       about a segment of text.</td></tr><tr><td><span class="term"><a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a>&#160;*<em class="structfield"><code>glyphs</code></em>;</span></td><td>the glyphs obtained by shaping the text         corresponding to <em class="parameter"><code>item</code></em>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3103075"></a><h3><a name="PANGO-TYPE-GLYPH-STRING:CAPS"></a>PANGO_TYPE_GLYPH_STRING</h3><a class="indexterm" name="id3103089"></a><pre class="programlisting">#define PANGO_TYPE_GLYPH_STRING (pango_glyph_string_get_type ())</pre><p>The <ahref="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> type for <a href="pango-Glyph-Storage.html#PangoGlyphString"><span class="type">PangoGlyphString</span></a>.</p></div><hr><div class="refsect2" lang="en"><a name="id3103122"></a><h3><a name="pango-glyph-string-new"></a>pango_glyph_string_new ()</h3><a class="indexterm" name="id3103135"></a><pre class="programlisting"><a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a>*   pango_glyph_string_new              (void);</pre><p>Create a new <a href="pango-Glyph-Storage.html#PangoGlyphString"><span class="type">PangoGlyphString</span></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> the newly allocated <a href="pango-Glyph-Storage.html#PangoGlyphString"><span class="type">PangoGlyphString</span></a>, which              should be freed with <a href="pango-Glyph-Storage.html#pango-glyph-string-free"><code class="function">pango_glyph_string_free()</code></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3103203"></a><h3><a name="pango-glyph-string-copy"></a>pango_glyph_string_copy ()</h3><a class="indexterm" name="id3103216"></a><pre class="programlisting"><a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a>*   pango_glyph_string_copy             (<a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *string);</pre><p>Copy a glyph string and associated storage.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></td><td> a <a href="pango-Glyph-Storage.html#PangoGlyphString"><span class="type">PangoGlyphString</span></a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> the newly allocated <a href="pango-Glyph-Storage.html#PangoGlyphString"><span class="type">PangoGlyphString</span></a>, which              should be freed with <a href="pango-Glyph-Storage.html#pango-glyph-string-free"><code class="function">pango_glyph_string_free()</code></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3103305"></a><h3><a name="pango-glyph-string-set-size"></a>pango_glyph_string_set_size ()</h3><a class="indexterm" name="id3103318"></a><pre class="programlisting">void                pango_glyph_string_set_size         (<a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *string,                                                         <ahref="../glib/glib-Basic-Types.html#gint">gint</a> new_len);</pre><p>Resize a glyph string to the given length.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></td><td>    a <a href="pango-Glyph-Storage.html#PangoGlyphString"><span class="type">PangoGlyphString</span></a>.</td></tr><tr><td><span class="term"><em class="parameter"><code>new_len</code></em>&#160;:</span></td><td>   the new length of the string.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3103398"></a><h3><a name="pango-glyph-string-free"></a>pango_glyph_string_free ()</h3><a class="indexterm" name="id3103411"></a><pre class="programlisting">void                pango_glyph_string_free             (<a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *string);</pre><p>Free a glyph string and associated storage.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></td><td>    a <a href="pango-Glyph-Storage.html#PangoGlyphString"><span class="type">PangoGlyphString</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3103470"></a><h3><a name="pango-glyph-string-extents"></a>pango_glyph_string_extents ()</h3><a class="indexterm" name="id3103484"></a><pre class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -