.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2017 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.lib.graphics

.. highlight:: python



.. _wx.lib.graphics.GraphicsMatrix:

==========================================================================================================================================
|phoenix_title|  **wx.lib.graphics.GraphicsMatrix**
==========================================================================================================================================

A matrix holds an affine transformations, such as a scale,
rotation, shear, or a combination of these, and is used to convert
between different coordinate spaces.



|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>GraphicsMatrix</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.graphics.GraphicsMatrix_inheritance.png" alt="Inheritance diagram of GraphicsMatrix" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.graphics.GraphicsObject.html" title="Base class for the other ``Graphics*`` classes." alt="" coords="5,5,220,35"/> <area shape="rect" id="node2" href="wx.lib.graphics.GraphicsMatrix.html" title="A matrix holds an affine transformations, such as a scale," alt="" coords="6,83,219,112"/> </map> 
   </p>

|


|super_classes| Known Superclasses
==================================

:class:`wx.lib.graphics.GraphicsObject`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.graphics.GraphicsMatrix.__init__`                                 
:meth:`~wx.lib.graphics.GraphicsMatrix.Clone`                                    
:meth:`~wx.lib.graphics.GraphicsMatrix.Concat`                                   Concatenates the matrix passed with the current matrix.
:meth:`~wx.lib.graphics.GraphicsMatrix.Get`                                      Return the component values of the matrix as a tuple.
:meth:`~wx.lib.graphics.GraphicsMatrix.GetNativeMatrix`                          
:meth:`~wx.lib.graphics.GraphicsMatrix.Invert`                                   Inverts the matrix.
:meth:`~wx.lib.graphics.GraphicsMatrix.IsEqual`                                  Returns ``True`` if the elements of the transformation matrices are equal.
:meth:`~wx.lib.graphics.GraphicsMatrix.IsIdentity`                               Returns ``True`` if this is the identity matrix.
:meth:`~wx.lib.graphics.GraphicsMatrix.Rotate`                                   Rotates the matrix in radians
:meth:`~wx.lib.graphics.GraphicsMatrix.Scale`                                    Scale the matrix
:meth:`~wx.lib.graphics.GraphicsMatrix.Set`                                      Set the components of the matrix by value, default values
:meth:`~wx.lib.graphics.GraphicsMatrix.TransformDistance`                        Applies this matrix to a distance (ie. performs all transforms
:meth:`~wx.lib.graphics.GraphicsMatrix.TransformPoint`                           Applies this matrix to a point and returns the result
:meth:`~wx.lib.graphics.GraphicsMatrix.Translate`                                Translate the matrix.  This shifts the origin.
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: GraphicsMatrix(GraphicsObject)

   A matrix holds an affine transformations, such as a scale,
   rotation, shear, or a combination of these, and is used to convert
   between different coordinate spaces.

   .. method:: __init__(self)


   .. method:: Clone(self)


   .. method:: Concat(self, matrix)

      Concatenates the matrix passed with the current matrix.


   .. method:: Get(self)

      Return the component values of the matrix as a tuple.


   .. method:: GetNativeMatrix(self)


   .. method:: Invert(self)

      Inverts the matrix.


   .. method:: IsEqual(self, matrix)

      Returns ``True`` if the elements of the transformation matrices are equal.


   .. method:: IsIdentity(self)

      Returns ``True`` if this is the identity matrix.


   .. method:: Rotate(self, angle)

      Rotates the matrix in radians


   .. method:: Scale(self, xScale, yScale)

      Scale the matrix


   .. method:: Set(self, a=1.0, b=0.0, c=0.0, d=1.0, tx=0.0, ty=0.0)

      Set the components of the matrix by value, default values
      are the identity matrix.


   .. method:: TransformDistance(self, dx, dy)

      Applies this matrix to a distance (ie. performs all transforms
      except translations.)


   .. method:: TransformPoint(self, x, y)

      Applies this matrix to a point and returns the result


   .. method:: Translate(self, dx, dy)

      Translate the matrix.  This shifts the origin.


