Mlpost.Transform
Apply linear transformations to objects in Mlpost
Transformations are an important way to modify objects in Mlpost. Objects can be scaled, shifted, rotated, etc, and any combination of these transformations is possible. Currently, transformations can be applied to Pictures, Pens and Paths.
val rotated : float -> t'
Scale an object by a constant factor.
Rotate an object by an angle given in degrees
Rotate an object by an angle given in degrees
Shift an object with respect to a point
Shift an object with respect to a point
Slant an object: the point (x,y)
becomes (x+ay,y)
, with slanting factor a
Slant an object: the point (x,y)
becomes (x+ay,y)
, with slanting factor a
Scale an object by a constant factor, but only in the x
direction
Scale an object by a constant factor, but only in the x
direction
Scale an object by a constant factor, but only in the y
direction
Scale an object by a constant factor, but only in the y
direction
Zscaled multiplies points of the object by the given point, using "complex" multiplication: (x,y) * (a,b) = (ax - by, bx + ay)
; its effect is to rotate and scale so as to map (1,0)
into (a,b)
Zscaled multiplies points of the object by the given point, using "complex" multiplication: (x,y) * (a,b) = (ax - by, bx + ay)
; its effect is to rotate and scale so as to map (1,0)
into (a,b)
Reflect an object with respect to the line that goes through the two given points
Reflect an object with respect to the line that goes through the two given points
Rotate an object by an angle given in degrees, around a given point
type matrix = Ctypes.matrix
type t = t' list
A transformation is a list of single transformations
val id : t
The identity transformation