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

📄 glyphs.xml

📁 GTK+-2.0源码之pango-1.15.6.tar.gz
💻 XML
📖 第 1 页 / 共 5 页
字号:
<refsect2><title><anchor id="pango-matrix-copy" role="function" condition="since:1.6"/>pango_matrix_copy ()</title><indexterm role="1.6"><primary>pango_matrix_copy</primary></indexterm><programlisting><link linkend="PangoMatrix">PangoMatrix</link>* pango_matrix_copy              (const <link linkend="PangoMatrix">PangoMatrix</link> *matrix);</programlisting><para>Copies a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>matrix</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, can be <link linkend="NULL:CAPS"><literal>NULL</literal></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, which should              be freed with <link linkend="pango-matrix-free"><function>pango_matrix_free()</function></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if              <parameter>matrix</parameter> was <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</simpara></listitem></varlistentry></variablelist><para>Since  1.6</para></refsect2><refsect2><title><anchor id="pango-matrix-free" role="function" condition="since:1.6"/>pango_matrix_free ()</title><indexterm role="1.6"><primary>pango_matrix_free</primary></indexterm><programlisting><link linkend="void">void</link>        pango_matrix_free               (<link linkend="PangoMatrix">PangoMatrix</link> *matrix);</programlisting><para>Free a <link linkend="PangoMatrix"><type>PangoMatrix</type></link> created with <link linkend="pango-matrix-copy"><function>pango_matrix_copy()</function></link>.Does nothing if <parameter>matrix</parameter> is <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>matrix</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></simpara></listitem></varlistentry></variablelist><para>Since  1.6</para></refsect2><refsect2><title><anchor id="pango-matrix-translate" role="function" condition="since:1.6"/>pango_matrix_translate ()</title><indexterm role="1.6"><primary>pango_matrix_translate</primary></indexterm><programlisting><link linkend="void">void</link>        pango_matrix_translate          (<link linkend="PangoMatrix">PangoMatrix</link> *matrix,                                             <link linkend="double">double</link> tx,                                             <link linkend="double">double</link> ty);</programlisting><para>Changes the transformation represented by <parameter>matrix</parameter> to be thetransformation given by first translating by (<parameter>tx</parameter>, <parameter>ty</parameter>)then applying the original transformation.</para><para></para><variablelist role="params"><varlistentry><term><parameter>matrix</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoMatrix"><type>PangoMatrix</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>tx</parameter>&nbsp;:</term><listitem><simpara> amount to translate in the X direction</simpara></listitem></varlistentry><varlistentry><term><parameter>ty</parameter>&nbsp;:</term><listitem><simpara> amount to translate in the Y direction</simpara></listitem></varlistentry></variablelist><para>Since  1.6</para></refsect2><refsect2><title><anchor id="pango-matrix-scale" role="function" condition="since:1.6"/>pango_matrix_scale ()</title><indexterm role="1.6"><primary>pango_matrix_scale</primary></indexterm><programlisting><link linkend="void">void</link>        pango_matrix_scale              (<link linkend="PangoMatrix">PangoMatrix</link> *matrix,                                             <link linkend="double">double</link> scale_x,                                             <link linkend="double">double</link> scale_y);</programlisting><para>Changes the transformation represented by <parameter>matrix</parameter> to be thetransformation given by first scaling by <parameter>sx</parameter> in the X directionand <parameter>sy</parameter> in the Y direction then applying the originaltransformation.</para><para></para><variablelist role="params"><varlistentry><term><parameter>matrix</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoMatrix"><type>PangoMatrix</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>scale_x</parameter>&nbsp;:</term><listitem><simpara> amount to scale by in X direction</simpara></listitem></varlistentry><varlistentry><term><parameter>scale_y</parameter>&nbsp;:</term><listitem><simpara> amount to scale by in Y direction</simpara></listitem></varlistentry></variablelist><para>Since  1.6</para></refsect2><refsect2><title><anchor id="pango-matrix-rotate" role="function" condition="since:1.6"/>pango_matrix_rotate ()</title><indexterm role="1.6"><primary>pango_matrix_rotate</primary></indexterm><programlisting><link linkend="void">void</link>        pango_matrix_rotate             (<link linkend="PangoMatrix">PangoMatrix</link> *matrix,                                             <link linkend="double">double</link> degrees);</programlisting><para>Changes the transformation represented by <parameter>matrix</parameter> to be thetransformation given by first rotating by <parameter>degrees</parameter> degreescounter-clockwise then applying the original transformation.</para><para></para><variablelist role="params"><varlistentry><term><parameter>matrix</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoMatrix"><type>PangoMatrix</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>degrees</parameter>&nbsp;:</term><listitem><simpara> degrees to rotate counter-clockwise</simpara></listitem></varlistentry></variablelist><para>Since  1.6</para></refsect2><refsect2><title><anchor id="pango-matrix-concat" role="function" condition="since:1.6"/>pango_matrix_concat ()</title><indexterm role="1.6"><primary>pango_matrix_concat</primary></indexterm><programlisting><link linkend="void">void</link>        pango_matrix_concat             (<link linkend="PangoMatrix">PangoMatrix</link> *matrix,                                             const <link linkend="PangoMatrix">PangoMatrix</link> *new_matrix);</programlisting><para>Changes the transformation represented by <parameter>matrix</parameter> to be thetransformation given by first applying transformationgiven by <parameter>new_matrix</parameter> then applying the original transformation.</para><para></para><variablelist role="params"><varlistentry><term><parameter>matrix</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoMatrix"><type>PangoMatrix</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>new_matrix</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoMatrix"><type>PangoMatrix</type></link></simpara></listitem></varlistentry></variablelist><para>Since  1.6</para></refsect2><refsect2><title><anchor id="pango-matrix-transform-point" role="function" condition="since:1.16"/>pango_matrix_transform_point ()</title><indexterm role="1.16"><primary>pango_matrix_transform_point</primary></indexterm><programlisting><link linkend="void">void</link>        pango_matrix_transform_point    (const <link linkend="PangoMatrix">PangoMatrix</link> *matrix,                                             <link linkend="double">double</link> *x,                                             <link linkend="double">double</link> *y);</programlisting><para>Transforms the point (<parameter>x</parameter>, <parameter>y</parameter>) by <parameter>matrix</parameter>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>matrix</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></simpara></listitem></varlistentry><varlistentry><term><parameter>x</parameter>&nbsp;:</term><listitem><simpara> in/out X position</simpara></listitem></varlistentry><varlistentry><term><parameter>y</parameter>&nbsp;:</term><listitem><simpara> in/out Y position</simpara></listitem></varlistentry></variablelist><para>Since  1.16</para></refsect2><refsect2><title><anchor id="pango-matrix-transform-distance" role="function" condition="since:1.16"/>pango_matrix_transform_distance ()</title><indexterm role="1.16"><primary>pango_matrix_transform_distance</primary></indexterm><programlisting><link linkend="void">void</link>        pango_matrix_transform_distance (const <link linkend="PangoMatrix">PangoMatrix</link> *matrix,                                             <link linkend="double">double</link> *dx,                                             <link linkend="double">double</link> *dy);</programlisting><para>Transforms the distance vector (<parameter>dx</parameter>,<parameter>dy</parameter>) by <parameter>matrix</parameter>. This issimilar to <link linkend="pango-matrix-transform-point"><function>pango_matrix_transform_point()</function></link> except that the translationcomponents of the transformation are ignored. The calculation ofthe returned vector is as follows:</para><para><programlisting>dx2 = dx1 * xx + dy1 * xy;dy2 = dx1 * yx + dy1 * yy;</programlisting></para><para>Affine transformations are position invariant, so the same vectoralways transforms to the same vector. If (<parameter>x1</parameter>,<parameter>y1</parameter>) transformsto (<parameter>x2</parameter>,<parameter>y2</parameter>) then (<parameter>x1</parameter>+<parameter>dx1</parameter>,<parameter>y1</parameter>+<parameter>dy1</parameter>) will transform to(<parameter>x1</parameter>+<parameter>dx2</parameter>,<parameter>y1</parameter>+<parameter>dy2</parameter>) for all values of <parameter>x1</parameter> and <parameter>x2</parameter>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>matrix</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></simpara></listitem></varlistentry><varlistentry><term><parameter>dx</parameter>&nbsp;:</term><listitem><simpara> in/out X component of a distance vector</simpara></listitem></varlistentry><varlistentry><term><parameter>dy</parameter>&nbsp;:</term><listitem><simpara> yn/out Y component of a distance vector</simpara></listitem></varlistentry></variablelist><para>Since  1.16</para></refsect2><refsect2><title><anchor id="pango-matrix-transform-rectangle" role="function" condition="since:1.16"/>pango_matrix_transform_rectangle ()</title><indexterm role="1.16"><primary>pango_matrix_transform_rectangle</primary></indexterm><programlisting><link linkend="void">void</link>        pango_matrix_transform_rectangle                                            (const <link linkend="PangoMatrix">PangoMatrix</link> *matrix,                                             <link linkend="PangoRectangle">PangoRectangle</link> *rect);</programlisting><para>First transforms <parameter>rect</parameter> using <parameter>matrix</parameter>, then calculates the bounding boxof the transformed rectangle.  The rectangle should be in Pango units.</para><para>This function is useful for example when you want to draw a rotated<parameter>PangoLayout</parameter> to an image buffer, and want to know how large the imageshould be and how much you should shift the layout when rendering.</para><para>If you have a rectangle in device units (pixels), use<link linkend="pango-matrix-transform-pixel-rectangle"><function>pango_matrix_transform_pixel_rectangle()</function></link>.</para><para>If you have the rectangle in Pango units and want to convert totransformed pixel bounding box, it is more accurate to transform it first(using this function) and pass the result to <link linkend="pango-extents-to-pixels"><function>pango_extents_to_pixels()</function></link>,as <parameter>ink_rect</parameter>.  However, there is a reason that you may want to convertto pixels first and then transform, and that is when the transformedcoordinates may overflow in Pango units (large matrix translation forexample).</para><para></para><variablelist role="params"><varlistentry><term><parameter>matrix</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></simpara></listitem></varlistentry><varlistentry><term><parameter>rect</parameter>&nbsp;:</term><listitem><simpara> in/out bounding box in Pango units, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></simpara></listitem></varlistentry></variablelist><para>Since  1.16</para></refsect2><refsect2><title><anchor id="pango-matrix-transform-pixel-rectangle" role="function" condition="since:1.16"/>pango_matrix_transform_pixel_rectangle ()</title><indexterm role="1.16"><primary>pango_matrix_transform_pixel_rectangle</primary></indexterm><programlisting><link linkend="void">void</link>        pango_matrix_transform_pixel_rectangle                                            (const <link linkend="PangoMatrix">PangoMatrix</link> *matrix,                                             <link linkend="PangoRectangle">PangoRectangle</link> *rect);</programlisting><para>First transforms the <parameter>rect</parameter> using <parameter>matrix</parameter>, then calculates the bounding boxof the transformed rectangle.  The rectangle should be in device units(pixels).</para><para>This function is useful for example when you want to draw a rotated<parameter>PangoLayout</parameter> to an image buffer, and want to know how large the imageshould be and how much you should shift the layout when rendering.

⌨️ 快捷键说明

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