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

📄 pango-glyph-storage.html

📁 GTK+-2.0源码之pango-1.15.6.tar.gz
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"><title>Glyph Storage</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1"><link rel="start" href="index.html" title="Pango Reference Manual"><link rel="up" href="pango.html" title="Basic Pango Interfaces"><link rel="prev" href="pango-Text-Processing.html" title="Rendering"><link rel="next" href="pango-Fonts.html" title="Fonts"><meta name="generator" content="GTK-Doc V1.6 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="chapter" href="pango.html" title="Basic Pango Interfaces"><link rel="chapter" href="rendering.html" title="Rendering with Pango"><link rel="chapter" href="lowlevel.html" title="Low Level Functionality"><link rel="chapter" href="tools.html" title="Pango Tools"><link rel="index" href="ix01.html" title="Index"><link rel="index" href="ix02.html" title="Index of deprecated symbols"><link rel="index" href="ix03.html" title="Index of new symbols in 1.2"><link rel="index" href="ix04.html" title="Index of new symbols in 1.4"><link rel="index" href="ix05.html" title="Index of new symbols in 1.6"><link rel="index" href="ix06.html" title="Index of new symbols in 1.8"><link rel="index" href="ix07.html" title="Index of new symbols in 1.10"><link rel="index" href="ix08.html" title="Index of new symbols in 1.12"><link rel="index" href="ix09.html" title="Index of new symbols in 1.14"><link rel="index" href="ix10.html" title="Index of new symbols in 1.16"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="pango-Text-Processing.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="pango.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">Pango Reference Manual</th><td><a accesskey="n" href="pango-Fonts.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr><tr><td colspan="5" class="shortcuts"><nobr><a href="#top_of_page" class="shortcut">Top</a>                  &#160;|&#160;                  <a href="#desc" class="shortcut">Description</a></nobr></td></tr></table><div class="refentry" lang="en"><a name="pango-Glyph-Storage"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><span class="refentrytitle"><a name="top_of_page"></a>Glyph Storage</span></h2><p>Glyph Storage &#8212; Structures for storing information about glyphs</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><pre class="synopsis">#define     <a href="pango-Glyph-Storage.html#PANGO-SCALE:CAPS">PANGO_SCALE</a>#define     <a href="pango-Glyph-Storage.html#PANGO-PIXELS:CAPS">PANGO_PIXELS</a>                    (d)#define     <a href="pango-Glyph-Storage.html#PANGO-PIXELS-FLOOR:CAPS">PANGO_PIXELS_FLOOR</a>              (d)#define     <a href="pango-Glyph-Storage.html#PANGO-PIXELS-CEIL:CAPS">PANGO_PIXELS_CEIL</a>               (d)double      <a href="pango-Glyph-Storage.html#pango-units-to-double">pango_units_to_double</a>           (int i);int         <a href="pango-Glyph-Storage.html#pango-units-from-double">pango_units_from_double</a>         (double d);            <a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a>;#define     <a href="pango-Glyph-Storage.html#PANGO-ASCENT:CAPS">PANGO_ASCENT</a>                    (rect)#define     <a href="pango-Glyph-Storage.html#PANGO-DESCENT:CAPS">PANGO_DESCENT</a>                   (rect)#define     <a href="pango-Glyph-Storage.html#PANGO-LBEARING:CAPS">PANGO_LBEARING</a>                  (rect)#define     <a href="pango-Glyph-Storage.html#PANGO-RBEARING:CAPS">PANGO_RBEARING</a>                  (rect)void        <a href="pango-Glyph-Storage.html#pango-extents-to-pixels">pango_extents_to_pixels</a>         (<a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *ink_rect,                                             <a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *logical_rect);            <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a>;#define     <a href="pango-Glyph-Storage.html#PANGO-TYPE-MATRIX:CAPS">PANGO_TYPE_MATRIX</a>#define     <a href="pango-Glyph-Storage.html#PANGO-MATRIX-INIT:CAPS">PANGO_MATRIX_INIT</a><a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a>* <a href="pango-Glyph-Storage.html#pango-matrix-copy">pango_matrix_copy</a>              (const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix);void        <a href="pango-Glyph-Storage.html#pango-matrix-free">pango_matrix_free</a>               (<a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix);void        <a href="pango-Glyph-Storage.html#pango-matrix-translate">pango_matrix_translate</a>          (<a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix,                                             double tx,                                             double ty);void        <a href="pango-Glyph-Storage.html#pango-matrix-scale">pango_matrix_scale</a>              (<a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix,                                             double scale_x,                                             double scale_y);void        <a href="pango-Glyph-Storage.html#pango-matrix-rotate">pango_matrix_rotate</a>             (<a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix,                                             double degrees);void        <a href="pango-Glyph-Storage.html#pango-matrix-concat">pango_matrix_concat</a>             (<a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix,                                             const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *new_matrix);void        <a href="pango-Glyph-Storage.html#pango-matrix-transform-point">pango_matrix_transform_point</a>    (const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix,                                             double *x,                                             double *y);void        <a href="pango-Glyph-Storage.html#pango-matrix-transform-distance">pango_matrix_transform_distance</a> (const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix,                                             double *dx,                                             double *dy);void        <a href="pango-Glyph-Storage.html#pango-matrix-transform-rectangle">pango_matrix_transform_rectangle</a>                                            (const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix,                                             <a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *rect);void        <a href="pango-Glyph-Storage.html#pango-matrix-transform-pixel-rectangle">pango_matrix_transform_pixel_rectangle</a>                                            (const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix,                                             <a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *rect);double      <a href="pango-Glyph-Storage.html#pango-matrix-get-font-scale-factor">pango_matrix_get_font_scale_factor</a>                                            (const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix);typedef     <a href="pango-Glyph-Storage.html#PangoGlyph">PangoGlyph</a>;#define     <a href="pango-Glyph-Storage.html#PANGO-GLYPH-EMPTY:CAPS">PANGO_GLYPH_EMPTY</a>#define     <a href="pango-Glyph-Storage.html#PANGO-GLYPH-UNKNOWN-FLAG:CAPS">PANGO_GLYPH_UNKNOWN_FLAG</a>#define     <a href="pango-Glyph-Storage.html#PANGO-GET-UNKNOWN-GLYPH:CAPS">PANGO_GET_UNKNOWN_GLYPH</a>         (wc)            <a href="pango-Glyph-Storage.html#PangoGlyphInfo">PangoGlyphInfo</a>;            <a href="pango-Glyph-Storage.html#PangoGlyphGeometry">PangoGlyphGeometry</a>;typedef     <a href="pango-Glyph-Storage.html#PangoGlyphUnit">PangoGlyphUnit</a>;            <a href="pango-Glyph-Storage.html#PangoGlyphVisAttr">PangoGlyphVisAttr</a>;            <a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a>;            <a href="pango-Glyph-Storage.html#PangoGlyphItem">PangoGlyphItem</a>;#define     <a href="pango-Glyph-Storage.html#PANGO-TYPE-GLYPH-STRING:CAPS">PANGO_TYPE_GLYPH_STRING</a><a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a>* <a href="pango-Glyph-Storage.html#pango-glyph-string-new">pango_glyph_string_new</a>    (void);<a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a>* <a href="pango-Glyph-Storage.html#pango-glyph-string-copy">pango_glyph_string_copy</a>   (<a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *string);void        <a href="pango-Glyph-Storage.html#pango-glyph-string-set-size">pango_glyph_string_set_size</a>     (<a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *string,                                             <ahref="../glib/glib-Basic-Types.html#gint">gint</a> new_len);void        <a href="pango-Glyph-Storage.html#pango-glyph-string-free">pango_glyph_string_free</a>         (<a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *string);void        <a href="pango-Glyph-Storage.html#pango-glyph-string-extents">pango_glyph_string_extents</a>      (<a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *glyphs,                                             <a href="pango-Fonts.html#PangoFont">PangoFont</a> *font,                                             <a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *ink_rect,                                             <a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *logical_rect);void        <a href="pango-Glyph-Storage.html#pango-glyph-string-extents-range">pango_glyph_string_extents_range</a>                                            (<a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *glyphs,                                             int start,                                             int end,                                             <a href="pango-Fonts.html#PangoFont">PangoFont</a> *font,                                             <a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *ink_rect,                                             <a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *logical_rect);int         <a href="pango-Glyph-Storage.html#pango-glyph-string-get-width">pango_glyph_string_get_width</a>    (<a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *glyphs);void        <a href="pango-Glyph-Storage.html#pango-glyph-string-index-to-x">pango_glyph_string_index_to_x</a>   (<a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *glyphs,                                             char *text,                                             int length,                                             <a href="pango-Text-Processing.html#PangoAnalysis">PangoAnalysis</a> *analysis,                                             int index_,                                             <ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a> trailing,                                             int *x_pos);void        <a href="pango-Glyph-Storage.html#pango-glyph-string-x-to-index">pango_glyph_string_x_to_index</a>   (<a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *glyphs,                                             char *text,                                             int length,                                             <a href="pango-Text-Processing.html#PangoAnalysis">PangoAnalysis</a> *analysis,                                             int x_pos,                                             int *index_,                                             int *trailing);void        <a href="pango-Glyph-Storage.html#pango-glyph-string-get-logical-widths">pango_glyph_string_get_logical_widths</a>                                            (<a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *glyphs,                                             const char *text,                                             int length,                                             int embedding_level,                                             int *logical_widths);<a href="pango-Glyph-Storage.html#PangoGlyphItem">PangoGlyphItem</a>* <a href="pango-Glyph-Storage.html#pango-glyph-item-split">pango_glyph_item_split</a>      (<a href="pango-Glyph-Storage.html#PangoGlyphItem">PangoGlyphItem</a> *orig,                                             const char *text,                                             int split_index);<ahref="../glib/glib-Singly-Linked-Lists.html#GSList">GSList</a>*     <a href="pango-Glyph-Storage.html#pango-glyph-item-apply-attrs">pango_glyph_item_apply_attrs</a>    (<a href="pango-Glyph-Storage.html#PangoGlyphItem">PangoGlyphItem</a> *glyph_item,                                             const char *text,                                             <a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *list);void        <a href="pango-Glyph-Storage.html#pango-glyph-item-letter-space">pango_glyph_item_letter_space</a>   (<a href="pango-Glyph-Storage.html#PangoGlyphItem">PangoGlyphItem</a> *glyph_item,                                             const char *text,                                             <a href="pango-Text-Processing.html#PangoLogAttr">PangoLogAttr</a> *log_attrs,                                             int letter_spacing);void        <a href="pango-Glyph-Storage.html#pango-glyph-item-free">pango_glyph_item_free</a>           (<a href="pango-Glyph-Storage.html#PangoGlyphItem">PangoGlyphItem</a> *glyph_item);</pre></div><div class="refsect1" lang="en"><a name="desc"></a><h2>Description</h2><p><a href="pango-Text-Processing.html#pango-shape"><code class="function">pango_shape()</code></a> produces a string of glyphs whichcan be measured or drawn to the screen. The followingstructures are used to store information aboutglyphs.</p></div><div class="refsect1" lang="en"><a name="details"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2770031"></a><h3><a name="PANGO-SCALE:CAPS"></a>PANGO_SCALE</h3><a class="indexterm" name="id2770042"></a><pre class="programlisting">#define PANGO_SCALE 1024</pre><p>The <a href="pango-Glyph-Storage.html#PANGO-SCALE:CAPS"><code class="literal">PANGO_SCALE</code></a> macro represents the scale between dimensions usedfor Pango distances and device units. (The definition of deviceunits is dependent on the output device; it will typically be pixelsfor a screen, and points for a printer.) <a href="pango-Glyph-Storage.html#PANGO-SCALE:CAPS"><code class="literal">PANGO_SCALE</code></a> is currently1024, but this may be changed in the future.</p><p>When setting font sizes, device units are always considered to bepoints (as in "12 point font"), rather than pixels. </p></div><hr><div class="refsect2" lang="en"><a name="id2770088"></a><h3><a name="PANGO-PIXELS:CAPS"></a>PANGO_PIXELS()</h3><a class="indexterm" name="id2770100"></a><pre class="programlisting">#define PANGO_PIXELS(d) (((int)(d) + 512) &gt;&gt; 10)</pre><p>Converts a dimension to device units by rounding.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>d</code></em>&#160;:</span></td><td>a dimension in Pango units.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2770136"></a><h3><a name="PANGO-PIXELS-FLOOR:CAPS"></a>PANGO_PIXELS_FLOOR()</h3><a class="indexterm" name="id2770149"></a><pre class="programlisting">#define PANGO_PIXELS_FLOOR(d) (((int)(d)) &gt;&gt; 10)</pre><p>Converts a dimension to device units by flooring.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>d</code></em>&#160;:</span></td><td>a dimension in Pango units.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2770185"></a><h3><a name="PANGO-PIXELS-CEIL:CAPS"></a>PANGO_PIXELS_CEIL()</h3><a class="indexterm" name="id2770198"></a><pre class="programlisting">#define PANGO_PIXELS_CEIL(d) (((int)(d) + 1023) &gt;&gt; 10)</pre><p>Converts a dimension to device units by ceiling.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>d</code></em>&#160;:</span></td><td>a dimension in Pango units.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2770234"></a><h3><a name="pango-units-to-double"></a>pango_units_to_double ()</h3><a class="indexterm" name="id2770249"></a><pre class="programlisting">double      pango_units_to_double           (int i);</pre><p>Converts a number in Pango units to floating-point: dividesit by <a href="pango-Glyph-Storage.html#PANGO-SCALE:CAPS"><code class="literal">PANGO_SCALE</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>i</code></em>&#160;:</span></td><td> value in Pango units</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> the double value.</td></tr></tbody></table></div><p>Since  1.16</p></div><hr><div class="refsect2" lang="en"><a name="id2770324"></a><h3><a name="pango-units-from-double"></a>pango_units_from_double ()</h3><a class="indexterm" name="id2770340"></a><pre class="programlisting">int         pango_units_from_double         (double d);</pre><p>Converts a floating-point number to Pango units: multipliesit by <a href="pango-Glyph-Storage.html#PANGO-SCALE:CAPS"><code class="literal">PANGO_SCALE</code></a> and rounds to nearest integer.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>d</code></em>&#160;:</span></td><td> double floating-point value</td>

⌨️ 快捷键说明

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