-
Notifications
You must be signed in to change notification settings - Fork 8
Transform
Christopher Nikkel edited this page Sep 4, 2017
·
3 revisions
type Transform =
| Matrix of A: Length * B: Length * C: Length * D: Length * E: Length * F: Length
| Translate of X: Length * Y: Length option
| Scale of X: Length * Y: Length option
| Rotate of Angle: float * Point: ((Length * Length) option)
| SkewX of Angle: float
| SkewY of Angle: float
Transform
is used to create a SVG transform.
Function | Signature | Description |
---|---|---|
Transform.createMatrix |
Length * Length * Length * Length * Length * Length -> Transform |
create a matrix transform |
Transform.createTranslate |
Length -> Transform |
create a translation transform |
Transform.createScale |
Length -> Transform |
create a scale transform |
Transform.createRotate |
float -> (Length * Length) option -> Transform |
create a rotate transform |
Transform.createSkewX |
float -> Transform |
create a transform to skew the X axis |
Transform.createSkewY |
float -> Transform |
create a transform to skew the Y axis |
Transform.withX |
Length -> Transform -> Transform |
used with rotate to add a X attribute |
Transform.withY |
Length -> Transform -> Transform |
used with rotate, scale, and translate to add a Y attribute |
Transform.toString |
Transform -> string |
converts the transform to a string |