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

📄 cairo-matrix.xml

📁 按照官方的说法:Cairo is a vector graphics library with cross-device output support. 翻译过来
💻 XML
字号:
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"                "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [<!ENTITY version SYSTEM "version.xml">]><refentry id="cairo-cairo-matrix-t"><refmeta><refentrytitle id="top_of_page">cairo_matrix_t</refentrytitle><manvolnum>3</manvolnum><refmiscinfo>CAIRO Library</refmiscinfo></refmeta><refnamediv><refname>cairo_matrix_t</refname><refpurpose>Generic matrix operations</refpurpose><!--[<xref linkend="desc" endterm="desc.title"/>]--></refnamediv><refsynopsisdiv id="synopsis"><title id="synopsis.title">Synopsis</title><synopsis>            <link linkend="cairo-matrix-t">cairo_matrix_t</link>;<link linkend="void">void</link>        <link linkend="cairo-matrix-init">cairo_matrix_init</link>               (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> xx,                                             <link linkend="double">double</link> yx,                                             <link linkend="double">double</link> xy,                                             <link linkend="double">double</link> yy,                                             <link linkend="double">double</link> x0,                                             <link linkend="double">double</link> y0);<link linkend="void">void</link>        <link linkend="cairo-matrix-init-identity">cairo_matrix_init_identity</link>      (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix);<link linkend="void">void</link>        <link linkend="cairo-matrix-init-translate">cairo_matrix_init_translate</link>     (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> tx,                                             <link linkend="double">double</link> ty);<link linkend="void">void</link>        <link linkend="cairo-matrix-init-scale">cairo_matrix_init_scale</link>         (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> sx,                                             <link linkend="double">double</link> sy);<link linkend="void">void</link>        <link linkend="cairo-matrix-init-rotate">cairo_matrix_init_rotate</link>        (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> radians);<link linkend="void">void</link>        <link linkend="cairo-matrix-translate">cairo_matrix_translate</link>          (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> tx,                                             <link linkend="double">double</link> ty);<link linkend="void">void</link>        <link linkend="cairo-matrix-scale">cairo_matrix_scale</link>              (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> sx,                                             <link linkend="double">double</link> sy);<link linkend="void">void</link>        <link linkend="cairo-matrix-rotate">cairo_matrix_rotate</link>             (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> radians);<link linkend="cairo-status-t">cairo_status_t</link> <link linkend="cairo-matrix-invert">cairo_matrix_invert</link>          (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix);<link linkend="void">void</link>        <link linkend="cairo-matrix-multiply">cairo_matrix_multiply</link>           (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *result,                                             const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *a,                                             const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *b);<link linkend="void">void</link>        <link linkend="cairo-matrix-transform-distance">cairo_matrix_transform_distance</link> (const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> *dx,                                             <link linkend="double">double</link> *dy);<link linkend="void">void</link>        <link linkend="cairo-matrix-transform-point">cairo_matrix_transform_point</link>    (const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> *x,                                             <link linkend="double">double</link> *y);</synopsis></refsynopsisdiv><refsect1 id="desc"><title id="desc.title">Description</title>  <para><indexterm><primary>types</primary><secondary>cairo_matrix</secondary></indexterm><indexterm><primary/></indexterm>    <link linkend="cairo-matrix-t"><type>cairo_matrix_t</type></link> is used throughout cairo to convert between different    coordinate spaces.  A <link linkend="cairo-matrix-t"><type>cairo_matrix_t</type></link> holds an affine transformation,    such as a scale, rotation, shear, or a combination of these.    The transformation of a point (<literal>x</literal>,<literal>y</literal>)    is given by:  </para>  <programlisting>    x_new = xx * x + xy * y + x0;    y_new = yx * x + yy * y + y0;  </programlisting>  <para>    The current transformation matrix of a <link linkend="cairo-t"><type>cairo_t</type></link>, represented as a    <link linkend="cairo-matrix-t"><type>cairo_matrix_t</type></link>, defines the transformation from user-space    coordinates to device-space coordinates. See <link linkend="cairo-get-matrix"><function>cairo_get_matrix()</function></link> and    <link linkend="cairo-set-matrix"><function>cairo_set_matrix()</function></link>.  </para></refsect1><refsect1 id="details"><title id="details.title">Details</title><refsect2><title><anchor id="cairo-matrix-t" role="struct"/>cairo_matrix_t</title><indexterm><primary>cairo_matrix_t</primary></indexterm><programlisting>typedef struct {    double xx; double yx;    double xy; double yy;    double x0; double y0;} cairo_matrix_t;</programlisting><para>A <link linkend="cairo-matrix-t"><type>cairo_matrix_t</type></link> holds an affine transformation, such as a scale,rotation, shear, or a combination of those. The transformation ofa point (x, y) is given by:<programlisting>    x_new = xx * x + xy * y + x0;    y_new = yx * x + yy * y + y0;</programlisting></para><para></para><variablelist role="struct"><varlistentry><term><link linkend="double">double</link>&nbsp;<structfield>xx</structfield>;</term><listitem><simpara> xx component of the affine transformation</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link>&nbsp;<structfield>yx</structfield>;</term><listitem><simpara> yx component of the affine transformation</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link>&nbsp;<structfield>xy</structfield>;</term><listitem><simpara> xy component of the affine transformation</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link>&nbsp;<structfield>yy</structfield>;</term><listitem><simpara> yy component of the affine transformation</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link>&nbsp;<structfield>x0</structfield>;</term><listitem><simpara> X translation component of the affine transformation</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link>&nbsp;<structfield>y0</structfield>;</term><listitem><simpara> Y translation component of the affine transformation</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="cairo-matrix-init" role="function"/>cairo_matrix_init ()</title><indexterm><primary>cairo_matrix_init</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_matrix_init               (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> xx,                                             <link linkend="double">double</link> yx,                                             <link linkend="double">double</link> xy,                                             <link linkend="double">double</link> yy,                                             <link linkend="double">double</link> x0,                                             <link linkend="double">double</link> y0);</programlisting></refsect2><refsect2><title><anchor id="cairo-matrix-init-identity" role="function"/>cairo_matrix_init_identity ()</title><indexterm><primary>cairo_matrix_init_identity</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_matrix_init_identity      (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix);</programlisting></refsect2><refsect2><title><anchor id="cairo-matrix-init-translate" role="function"/>cairo_matrix_init_translate ()</title><indexterm><primary>cairo_matrix_init_translate</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_matrix_init_translate     (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> tx,                                             <link linkend="double">double</link> ty);</programlisting></refsect2><refsect2><title><anchor id="cairo-matrix-init-scale" role="function"/>cairo_matrix_init_scale ()</title><indexterm><primary>cairo_matrix_init_scale</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_matrix_init_scale         (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> sx,                                             <link linkend="double">double</link> sy);</programlisting></refsect2><refsect2><title><anchor id="cairo-matrix-init-rotate" role="function"/>cairo_matrix_init_rotate ()</title><indexterm><primary>cairo_matrix_init_rotate</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_matrix_init_rotate        (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> radians);</programlisting></refsect2><refsect2><title><anchor id="cairo-matrix-translate" role="function"/>cairo_matrix_translate ()</title><indexterm><primary>cairo_matrix_translate</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_matrix_translate          (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> tx,                                             <link linkend="double">double</link> ty);</programlisting></refsect2><refsect2><title><anchor id="cairo-matrix-scale" role="function"/>cairo_matrix_scale ()</title><indexterm><primary>cairo_matrix_scale</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_matrix_scale              (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> sx,                                             <link linkend="double">double</link> sy);</programlisting></refsect2><refsect2><title><anchor id="cairo-matrix-rotate" role="function"/>cairo_matrix_rotate ()</title><indexterm><primary>cairo_matrix_rotate</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_matrix_rotate             (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> radians);</programlisting></refsect2><refsect2><title><anchor id="cairo-matrix-invert" role="function"/>cairo_matrix_invert ()</title><indexterm><primary>cairo_matrix_invert</primary></indexterm><programlisting><link linkend="cairo-status-t">cairo_status_t</link> cairo_matrix_invert          (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix);</programlisting></refsect2><refsect2><title><anchor id="cairo-matrix-multiply" role="function"/>cairo_matrix_multiply ()</title><indexterm><primary>cairo_matrix_multiply</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_matrix_multiply           (<link linkend="cairo-matrix-t">cairo_matrix_t</link> *result,                                             const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *a,                                             const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *b);</programlisting></refsect2><refsect2><title><anchor id="cairo-matrix-transform-distance" role="function"/>cairo_matrix_transform_distance ()</title><indexterm><primary>cairo_matrix_transform_distance</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_matrix_transform_distance (const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> *dx,                                             <link linkend="double">double</link> *dy);</programlisting></refsect2><refsect2><title><anchor id="cairo-matrix-transform-point" role="function"/>cairo_matrix_transform_point ()</title><indexterm><primary>cairo_matrix_transform_point</primary></indexterm><programlisting><link linkend="void">void</link>        cairo_matrix_transform_point    (const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *matrix,                                             <link linkend="double">double</link> *x,                                             <link linkend="double">double</link> *y);</programlisting></refsect2></refsect1></refentry>

⌨️ 快捷键说明

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