📄 main.xml
字号:
<varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>desc</parameter> :</term><listitem><simpara> the new pango font description</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-context-get-language" role="function"/>pango_context_get_language ()</title><indexterm><primary>pango_context_get_language</primary></indexterm><programlisting><link linkend="PangoLanguage">PangoLanguage</link>* pango_context_get_language (<link linkend="PangoContext">PangoContext</link> *context);</programlisting><para>Retrieves the global language tag for the context.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the global language tag.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-context-set-language" role="function"/>pango_context_set_language ()</title><indexterm><primary>pango_context_set_language</primary></indexterm><programlisting><link linkend="void">void</link> pango_context_set_language (<link linkend="PangoContext">PangoContext</link> *context, <link linkend="PangoLanguage">PangoLanguage</link> *language);</programlisting><para>Sets the global language tag for the context. The default languagefor the locale of the running process can be found using<link linkend="pango-language-get-default"><function>pango_language_get_default()</function></link>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>language</parameter> :</term><listitem><simpara> the new language tag.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-context-get-base-dir" role="function"/>pango_context_get_base_dir ()</title><indexterm><primary>pango_context_get_base_dir</primary></indexterm><programlisting><link linkend="PangoDirection">PangoDirection</link> pango_context_get_base_dir (<link linkend="PangoContext">PangoContext</link> *context);</programlisting><para>Retrieves the base direction for the context. See<link linkend="pango-context-set-base-dir"><function>pango_context_set_base_dir()</function></link>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the base direction for the context.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-context-set-base-dir" role="function"/>pango_context_set_base_dir ()</title><indexterm><primary>pango_context_set_base_dir</primary></indexterm><programlisting><link linkend="void">void</link> pango_context_set_base_dir (<link linkend="PangoContext">PangoContext</link> *context, <link linkend="PangoDirection">PangoDirection</link> direction);</programlisting><para>Sets the base direction for the context.</para><para>The base direction is used in applying the Unicode bidirectionalalgorithm; if the <parameter>direction</parameter> is <link linkend="PANGO-DIRECTION-LTR:CAPS"><literal>PANGO_DIRECTION_LTR</literal></link> or<link linkend="PANGO-DIRECTION-RTL:CAPS"><literal>PANGO_DIRECTION_RTL</literal></link>, then the value will be used as the paragraphdirection in the Unicode bidirectional algorithm. A value of<link linkend="PANGO-DIRECTION-WEAK-LTR:CAPS"><literal>PANGO_DIRECTION_WEAK_LTR</literal></link> or <link linkend="PANGO-DIRECTION-WEAK-RTL:CAPS"><literal>PANGO_DIRECTION_WEAK_RTL</literal></link> is used onlyfor paragraphs that do not contain any strong characters themselves.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>direction</parameter> :</term><listitem><simpara> the new base direction</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-context-get-base-gravity" role="function" condition="since:1.16"/>pango_context_get_base_gravity ()</title><indexterm role="1.16"><primary>pango_context_get_base_gravity</primary></indexterm><programlisting><link linkend="PangoGravity">PangoGravity</link> pango_context_get_base_gravity (<link linkend="PangoContext">PangoContext</link> *context);</programlisting><para>Retrieves the base gravity for the context. See<link linkend="pango-context-set-base-gravity"><function>pango_context_set_base_gravity()</function></link>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the base gravity for the context.</simpara></listitem></varlistentry></variablelist><para>Since 1.16</para></refsect2><refsect2><title><anchor id="pango-context-set-base-gravity" role="function" condition="since:1.16"/>pango_context_set_base_gravity ()</title><indexterm role="1.16"><primary>pango_context_set_base_gravity</primary></indexterm><programlisting><link linkend="void">void</link> pango_context_set_base_gravity (<link linkend="PangoContext">PangoContext</link> *context, <link linkend="PangoGravity">PangoGravity</link> gravity);</programlisting><para>Sets the base gravity for the context.</para><para>The base gravity is used in laying vertical text out.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>gravity</parameter> :</term><listitem><simpara> the new base gravity</simpara></listitem></varlistentry></variablelist><para>Since 1.16</para></refsect2><refsect2><title><anchor id="pango-context-get-gravity" role="function" condition="since:1.16"/>pango_context_get_gravity ()</title><indexterm role="1.16"><primary>pango_context_get_gravity</primary></indexterm><programlisting><link linkend="PangoGravity">PangoGravity</link> pango_context_get_gravity (<link linkend="PangoContext">PangoContext</link> *context);</programlisting><para>Retrieves the gravity for the context. This is similar to<link linkend="pango-context-get-base-gravity"><function>pango_context_get_base_gravity()</function></link>, except for when the base gravityis <link linkend="PANGO-GRAVITY-AUTO:CAPS"><literal>PANGO_GRAVITY_AUTO</literal></link> for which <link linkend="pango-gravity-get-for-matrix"><function>pango_gravity_get_for_matrix()</function></link> is usedto return the gravity from the current context matrix.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the resolved gravity for the context.</simpara></listitem></varlistentry></variablelist><para>Since 1.16</para></refsect2><refsect2><title><anchor id="pango-context-get-gravity-hint" role="function" condition="since:1.16"/>pango_context_get_gravity_hint ()</title><indexterm role="1.16"><primary>pango_context_get_gravity_hint</primary></indexterm><programlisting><link linkend="PangoGravityHint">PangoGravityHint</link> pango_context_get_gravity_hint (<link linkend="PangoContext">PangoContext</link> *context);</programlisting><para>Retrieves the gravity hint for the context. See<link linkend="pango-context-set-gravity-hint"><function>pango_context_set_gravity_hint()</function></link> for details.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the gravity hint for the context.</simpara></listitem></varlistentry></variablelist><para>Since 1.16</para></refsect2><refsect2><title><anchor id="pango-context-set-gravity-hint" role="function" condition="since:1.16"/>pango_context_set_gravity_hint ()</title><indexterm role="1.16"><primary>pango_context_set_gravity_hint</primary></indexterm><programlisting><link linkend="void">void</link> pango_context_set_gravity_hint (<link linkend="PangoContext">PangoContext</link> *context, <link linkend="PangoGravityHint">PangoGravityHint</link> hint);</programlisting><para>Sets the gravity hint for the context.</para><para>The gravity hint is used in laying vertical text out, and is only relevantif gravity of the context as returned by <link linkend="pango-context-get-gravity"><function>pango_context_get_gravity()</function></link>is set <link linkend="PANGO-GRAVITY-EAST:CAPS"><literal>PANGO_GRAVITY_EAST</literal></link> or <link linkend="PANGO-GRAVITY-WEST:CAPS"><literal>PANGO_GRAVITY_WEST</literal></link>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>hint</parameter> :</term><listitem><simpara> the new gravity hint</simpara></listitem></varlistentry></variablelist><para>Since 1.16</para></refsect2><refsect2><title><anchor id="pango-context-get-matrix" role="function" condition="since:1.6"/>pango_context_get_matrix ()</title><indexterm role="1.6"><primary>pango_context_get_matrix</primary></indexterm><programlisting>const <link linkend="PangoMatrix">PangoMatrix</link>* pango_context_get_matrix (<link linkend="PangoContext">PangoContext</link> *context);</programlisting><para>Gets the transformation matrix that will be applied whenrendering with this context. See <link linkend="pango-context-set-matrix"><function>pango_context_set_matrix()</function></link>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the matrix, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if no matrix has been set (which is the same as the identity matrix). The returned matrix is owned by Pango and must not be modified or freed.</simpara></listitem></varlistentry></variablelist><para>Since 1.6</para></refsect2><refsect2><title><anchor id="pango-context-set-matrix" role="function" condition="since:1.6"/>pango_context_set_matrix ()</title><indexterm role="1.6"><primary>pango_context_set_matrix</primary></indexterm><programlisting><link linkend="void">void</link> pango_context_set_matrix (<link linkend="PangoContext">PangoContext</link> *context, const <link linkend="PangoMatrix">PangoMatrix</link> *matrix);</programlisting><para>Sets the transformation matrix that will be applied when renderingwith this context. Note that reported metrics are in the user spacecoordinates before the application of the matrix, not device-spacecoordinates after the application of the matrix. So, they don't scalewith the matrix, though they may change slightly for differentmatrices, depending on how the text is fit to the pixel grid.</para>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -