class PF2d::Transform
- PF2d::Transform
- Reference
- Object
Defined in:
pf2d/transform.crConstructors
Class Method Summary
- .identity
-
.invert(matrix : PF2d::Matrix)
Return a new inverted version of the given matrix
-
.rotation(angle : Number)
Returns a matrix representing a 2d rotation
-
.scale(x : Number, y : Number)
Returns a matrix representing a 2d scaling
-
.shear(x : Number, y : Number)
Returns a matrix representing a 2d shear
-
.translation(x : Number, y : Number)
Returns a matrix representing a 2d translation
Instance Method Summary
- #apply(x : Number, y : Number)
- #apply(point : PF2d::Vec)
-
#bounding_box(x : Number, y : Number)
Return the boudning box of the current transformation matrix
-
#invert
Invert the transformation
- #matrix : PF2d::Matrix(Float64, 9)
- #matrix=(matrix : PF2d::Matrix(Float64, 9))
-
#reset
Reset the transformation to the identity matrix
-
#rotate(angle : Number)
Rotate by angle (in radians)
-
#scale(x : Number, y : Number)
Scale by x and y
-
#scale(n : Number)
Scale both x and y by n
-
#scale(point : PF2d::Vec)
ditto
-
#shear(x : Number, y : Number)
Shear by x and y
-
#shear(point : PF2d::Vec)
ditto
-
#translate(x : Number, y : Number)
Translate by x and y
-
#translate(point : PF2d::Vec)
ditto
Constructor Detail
Class Method Detail
Instance Method Detail
def bounding_box(x : Number, y : Number)
#
Return the boudning box of the current transformation matrix