Debian Codegraph @

doc/sphinx/scripting/python/psMat.rst

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