MMatrix

data class MMatrix(var a: Double = 1.0, var b: Double = 0.0, var c: Double = 0.0, var d: Double = 1.0, var tx: Double = 0.0, var ty: Double = 0.0) : MutableInterpolable<MMatrix> , Interpolable<MMatrix>

Deprecated

Use Matrix

Constructors

Link copied to clipboard
constructor(a: Double = 1.0, b: Double = 0.0, c: Double = 0.0, d: Double = 1.0, tx: Double = 0.0, ty: Double = 0.0)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class Computed(val matrix: MMatrix, val transform: MMatrix.Transform)
Link copied to clipboard
data class Transform(var x: Double = 0.0, var y: Double = 0.0, var scaleX: Double = 1.0, var scaleY: Double = 1.0, var skewX: Angle = 0.radians, var skewY: Angle = 0.radians, var rotation: Angle = 0.radians) : MutableInterpolable<MMatrix.Transform> , Interpolable<MMatrix.Transform>

Properties

Link copied to clipboard
var a: Double
Link copied to clipboard
var af: Float
Link copied to clipboard
var b: Double
Link copied to clipboard
var bf: Float
Link copied to clipboard
var c: Double
Link copied to clipboard
var cf: Float
Link copied to clipboard
var d: Double
Link copied to clipboard
var df: Float
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var tx: Double
Link copied to clipboard
var txf: Float
Link copied to clipboard
var ty: Double
Link copied to clipboard
var tyf: Float

Functions

Link copied to clipboard
fun clone(): MMatrix
Link copied to clipboard
fun concat(value: MMatrix): MMatrix
Link copied to clipboard
fun copyFrom(that: MMatrix?): MMatrix
fun copyFrom(that: Matrix): MMatrix
Link copied to clipboard
fun copyFromArray(value: DoubleArray, offset: Int = 0): MMatrix
fun copyFromArray(value: FloatArray, offset: Int = 0): MMatrix
Link copied to clipboard
Link copied to clipboard
fun copyTo(that: MMatrix = MMatrix()): MMatrix
Link copied to clipboard
Link copied to clipboard
fun deltaTransformPoint(point: MPoint, out: MPoint = MPoint()): MPoint

Transform point without translation

fun deltaTransformPoint(x: Double, y: Double, out: MPoint = MPoint()): MPoint
fun deltaTransformPoint(x: Float, y: Float, out: MPoint = MPoint()): MPoint
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun interpolateWith(ratio: Ratio, other: MMatrix): MMatrix
Link copied to clipboard
fun invert(matrixToInvert: MMatrix = this): MMatrix
Link copied to clipboard
fun inverted(out: MMatrix = MMatrix()): MMatrix
Link copied to clipboard
fun isAlmostEquals(other: MMatrix, epsilon: Double = 1.0E-6): Boolean
Link copied to clipboard
Link copied to clipboard
inline fun <T> keepMatrix(callback: (MMatrix) -> T): T
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun premultiply(la: Double, lb: Double, lc: Double, ld: Double, ltx: Double, lty: Double): MMatrix
fun premultiply(la: Float, lb: Float, lc: Float, ld: Float, ltx: Float, lty: Float): MMatrix
fun premultiply(la: Int, lb: Int, lc: Int, ld: Int, ltx: Int, lty: Int): MMatrix
Link copied to clipboard
fun prerotate(angle: Angle): MMatrix
Link copied to clipboard
fun prescale(sx: Double, sy: Double = sx): MMatrix
fun prescale(sx: Float, sy: Float = sx): MMatrix
fun prescale(sx: Int, sy: Int = sx): MMatrix
Link copied to clipboard
fun preskew(skewX: Angle, skewY: Angle): MMatrix
Link copied to clipboard
Link copied to clipboard
fun rotate(angle: Angle): MMatrix
Link copied to clipboard
fun scale(sx: Double, sy: Double = sx): MMatrix
fun scale(sx: Float, sy: Float = sx): MMatrix
fun scale(sx: Int, sy: Int = sx): MMatrix
Link copied to clipboard
fun setTo(a: Double, b: Double, c: Double, d: Double, tx: Double, ty: Double): MMatrix
fun setTo(a: Float, b: Float, c: Float, d: Float, tx: Float, ty: Float): MMatrix
fun setTo(a: Int, b: Int, c: Int, d: Int, tx: Int, ty: Int): MMatrix
Link copied to clipboard
open override fun setToInterpolated(ratio: Ratio, l: MMatrix, r: MMatrix): MMatrix
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun setTransform(transform: MMatrix.Transform, pivotX: Double = 0.0, pivotY: Double = 0.0): MMatrix
fun setTransform(x: Float = 0.0f, y: Float = 0.0f, scaleX: Float = 1.0f, scaleY: Float = 1.0f, rotation: Angle = Angle.ZERO, skewX: Angle = Angle.ZERO, skewY: Angle = Angle.ZERO): MMatrix
fun setTransform(x: Double = 0.0, y: Double = 0.0, scaleX: Double = 1.0, scaleY: Double = 1.0, rotation: Angle = Angle.ZERO, skewX: Angle = Angle.ZERO, skewY: Angle = Angle.ZERO, pivotX: Double = 0.0, pivotY: Double = 0.0): MMatrix
Link copied to clipboard
fun skew(skewX: Angle, skewY: Angle): MMatrix
Link copied to clipboard
operator fun times(that: MMatrix): MMatrix
operator fun times(scale: Double): MMatrix
Link copied to clipboard
fun MMatrix.toMatrix4(out: MMatrix4 = MMatrix3D()): MMatrix4
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
Link copied to clipboard
fun transform(p: MPoint, out: MPoint = MPoint()): MPoint
fun transform(px: Double, py: Double, out: MPoint = MPoint()): MPoint
fun transform(px: Float, py: Float, out: MPoint = MPoint()): MPoint
fun transform(px: Int, py: Int, out: MPoint = MPoint()): MPoint
Link copied to clipboard
fun transformRectangle(rectangle: MRectangle, delta: Boolean = false)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun translate(dx: Float, dy: Float): MMatrix
fun translate(dx: Int, dy: Int): MMatrix