1module Transform2D where
2{-| A library for performing [2D matrix transformations](http://en.wikipedia.org/wiki/Transformation_matrix#Affine_transformations).
3It is used primarily with the `groupTransform` function from `Graphics.Collage` and
4allows you to do things like rotation, scaling, translation, shearing, and reflection.
7@docs identity, matrix, rotation
13import Native.Transform2D
15data Transform2D = Transform2D
17{-| Create an identity transform. Transforming by the identity does
18not change anything, but it can come in handy as a default or
25identity = Native.Transform2D.identity
27{-| Creates a transformation matrix. This lets you create transforms
28such as scales, shears, reflections, and translations.
35And `dx` and `dy` are the translation values.
37matrix : Float -> Float -> Float -> Float -> Float -> Float -> Transform2D
38matrix = Native.Transform2D.matrix
40{-| Creates a [rotation matrix](http://en.wikipedia.org/wiki/Rotation_matrix).
41Given an angle t, it creates a counterclockwise rotation matrix:
46rotation : Float -> Transform2D
47rotation = Native.Transform2D.rotation
49{-| Multiplies two transforms together:
53 / a11 a12 \ . / b11 b12 \
54 \ a21 a22 / \ b21 b22 /
56multiply : Transform2D -> Transform2D -> Transform2D
57multiply = Native.Transform2D.multiply
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list