<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="gsk4-GskTransform">
<refmeta>
<refentrytitle role="top_of_page" id="gsk4-GskTransform.top_of_page">GskTransform</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GSK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GskTransform</refname>
<refpurpose>A description for transform operations</refpurpose>
</refnamediv>

<refsect1 id="gsk4-GskTransform.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-transform-ref">gsk_transform_ref</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gsk-transform-unref">gsk_transform_unref</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GskTransformCategory"><returnvalue>GskTransformCategory</returnvalue></link>
</entry><entry role="function_name"><link linkend="gsk-transform-get-category">gsk_transform_get_category</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gsk-transform-print">gsk_transform_print</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-transform-to-string">gsk_transform_to_string</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gsk-transform-parse">gsk_transform_parse</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gsk-transform-to-matrix">gsk_transform_to_matrix</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gsk-transform-to-2d">gsk_transform_to_2d</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gsk-transform-to-affine">gsk_transform_to_affine</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gsk-transform-to-translate">gsk_transform_to_translate</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-transform-transform">gsk_transform_transform</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-transform-invert">gsk_transform_invert</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-transform-matrix">gsk_transform_matrix</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-transform-translate">gsk_transform_translate</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-transform-translate-3d">gsk_transform_translate_3d</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-transform-rotate">gsk_transform_rotate</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-transform-rotate-3d">gsk_transform_rotate_3d</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-transform-scale">gsk_transform_scale</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-transform-scale-3d">gsk_transform_scale_3d</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-transform-perspective">gsk_transform_perspective</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gsk-transform-equal">gsk_transform_equal</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gsk-transform-transform-bounds">gsk_transform_transform_bounds</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gsk-transform-transform-point">gsk_transform_transform_point</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="gsk4-GskTransform.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GskTransform">GskTransform</link></entry></row>

<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GskTransformCategory">GskTransformCategory</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>


<refsect1 id="gsk4-GskTransform.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GskTransform"><type>GskTransform</type></link> is an object to describe transform matrices. Unlike
<link linkend="graphene-matrix-t"><type>graphene_matrix_t</type></link>, <link linkend="GskTransform"><type>GskTransform</type></link> retains the steps in how a transform was
constructed, and allows inspecting them. It is modeled after the way
CSS describes transforms.</para>
<para><link linkend="GskTransform"><type>GskTransform</type></link> objects are immutable and cannot be changed after creation.
This means code can safely expose them as properties of objects without
having to worry about others changing them.</para>

</refsect1>
<refsect1 id="gsk4-GskTransform.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gsk-transform-ref" role="function">
<title>gsk_transform_ref&#160;()</title>
<indexterm zone="gsk-transform-ref"><primary>gsk_transform_ref</primary></indexterm>
<programlisting language="C"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
gsk_transform_ref (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *self</parameter>);</programlisting>
<para>Acquires a reference on the given <link linkend="GskTransform"><type>GskTransform</type></link>.</para>
<refsect3 id="gsk-transform-ref.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GskTransform"><type>GskTransform</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-transform-ref.returns" role="returns">
<title>Returns</title>
<para>the <link linkend="GskTransform"><type>GskTransform</type></link> with an additional reference. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gsk-transform-unref" role="function">
<title>gsk_transform_unref&#160;()</title>
<indexterm zone="gsk-transform-unref"><primary>gsk_transform_unref</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gsk_transform_unref (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *self</parameter>);</programlisting>
<para>Releases a reference on the given <link linkend="GskTransform"><type>GskTransform</type></link>.</para>
<para>If the reference was the last, the resources associated to the <parameter>self</parameter>
 are
freed.</para>
<refsect3 id="gsk-transform-unref.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GskTransform"><type>GskTransform</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gsk-transform-get-category" role="function">
<title>gsk_transform_get_category&#160;()</title>
<indexterm zone="gsk-transform-get-category"><primary>gsk_transform_get_category</primary></indexterm>
<programlisting language="C"><link linkend="GskTransformCategory"><returnvalue>GskTransformCategory</returnvalue></link>
gsk_transform_get_category (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *self</parameter>);</programlisting>
<para>Returns the category this transform belongs to.</para>
<refsect3 id="gsk-transform-get-category.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>A <link linkend="GskTransform"><type>GskTransform</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-transform-get-category.returns" role="returns">
<title>Returns</title>
<para> The category of the transform</para>
</refsect3></refsect2>
<refsect2 id="gsk-transform-print" role="function">
<title>gsk_transform_print&#160;()</title>
<indexterm zone="gsk-transform-print"><primary>gsk_transform_print</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gsk_transform_print (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *self</parameter>,
                     <parameter><link linkend="GString"><type>GString</type></link> *string</parameter>);</programlisting>
<para>Converts <parameter>self</parameter>
 into a human-readable string representation suitable
for printing that can later be parsed with <link linkend="gsk-transform-parse"><function>gsk_transform_parse()</function></link>.</para>
<refsect3 id="gsk-transform-print.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GskTransform"><type>GskTransform</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>string</para></entry>
<entry role="parameter_description"><para>The string to print into</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gsk-transform-to-string" role="function">
<title>gsk_transform_to_string&#160;()</title>
<indexterm zone="gsk-transform-to-string"><primary>gsk_transform_to_string</primary></indexterm>
<programlisting language="C"><link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gsk_transform_to_string (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *self</parameter>);</programlisting>
<para>Converts a matrix into a string that is suitable for
printing and can later be parsed with <link linkend="gsk-transform-parse"><function>gsk_transform_parse()</function></link>.</para>
<para>This is a wrapper around <link linkend="gsk-transform-print"><function>gsk_transform_print()</function></link>, see that function
for details.</para>
<refsect3 id="gsk-transform-to-string.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GskTransform"><type>GskTransform</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-transform-to-string.returns" role="returns">
<title>Returns</title>
<para> A new string for <parameter>self</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gsk-transform-parse" role="function">
<title>gsk_transform_parse&#160;()</title>
<indexterm zone="gsk-transform-parse"><primary>gsk_transform_parse</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gsk_transform_parse (<parameter>const <link linkend="char"><type>char</type></link> *string</parameter>,
                     <parameter><link linkend="GskTransform"><type>GskTransform</type></link> **out_transform</parameter>);</programlisting>
<para>Parses the given <parameter>string</parameter>
 into a transform and puts it in
<parameter>out_transform</parameter>
. Strings printed via <link linkend="gsk-transform-to-string"><function>gsk_transform_to_string()</function></link>
can be read in again successfully using this function.</para>
<para>If <parameter>string</parameter>
 does not describe a valid transform, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> is
returned and <link linkend="NULL:CAPS"><literal>NULL</literal></link> is put in <parameter>out_transform</parameter>
.</para>
<refsect3 id="gsk-transform-parse.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>string</para></entry>
<entry role="parameter_description"><para>the string to parse</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>out_transform</para></entry>
<entry role="parameter_description"><para>The location to put the transform in. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-transform-parse.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>string</parameter>
described a valid transform.</para>
</refsect3></refsect2>
<refsect2 id="gsk-transform-to-matrix" role="function">
<title>gsk_transform_to_matrix&#160;()</title>
<indexterm zone="gsk-transform-to-matrix"><primary>gsk_transform_to_matrix</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gsk_transform_to_matrix (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *self</parameter>,
                         <parameter><link linkend="graphene-matrix-t"><type>graphene_matrix_t</type></link> *out_matrix</parameter>);</programlisting>
<para>Computes the actual value of <parameter>self</parameter>
 and stores it in <parameter>out_matrix</parameter>
.
The previous value of <parameter>out_matrix</parameter>
 will be ignored.</para>
<refsect3 id="gsk-transform-to-matrix.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GskTransform"><type>GskTransform</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>out_matrix</para></entry>
<entry role="parameter_description"><para>The matrix to set. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out caller-allocates</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gsk-transform-to-2d" role="function">
<title>gsk_transform_to_2d&#160;()</title>
<indexterm zone="gsk-transform-to-2d"><primary>gsk_transform_to_2d</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gsk_transform_to_2d (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *self</parameter>,
                     <parameter><link linkend="float"><type>float</type></link> *out_xx</parameter>,
                     <parameter><link linkend="float"><type>float</type></link> *out_yx</parameter>,
                     <parameter><link linkend="float"><type>float</type></link> *out_xy</parameter>,
                     <parameter><link linkend="float"><type>float</type></link> *out_yy</parameter>,
                     <parameter><link linkend="float"><type>float</type></link> *out_dx</parameter>,
                     <parameter><link linkend="float"><type>float</type></link> *out_dy</parameter>);</programlisting>
<para>Converts a <link linkend="GskTransform"><type>GskTransform</type></link> to a 2D transformation
matrix.
<parameter>self</parameter>
 must be a 2D transformation. If you are not
sure, use <link linkend="gsk-transform-get-category"><function>gsk_transform_get_category()</function></link> &gt;= 
<link linkend="GSK-TRANSFORM-CATEGORY-2D:CAPS"><literal>GSK_TRANSFORM_CATEGORY_2D</literal></link> to check.</para>
<para>The returned values have the following layout:</para>
<informalexample><programlisting role="example"><![CDATA[
  | xx yx |   |  a  b  0 |
  | xy yy | = |  c  d  0 |
  | dx dy |   | tx ty  1 |
]]></programlisting></informalexample>
<para></para>
<para>This function can be used to convert between a <link linkend="GskTransform"><type>GskTransform</type></link>
and a matrix type from other 2D drawing libraries, in particular
Cairo.</para>
<refsect3 id="gsk-transform-to-2d.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a 2D <link linkend="GskTransform"><type>GskTransform</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>out_xx</para></entry>
<entry role="parameter_description"><para>return location for the xx member. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>out_yx</para></entry>
<entry role="parameter_description"><para>return location for the yx member. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>out_xy</para></entry>
<entry role="parameter_description"><para>return location for the xy member. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>out_yy</para></entry>
<entry role="parameter_description"><para>return location for the yy member. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>out_dx</para></entry>
<entry role="parameter_description"><para>return location for the x0 member. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>out_dy</para></entry>
<entry role="parameter_description"><para>return location for the y0 member. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gsk-transform-to-affine" role="function">
<title>gsk_transform_to_affine&#160;()</title>
<indexterm zone="gsk-transform-to-affine"><primary>gsk_transform_to_affine</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gsk_transform_to_affine (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *self</parameter>,
                         <parameter><link linkend="float"><type>float</type></link> *out_scale_x</parameter>,
                         <parameter><link linkend="float"><type>float</type></link> *out_scale_y</parameter>,
                         <parameter><link linkend="float"><type>float</type></link> *out_dx</parameter>,
                         <parameter><link linkend="float"><type>float</type></link> *out_dy</parameter>);</programlisting>
<para>Converts a <link linkend="GskTransform"><type>GskTransform</type></link> to 2D affine transformation
factors.
<parameter>self</parameter>
 must be a 2D transformation. If you are not
sure, use <link linkend="gsk-transform-get-category"><function>gsk_transform_get_category()</function></link> &gt;=
<link linkend="GSK-TRANSFORM-CATEGORY-2D-AFFINE:CAPS"><literal>GSK_TRANSFORM_CATEGORY_2D_AFFINE</literal></link> to check.</para>
<refsect3 id="gsk-transform-to-affine.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GskTransform"><type>GskTransform</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>out_scale_x</para></entry>
<entry role="parameter_description"><para>return location for the scale
factor in the x direction. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>out_scale_y</para></entry>
<entry role="parameter_description"><para>return location for the scale
factor in the y direction. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>out_dx</para></entry>
<entry role="parameter_description"><para>return location for the translation
in the x direction. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>out_dy</para></entry>
<entry role="parameter_description"><para>return location for the translation
in the y direction. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gsk-transform-to-translate" role="function">
<title>gsk_transform_to_translate&#160;()</title>
<indexterm zone="gsk-transform-to-translate"><primary>gsk_transform_to_translate</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gsk_transform_to_translate (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *self</parameter>,
                            <parameter><link linkend="float"><type>float</type></link> *out_dx</parameter>,
                            <parameter><link linkend="float"><type>float</type></link> *out_dy</parameter>);</programlisting>
<para>Converts a <link linkend="GskTransform"><type>GskTransform</type></link> to a translation operation.
<parameter>self</parameter>
 must be a 2D transformation. If you are not
sure, use <link linkend="gsk-transform-get-category"><function>gsk_transform_get_category()</function></link> &gt;= 
<link linkend="GSK-TRANSFORM-CATEGORY-2D-TRANSLATE:CAPS"><literal>GSK_TRANSFORM_CATEGORY_2D_TRANSLATE</literal></link> to check.</para>
<refsect3 id="gsk-transform-to-translate.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GskTransform"><type>GskTransform</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>out_dx</para></entry>
<entry role="parameter_description"><para>return location for the translation
in the x direction. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>out_dy</para></entry>
<entry role="parameter_description"><para>return location for the translation
in the y direction. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gsk-transform-transform" role="function">
<title>gsk_transform_transform&#160;()</title>
<indexterm zone="gsk-transform-transform"><primary>gsk_transform_transform</primary></indexterm>
<programlisting language="C"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
gsk_transform_transform (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *next</parameter>,
                         <parameter><link linkend="GskTransform"><type>GskTransform</type></link> *other</parameter>);</programlisting>
<para>Applies all the operations from <parameter>other</parameter>
 to <parameter>next</parameter>
.</para>
<refsect3 id="gsk-transform-transform.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>next</para></entry>
<entry role="parameter_description"><para>Transform to apply <parameter>other</parameter>
to. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>][<acronym>transfer full</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>other</para></entry>
<entry role="parameter_description"><para>Transform to apply. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-transform-transform.returns" role="returns">
<title>Returns</title>
<para> The new transform</para>
</refsect3></refsect2>
<refsect2 id="gsk-transform-invert" role="function">
<title>gsk_transform_invert&#160;()</title>
<indexterm zone="gsk-transform-invert"><primary>gsk_transform_invert</primary></indexterm>
<programlisting language="C"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
gsk_transform_invert (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *self</parameter>);</programlisting>
<para>Inverts the given transform.</para>
<para>If <parameter>self</parameter>
 is not invertible, <link linkend="NULL:CAPS"><literal>NULL</literal></link> is returned.
Note that inverting <link linkend="NULL:CAPS"><literal>NULL</literal></link> also returns <link linkend="NULL:CAPS"><literal>NULL</literal></link>, which is
the correct inverse of <link linkend="NULL:CAPS"><literal>NULL</literal></link>. If you need to differentiate
between those cases, you should check <parameter>self</parameter>
 is not <link linkend="NULL:CAPS"><literal>NULL</literal></link>
before calling this function.</para>
<refsect3 id="gsk-transform-invert.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>Transform to invert. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>][<acronym>transfer full</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-transform-invert.returns" role="returns">
<title>Returns</title>
<para> The inverted transform or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the transform
cannot be inverted.</para>
</refsect3></refsect2>
<refsect2 id="gsk-transform-matrix" role="function">
<title>gsk_transform_matrix&#160;()</title>
<indexterm zone="gsk-transform-matrix"><primary>gsk_transform_matrix</primary></indexterm>
<programlisting language="C"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
gsk_transform_matrix (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *next</parameter>,
                      <parameter>const <link linkend="graphene-matrix-t"><type>graphene_matrix_t</type></link> *matrix</parameter>);</programlisting>
<para>Multiplies <parameter>next</parameter>
 with the given <parameter>matrix</parameter>
.</para>
<refsect3 id="gsk-transform-matrix.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>next</para></entry>
<entry role="parameter_description"><para>the next transform. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>][<acronym>transfer full</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>matrix</para></entry>
<entry role="parameter_description"><para>the matrix to multiply <parameter>next</parameter>
with</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-transform-matrix.returns" role="returns">
<title>Returns</title>
<para> The new transform</para>
</refsect3></refsect2>
<refsect2 id="gsk-transform-translate" role="function">
<title>gsk_transform_translate&#160;()</title>
<indexterm zone="gsk-transform-translate"><primary>gsk_transform_translate</primary></indexterm>
<programlisting language="C"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
gsk_transform_translate (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *next</parameter>,
                         <parameter>const <link linkend="graphene-point-t"><type>graphene_point_t</type></link> *point</parameter>);</programlisting>
<para>Translates <parameter>next</parameter>
 in 2dimensional space by <parameter>point</parameter>
.</para>
<refsect3 id="gsk-transform-translate.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>next</para></entry>
<entry role="parameter_description"><para>the next transform. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>][<acronym>transfer full</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>point</para></entry>
<entry role="parameter_description"><para>the point to translate the transform by</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-transform-translate.returns" role="returns">
<title>Returns</title>
<para> The new transform</para>
</refsect3></refsect2>
<refsect2 id="gsk-transform-translate-3d" role="function">
<title>gsk_transform_translate_3d&#160;()</title>
<indexterm zone="gsk-transform-translate-3d"><primary>gsk_transform_translate_3d</primary></indexterm>
<programlisting language="C"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
gsk_transform_translate_3d (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *next</parameter>,
                            <parameter>const <link linkend="graphene-point3d-t"><type>graphene_point3d_t</type></link> *point</parameter>);</programlisting>
<para>Translates <parameter>next</parameter>
 by <parameter>point</parameter>
.</para>
<refsect3 id="gsk-transform-translate-3d.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>next</para></entry>
<entry role="parameter_description"><para>the next transform. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>][<acronym>transfer full</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>point</para></entry>
<entry role="parameter_description"><para>the point to translate the transform by</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-transform-translate-3d.returns" role="returns">
<title>Returns</title>
<para> The new transform</para>
</refsect3></refsect2>
<refsect2 id="gsk-transform-rotate" role="function">
<title>gsk_transform_rotate&#160;()</title>
<indexterm zone="gsk-transform-rotate"><primary>gsk_transform_rotate</primary></indexterm>
<programlisting language="C"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
gsk_transform_rotate (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *next</parameter>,
                      <parameter><link linkend="float"><type>float</type></link> angle</parameter>);</programlisting>
<para>Rotates <parameter>next</parameter>
 <parameter>angle</parameter>
 degrees in 2D - or in 3Dspeak, around the z axis.</para>
<refsect3 id="gsk-transform-rotate.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>next</para></entry>
<entry role="parameter_description"><para>the next transform. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>][<acronym>transfer full</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>angle</para></entry>
<entry role="parameter_description"><para>the rotation angle, in degrees (clockwise)</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-transform-rotate.returns" role="returns">
<title>Returns</title>
<para> The new transform</para>
</refsect3></refsect2>
<refsect2 id="gsk-transform-rotate-3d" role="function">
<title>gsk_transform_rotate_3d&#160;()</title>
<indexterm zone="gsk-transform-rotate-3d"><primary>gsk_transform_rotate_3d</primary></indexterm>
<programlisting language="C"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
gsk_transform_rotate_3d (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *next</parameter>,
                         <parameter><link linkend="float"><type>float</type></link> angle</parameter>,
                         <parameter>const <link linkend="graphene-vec3-t"><type>graphene_vec3_t</type></link> *axis</parameter>);</programlisting>
<para>Rotates <parameter>next</parameter>
 <parameter>angle</parameter>
 degrees around <parameter>axis</parameter>
.</para>
<para>For a rotation in 2D space, use <link linkend="gsk-transform-rotate"><function>gsk_transform_rotate()</function></link>.</para>
<refsect3 id="gsk-transform-rotate-3d.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>next</para></entry>
<entry role="parameter_description"><para>the next transform. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>][<acronym>transfer full</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>angle</para></entry>
<entry role="parameter_description"><para>the rotation angle, in degrees (clockwise)</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>axis</para></entry>
<entry role="parameter_description"><para>The rotation axis</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-transform-rotate-3d.returns" role="returns">
<title>Returns</title>
<para> The new transform</para>
</refsect3></refsect2>
<refsect2 id="gsk-transform-scale" role="function">
<title>gsk_transform_scale&#160;()</title>
<indexterm zone="gsk-transform-scale"><primary>gsk_transform_scale</primary></indexterm>
<programlisting language="C"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
gsk_transform_scale (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *next</parameter>,
                     <parameter><link linkend="float"><type>float</type></link> factor_x</parameter>,
                     <parameter><link linkend="float"><type>float</type></link> factor_y</parameter>);</programlisting>
<para>Scales <parameter>next</parameter>
 in 2-dimensional space by the given factors.
Use <link linkend="gsk-transform-scale-3d"><function>gsk_transform_scale_3d()</function></link> to scale in all 3 dimensions.</para>
<refsect3 id="gsk-transform-scale.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>next</para></entry>
<entry role="parameter_description"><para>the next transform. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>][<acronym>transfer full</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>factor_x</para></entry>
<entry role="parameter_description"><para>scaling factor on the X axis</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>factor_y</para></entry>
<entry role="parameter_description"><para>scaling factor on the Y axis</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-transform-scale.returns" role="returns">
<title>Returns</title>
<para> The new transform</para>
</refsect3></refsect2>
<refsect2 id="gsk-transform-scale-3d" role="function">
<title>gsk_transform_scale_3d&#160;()</title>
<indexterm zone="gsk-transform-scale-3d"><primary>gsk_transform_scale_3d</primary></indexterm>
<programlisting language="C"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
gsk_transform_scale_3d (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *next</parameter>,
                        <parameter><link linkend="float"><type>float</type></link> factor_x</parameter>,
                        <parameter><link linkend="float"><type>float</type></link> factor_y</parameter>,
                        <parameter><link linkend="float"><type>float</type></link> factor_z</parameter>);</programlisting>
<para>Scales <parameter>next</parameter>
 by the given factors.</para>
<refsect3 id="gsk-transform-scale-3d.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>next</para></entry>
<entry role="parameter_description"><para>the next transform. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>][<acronym>transfer full</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>factor_x</para></entry>
<entry role="parameter_description"><para>scaling factor on the X axis</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>factor_y</para></entry>
<entry role="parameter_description"><para>scaling factor on the Y axis</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>factor_z</para></entry>
<entry role="parameter_description"><para>scaling factor on the Z axis</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-transform-scale-3d.returns" role="returns">
<title>Returns</title>
<para> The new transform</para>
</refsect3></refsect2>
<refsect2 id="gsk-transform-perspective" role="function">
<title>gsk_transform_perspective&#160;()</title>
<indexterm zone="gsk-transform-perspective"><primary>gsk_transform_perspective</primary></indexterm>
<programlisting language="C"><link linkend="GskTransform"><returnvalue>GskTransform</returnvalue></link>&#160;*
gsk_transform_perspective (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *next</parameter>,
                           <parameter><link linkend="float"><type>float</type></link> depth</parameter>);</programlisting>
<para>Applies a perspective projection transform. This transform
scales points in X and Y based on their Z value, scaling
points with positive Z values away from the origin, and
those with negative Z values towards the origin. Points
on the z=0 plane are unchanged.</para>
<refsect3 id="gsk-transform-perspective.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>next</para></entry>
<entry role="parameter_description"><para>the next transform. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>][<acronym>transfer full</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>depth</para></entry>
<entry role="parameter_description"><para>distance of the z=0 plane. Lower values give a more
flattened pyramid and therefore a more pronounced
perspective effect.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-transform-perspective.returns" role="returns">
<title>Returns</title>
<para> The new transform</para>
</refsect3></refsect2>
<refsect2 id="gsk-transform-equal" role="function">
<title>gsk_transform_equal&#160;()</title>
<indexterm zone="gsk-transform-equal"><primary>gsk_transform_equal</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gsk_transform_equal (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *first</parameter>,
                     <parameter><link linkend="GskTransform"><type>GskTransform</type></link> *second</parameter>);</programlisting>
<para>Checks two transforms for equality.</para>
<refsect3 id="gsk-transform-equal.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>first</para></entry>
<entry role="parameter_description"><para>the first transform</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>second</para></entry>
<entry role="parameter_description"><para>the second transform</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-transform-equal.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the two transforms peform the same operation.</para>
</refsect3></refsect2>
<refsect2 id="gsk-transform-transform-bounds" role="function">
<title>gsk_transform_transform_bounds&#160;()</title>
<indexterm zone="gsk-transform-transform-bounds"><primary>gsk_transform_transform_bounds</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gsk_transform_transform_bounds (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *self</parameter>,
                                <parameter>const <link linkend="graphene-rect-t"><type>graphene_rect_t</type></link> *rect</parameter>,
                                <parameter><link linkend="graphene-rect-t"><type>graphene_rect_t</type></link> *out_rect</parameter>);</programlisting>
<para>Transforms a <link linkend="graphene-rect-t"><type>graphene_rect_t</type></link> using the given transform <parameter>self</parameter>
.
The result is the bounding box containing the coplanar quad.</para>
<refsect3 id="gsk-transform-transform-bounds.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GskTransform"><type>GskTransform</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>rect</para></entry>
<entry role="parameter_description"><para>a <link linkend="graphene-rect-t"><type>graphene_rect_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>out_rect</para></entry>
<entry role="parameter_description"><para>return location for the bounds
of the transformed rectangle. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out caller-allocates</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gsk-transform-transform-point" role="function">
<title>gsk_transform_transform_point&#160;()</title>
<indexterm zone="gsk-transform-transform-point"><primary>gsk_transform_transform_point</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gsk_transform_transform_point (<parameter><link linkend="GskTransform"><type>GskTransform</type></link> *self</parameter>,
                               <parameter>const <link linkend="graphene-point-t"><type>graphene_point_t</type></link> *point</parameter>,
                               <parameter><link linkend="graphene-point-t"><type>graphene_point_t</type></link> *out_point</parameter>);</programlisting>
<para>Transforms a <link linkend="graphene-point-t"><type>graphene_point_t</type></link> using the given transform <parameter>self</parameter>
.</para>
<refsect3 id="gsk-transform-transform-point.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GskTransform"><type>GskTransform</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>point</para></entry>
<entry role="parameter_description"><para>a <link linkend="graphene-point-t"><type>graphene_point_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>out_point</para></entry>
<entry role="parameter_description"><para>return location for
the transformed point. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out caller-allocates</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="gsk4-GskTransform.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GskTransform" role="struct">
<title>GskTransform</title>
<indexterm zone="GskTransform"><primary>GskTransform</primary></indexterm>
<programlisting language="C">typedef struct _GskTransform GskTransform;</programlisting>
<para>The <literal>GskTransform</literal> structure contains only private data.</para>
</refsect2>
<refsect2 id="GskTransformCategory" role="enum">
<title>enum GskTransformCategory</title>
<indexterm zone="GskTransformCategory"><primary>GskTransformCategory</primary></indexterm>
<para>The categories of matrices relevant for GSK and GTK. Note that any
category includes matrices of all later categories. So if you want
to for example check if a matrix is a 2D matrix,
<literal>category &amp;gt;= GSK_TRANSFORM_CATEGORY_2D</literal> is the way to do this.</para>
<para>Also keep in mind that rounding errors may cause matrices to not
conform to their categories. Otherwise, matrix operations done via
mutliplication will not worsen categories. So for the matrix
multiplication <literal>C = A * B</literal>, <literal>category(C) = MIN (category(A), category(B))</literal>.</para>
<refsect3 id="GskTransformCategory.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="GSK-TRANSFORM-CATEGORY-UNKNOWN:CAPS">GSK_TRANSFORM_CATEGORY_UNKNOWN</para></entry>
<entry role="enum_member_description"><para>The category of the matrix has not been
determined.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GSK-TRANSFORM-CATEGORY-ANY:CAPS">GSK_TRANSFORM_CATEGORY_ANY</para></entry>
<entry role="enum_member_description"><para>Analyzing the matrix concluded that it does
not fit in any other category.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GSK-TRANSFORM-CATEGORY-3D:CAPS">GSK_TRANSFORM_CATEGORY_3D</para></entry>
<entry role="enum_member_description"><para>The matrix is a 3D matrix. This means that
the w column (the last column) has the values (0, 0, 0, 1).</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GSK-TRANSFORM-CATEGORY-2D:CAPS">GSK_TRANSFORM_CATEGORY_2D</para></entry>
<entry role="enum_member_description"><para>The matrix is a 2D matrix. This is equivalent
to <link linkend="graphene-matrix-is-2d"><function>graphene_matrix_is_2d()</function></link> returning <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>. In particular, this
means that Cairo can deal with the matrix.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GSK-TRANSFORM-CATEGORY-2D-AFFINE:CAPS">GSK_TRANSFORM_CATEGORY_2D_AFFINE</para></entry>
<entry role="enum_member_description"><para>The matrix is a combination of 2D scale
and 2D translation operations. In particular, this means that any
rectangle can be transformed exactly using this matrix.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GSK-TRANSFORM-CATEGORY-2D-TRANSLATE:CAPS">GSK_TRANSFORM_CATEGORY_2D_TRANSLATE</para></entry>
<entry role="enum_member_description"><para>The matrix is a 2D translation.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GSK-TRANSFORM-CATEGORY-IDENTITY:CAPS">GSK_TRANSFORM_CATEGORY_IDENTITY</para></entry>
<entry role="enum_member_description"><para>The matrix is the identity matrix.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>

</refentry>
