File: //home/arjun/projects/env/lib/python3.10/site-packages/cairocffi/__pycache__/matrix.cpython-310.pyc
o
*weY � @ s, d Z ddlmZmZmZ G dd� de�ZdS )z�
cairocffi.matrix
~~~~~~~~~~~~~~~~
Transformation matrices.
:copyright: Copyright 2013-2019 by Simon Sapin
:license: BSD, see LICENSE for details.
� )�
_check_status�cairo�ffic @ s� e Zd ZdZd/dd�Zedd� �Zdd � Zd
d� Zdd
� Z dd� Z
dd� Zdd� Zdd� Z
dd� ZeZdd� Zd0dd�Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zed)�Zed*�Zed+�Zed,�Zed-�Zed.�Z[dS )1�Matrixa A 2D transformation matrix.
Matrices are used throughout cairo to convert between
different coordinate spaces.
A :class:`Matrix` holds an affine transformation,
such as a scale, rotation, shear, or a combination of these.
The transformation of a point (x,y) is given by::
x_new = xx * x + xy * y + x0
y_new = yx * x + yy * y + y0
The current transformation matrix of a :class:`Context`,
represented as a :class:`Matrix`,
defines the transformation from user-space coordinates
to device-space coordinates.
See :meth:`Context.get_matrix` and :meth:`Context.set_matrix`.
The default values produce an identity matrix.
Matrices can be compared with ``m1 == m2`` and ``m2 != m2``
as well as multiplied with ``m3 = m1 * m2``.
r � c C s( t �d�| _t�| j||||||� d S )Nzcairo_matrix_t *)r �new�_pointerr �cairo_matrix_init)�self�xx�yx�xy�yy�x0�y0� r �I/home/arjun/projects/env/lib/python3.10/site-packages/cairocffi/matrix.py�__init__'