1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
psMat
=====
.. default-domain:: py
.. module:: psMat
:synopsis: Provides quick access to some useful transformations expressed as PostScript matrices
.. function:: identity()
returns an identity matrix as a 6 element tuple
.. function:: compose(mat1, mat2)
returns a matrix which is the composition of the two input transformations
.. function:: inverse(mat)
returns a matrix which is the inverse of the input transformation.
(Note: There will not always be an inverse)
.. function:: rotate(theta)
returns a matrix which will rotate by ``theta``. ``theta`` is expressed
in radians
.. function:: scale(x[, y])
returns a matrix which will scale by ``x`` in the horizontal direction and
``y`` in the vertical. If ``y`` is omitted, it will scale by the same
amount (``x``) in both directions
.. function:: skew(theta)
returns a matrix which will skew by ``theta`` (to produce an oblique font).
``theta`` is expressed in radians
.. function:: translate(x, y)
returns a matrix which will translate by ``x`` in the horizontal direction
and ``y`` in the vertical
|