📄 glyphs.xml
字号:
<varlistentry><term><parameter>d</parameter> :</term><listitem><simpara> double floating-point value</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the value in Pango units.</simpara></listitem></varlistentry></variablelist><para>Since 1.16</para></refsect2><refsect2><title><anchor id="PangoRectangle" role="struct"/>PangoRectangle</title><indexterm><primary>PangoRectangle</primary></indexterm><programlisting>typedef struct { int x; int y; int width; int height;} PangoRectangle;</programlisting><para>The <link linkend="PangoRectangle"><type>PangoRectangle</type></link> structure represents a rectangle. It is frequentlyused to represent the logical or ink extents of a single glyph or sectionof text. (See, for instance, <link linkend="pango-font-get-glyph-extents"><function>pango_font_get_glyph_extents()</function></link>)</para><variablelist role="struct"><varlistentry><term><link linkend="int">int</link> <structfield>x</structfield>;</term><listitem><simpara>X coordinate of the left side of the rectangle.</simpara></listitem></varlistentry><varlistentry><term><link linkend="int">int</link> <structfield>y</structfield>;</term><listitem><simpara>Y coordinate of the the top side of the rectangle.</simpara></listitem></varlistentry><varlistentry><term><link linkend="int">int</link> <structfield>width</structfield>;</term><listitem><simpara>width of the rectangle.</simpara></listitem></varlistentry><varlistentry><term><link linkend="int">int</link> <structfield>height</structfield>;</term><listitem><simpara>height of the rectangle.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="PANGO-ASCENT:CAPS" role="macro"/>PANGO_ASCENT()</title><indexterm><primary>PANGO_ASCENT</primary></indexterm><programlisting>#define PANGO_ASCENT(rect) (-(rect).y)</programlisting><para>Extracts the <firstterm>ascent</firstterm> from a <link linkend="PangoRectangle"><type>PangoRectangle</type></link>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.</para><variablelist role="params"><varlistentry><term><parameter>rect</parameter> :</term><listitem><simpara>a <link linkend="PangoRectangle"><type>PangoRectangle</type></link></simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="PANGO-DESCENT:CAPS" role="macro"/>PANGO_DESCENT()</title><indexterm><primary>PANGO_DESCENT</primary></indexterm><programlisting>#define PANGO_DESCENT(rect) ((rect).y + (rect).height)</programlisting><para>Extracts the <firstterm>descent</firstterm> from a <link linkend="PangoRectangle"><type>PangoRectangle</type></link>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.</para><variablelist role="params"><varlistentry><term><parameter>rect</parameter> :</term><listitem><simpara>a <link linkend="PangoRectangle"><type>PangoRectangle</type></link></simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="PANGO-LBEARING:CAPS" role="macro"/>PANGO_LBEARING()</title><indexterm><primary>PANGO_LBEARING</primary></indexterm><programlisting>#define PANGO_LBEARING(rect) ((rect).x)</programlisting><para>Extracts the <firstterm>left bearing</firstterm> from a <link linkend="PangoRectangle"><type>PangoRectangle</type></link>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.</para><variablelist role="params"><varlistentry><term><parameter>rect</parameter> :</term><listitem><simpara>a <link linkend="PangoRectangle"><type>PangoRectangle</type></link></simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="PANGO-RBEARING:CAPS" role="macro"/>PANGO_RBEARING()</title><indexterm><primary>PANGO_RBEARING</primary></indexterm><programlisting>#define PANGO_RBEARING(rect) ((rect).x + (rect).width)</programlisting><para>Extracts the <firstterm>right bearing</firstterm> from a <link linkend="PangoRectangle"><type>PangoRectangle</type></link>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.</para><variablelist role="params"><varlistentry><term><parameter>rect</parameter> :</term><listitem><simpara>a <link linkend="PangoRectangle"><type>PangoRectangle</type></link></simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-extents-to-pixels" role="function" condition="since:1.16"/>pango_extents_to_pixels ()</title><indexterm role="1.16"><primary>pango_extents_to_pixels</primary></indexterm><programlisting><link linkend="void">void</link> pango_extents_to_pixels (<link linkend="PangoRectangle">PangoRectangle</link> *ink_rect, <link linkend="PangoRectangle">PangoRectangle</link> *logical_rect);</programlisting><para>Converts extents from Pango units to device units, dividing by the<link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link> factor and performing rounding.</para><para>The ink rectangle is converted by flooring the x/y coordinates and extendingwidth/height, such that the final rectangle completely includes the originalrectangle.</para><para>The logical rectangle is converted by rounding the coordinatesof the rectangle to the nearest device unit.</para><para>Note that in certain situations you may want pass a logical extentsrectangle to this function as <parameter>ink_rect</parameter>. The rule is: if you want theresulting device-space rectangle to completely contain the originalrectangle, pass it in as <parameter>ink_rect</parameter>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>ink_rect</parameter> :</term><listitem><simpara> ink rectangle to convert, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</simpara></listitem></varlistentry><varlistentry><term><parameter>logical_rect</parameter> :</term><listitem><simpara> logical rectangle to convert, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</simpara></listitem></varlistentry></variablelist><para>Since 1.16</para></refsect2><refsect2><title><anchor id="PangoMatrix" role="struct" condition="since:1.6"/>PangoMatrix</title><indexterm role="1.6"><primary>PangoMatrix</primary></indexterm><programlisting>typedef struct { double xx; double xy; double yx; double yy; double x0; double y0;} PangoMatrix;</programlisting><para>A structure specifying a transformation between user-spacecoordinates and device coordinates. The transformationis given by</para><para><programlisting>x_device = x_user * matrix->xx + y_user * matrix->xy + matrix->x0;y_device = x_user * matrix->yx + y_user * matrix->yy + matrix->y0;</programlisting></para><para></para><variablelist role="struct"><varlistentry><term><link linkend="double">double</link> <structfield>xx</structfield>;</term><listitem><simpara> 1st component of the transformation matrix</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link> <structfield>xy</structfield>;</term><listitem><simpara> 2nd component of the transformation matrix</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link> <structfield>yx</structfield>;</term><listitem><simpara> 3rd component of the transformation matrix</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link> <structfield>yy</structfield>;</term><listitem><simpara> 4th component of the transformation matrix</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link> <structfield>x0</structfield>;</term><listitem><simpara> x translation</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link> <structfield>y0</structfield>;</term><listitem><simpara> y translation</simpara></listitem></varlistentry></variablelist><para>Since 1.6</para></refsect2><refsect2><title><anchor id="PANGO-TYPE-MATRIX:CAPS" role="macro"/>PANGO_TYPE_MATRIX</title><indexterm><primary>PANGO_TYPE_MATRIX</primary></indexterm><programlisting>#define PANGO_TYPE_MATRIX (pango_matrix_get_type ())</programlisting><para>The GObject type for <link linkend="PangoMatrix"><type>PangoMatrix</type></link></para><para></para></refsect2><refsect2><title><anchor id="PANGO-MATRIX-INIT:CAPS" role="macro" condition="since:1.6"/>PANGO_MATRIX_INIT</title><indexterm role="1.6"><primary>PANGO_MATRIX_INIT</primary></indexterm><programlisting>#define PANGO_MATRIX_INIT { 1., 0., 0., 1., 0., 0. }</programlisting><para>Constant that can be used to initialize a PangoMatrix tothe identity transform.</para><para><informalexample><programlisting>PangoMatrix matrix = PANGO_MATRIX_INIT;pango_matrix_rotate (&matrix, 45.);</programlisting></informalexample></para><para></para><para>Since 1.6</para></refsect2>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -