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

📄 pango-glyph-storage.html

📁 GTK+-2.0源码之pango-1.15.6.tar.gz
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> the value in Pango units.</td></tr></tbody></table></div><p>Since  1.16</p></div><hr><div class="refsect2" lang="en"><a name="id2770416"></a><h3><a name="PangoRectangle"></a>PangoRectangle</h3><a class="indexterm" name="id2770429"></a><pre class="programlisting">typedef struct {  int x;  int y;  int width;  int height;} PangoRectangle;</pre><p>The <a href="pango-Glyph-Storage.html#PangoRectangle"><span class="type">PangoRectangle</span></a> structure represents a rectangle. It is frequentlyused to represent the logical or ink extents of a single glyph or sectionof text. (See, for instance, <a href="pango-Fonts.html#pango-font-get-glyph-extents"><code class="function">pango_font_get_glyph_extents()</code></a>)</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term">int&#160;<em class="structfield"><code>x</code></em>;</span></td><td>X coordinate of the left side of the rectangle.</td></tr><tr><td><span class="term">int&#160;<em class="structfield"><code>y</code></em>;</span></td><td>Y coordinate of the the top side of the rectangle.</td></tr><tr><td><span class="term">int&#160;<em class="structfield"><code>width</code></em>;</span></td><td>width of the rectangle.</td></tr><tr><td><span class="term">int&#160;<em class="structfield"><code>height</code></em>;</span></td><td>height of the rectangle.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2770553"></a><h3><a name="PANGO-ASCENT:CAPS"></a>PANGO_ASCENT()</h3><a class="indexterm" name="id2770566"></a><pre class="programlisting">#define PANGO_ASCENT(rect) (-(rect).y)</pre><p>Extracts the <em class="firstterm">ascent</em> from a <a href="pango-Glyph-Storage.html#PangoRectangle"><span class="type">PangoRectangle</span></a>representing glyph extents. The ascent is the distance from thebaseline to the highest point of the character. This is positive if theglyph ascends above the baseline.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>rect</code></em>&#160;:</span></td><td>a <a href="pango-Glyph-Storage.html#PangoRectangle"><span class="type">PangoRectangle</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2770622"></a><h3><a name="PANGO-DESCENT:CAPS"></a>PANGO_DESCENT()</h3><a class="indexterm" name="id2770635"></a><pre class="programlisting">#define PANGO_DESCENT(rect) ((rect).y + (rect).height)</pre><p>Extracts the <em class="firstterm">descent</em> from a <a href="pango-Glyph-Storage.html#PangoRectangle"><span class="type">PangoRectangle</span></a>representing glyph extents. The descent is the distance from thebaseline to the lowest point of the character. This is positive if theglyph descends below the baseline.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>rect</code></em>&#160;:</span></td><td>a <a href="pango-Glyph-Storage.html#PangoRectangle"><span class="type">PangoRectangle</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2770692"></a><h3><a name="PANGO-LBEARING:CAPS"></a>PANGO_LBEARING()</h3><a class="indexterm" name="id2770704"></a><pre class="programlisting">#define PANGO_LBEARING(rect) ((rect).x)</pre><p>Extracts the <em class="firstterm">left bearing</em> from a <a href="pango-Glyph-Storage.html#PangoRectangle"><span class="type">PangoRectangle</span></a>representing glyph extents. The left bearing is the distance from thehorizontal origin to the farthest left point of the character.This is positive for characters drawn completely to the right of theglyph origin.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>rect</code></em>&#160;:</span></td><td>a <a href="pango-Glyph-Storage.html#PangoRectangle"><span class="type">PangoRectangle</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2770762"></a><h3><a name="PANGO-RBEARING:CAPS"></a>PANGO_RBEARING()</h3><a class="indexterm" name="id2770775"></a><pre class="programlisting">#define PANGO_RBEARING(rect) ((rect).x + (rect).width)</pre><p>Extracts the <em class="firstterm">right bearing</em> from a <a href="pango-Glyph-Storage.html#PangoRectangle"><span class="type">PangoRectangle</span></a>representing glyph extents. The right bearing is the distance from thehorizontal origin to the farthest right point of the character.This is positive except for characters drawn completely to the left of thehorizontal origin.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>rect</code></em>&#160;:</span></td><td>a <a href="pango-Glyph-Storage.html#PangoRectangle"><span class="type">PangoRectangle</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2770833"></a><h3><a name="pango-extents-to-pixels"></a>pango_extents_to_pixels ()</h3><a class="indexterm" name="id2770848"></a><pre class="programlisting">void        pango_extents_to_pixels         (<a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *ink_rect,                                             <a href="pango-Glyph-Storage.html#PangoRectangle">PangoRectangle</a> *logical_rect);</pre><p>Converts extents from Pango units to device units, dividing by the<a href="pango-Glyph-Storage.html#PANGO-SCALE:CAPS"><code class="literal">PANGO_SCALE</code></a> factor and performing rounding.</p><p>The ink rectangle is converted by flooring the x/y coordinates and extendingwidth/height, such that the final rectangle completely includes the originalrectangle.</p><p>The logical rectangle is converted by rounding the coordinatesof the rectangle to the nearest device unit.</p><p>Note that in certain situations you may want pass a logical extentsrectangle to this function as <em class="parameter"><code>ink_rect</code></em>.  The rule is: if you want theresulting device-space rectangle to completely contain the originalrectangle, pass it in as <em class="parameter"><code>ink_rect</code></em>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>ink_rect</code></em>&#160;:</span></td><td> ink rectangle to convert, or <ahref="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td></tr><tr><td><span class="term"><em class="parameter"><code>logical_rect</code></em>&#160;:</span></td><td> logical rectangle to convert, or <ahref="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td></tr></tbody></table></div><p>Since  1.16</p></div><hr><div class="refsect2" lang="en"><a name="id2770988"></a><h3><a name="PangoMatrix"></a>PangoMatrix</h3><a class="indexterm" name="id2771002"></a><pre class="programlisting">typedef struct {  double xx;  double xy;  double yx;  double yy;  double x0;  double y0;} PangoMatrix;</pre><p>A structure specifying a transformation between user-spacecoordinates and device coordinates. The transformationis given by</p><p></p><pre class="programlisting">x_device = x_user * matrix-&gt;xx + y_user * matrix-&gt;xy + matrix-&gt;x0;y_device = x_user * matrix-&gt;yx + y_user * matrix-&gt;yy + matrix-&gt;y0;</pre><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term">double&#160;<em class="structfield"><code>xx</code></em>;</span></td><td> 1st component of the transformation matrix</td></tr><tr><td><span class="term">double&#160;<em class="structfield"><code>xy</code></em>;</span></td><td> 2nd component of the transformation matrix</td></tr><tr><td><span class="term">double&#160;<em class="structfield"><code>yx</code></em>;</span></td><td> 3rd component of the transformation matrix</td></tr><tr><td><span class="term">double&#160;<em class="structfield"><code>yy</code></em>;</span></td><td> 4th component of the transformation matrix</td></tr><tr><td><span class="term">double&#160;<em class="structfield"><code>x0</code></em>;</span></td><td> x translation</td></tr><tr><td><span class="term">double&#160;<em class="structfield"><code>y0</code></em>;</span></td><td> y translation</td></tr></tbody></table></div><p>Since  1.6</p></div><hr><div class="refsect2" lang="en"><a name="id2771168"></a><h3><a name="PANGO-TYPE-MATRIX:CAPS"></a>PANGO_TYPE_MATRIX</h3><a class="indexterm" name="id2771181"></a><pre class="programlisting">#define PANGO_TYPE_MATRIX (pango_matrix_get_type ())</pre><p>The GObject type for <a href="pango-Glyph-Storage.html#PangoMatrix"><span class="type">PangoMatrix</span></a></p><p></p></div><hr><div class="refsect2" lang="en"><a name="id2771207"></a><h3><a name="PANGO-MATRIX-INIT:CAPS"></a>PANGO_MATRIX_INIT</h3><a class="indexterm" name="id2771222"></a><pre class="programlisting">#define PANGO_MATRIX_INIT { 1., 0., 0., 1., 0., 0. }</pre><p>Constant that can be used to initialize a PangoMatrix tothe identity transform.</p><p></p><div class="informalexample"><pre class="programlisting">PangoMatrix matrix = PANGO_MATRIX_INIT;pango_matrix_rotate (&amp;matrix, 45.);

⌨️ 快捷键说明

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