FixImage Documentation

Back to summary

import "image/image";

Transform class

Represents linear 2D transformation.

Members

var m00: Float;
var m01: Float;
var m02: Float;
var m10: Float;
var m11: Float;
var m12: Float;
These represent the values of the transformation matrix. The first number is row and the second is column.

Initialization

static function create(): Transform
Creates an identity transform.

Operations

function reset()
Resets back to identity transform.
function mul(tr: Transform)
Multiplies this transform with another.
function mul(tr1: Transform, tr2: Transform)
Stores multiplication of two transforms.
function invert()
Inverts this transform.
function invert(tr: Transform)
Stores invertion of another transform.
function translate(tx: Float, ty: Float)
Multiplies this transform with translation transform.
function rotate(angle: Float)
Multiplies this transform with rotate transform.
function scale(scale: Float)
function scale(sx: Float, sy: Float)
Multiplies this transform with scale transform.
function shear(sx: Float, sy: Float)
Multiplies this transform with shear transform.
function transform_x(x: Float, y: Float): Float
function transform_y(x: Float, y: Float): Float
Returns transformed X and Y coordinates.