M44

class M44

4x4 matrix used by Canvas and other parts of Skia.

Skia assumes a right-handed coordinate system: +X goes to the right +Y goes down +Z goes into the screen (away from the viewer)

Methods

ColMajor

Cols

LookAt

Perspective

RectToRect

Rotate

RowMajor

Rows

Scale

Translate

__init__

Overloaded function.

asM33

isFinite

normalizePerspective

postConcat

postTranslate

preConcat

Overloaded function.

preScale

Overloaded function.

preTranslate

rc

Returns one matrix value from a particular row/column.

setConcat

setIdentity

setRC

Set one matrix value at a particular row/column.

setRotate

setRotateUnit

setRotateUnitSinCos

setScale

setTranslate

Methods

static M44.ColMajor(c: SupportsFloat | SupportsIndex) → skia.M44
static M44.Cols(c0: SkV4, c1: SkV4, c2: SkV4, c3: SkV4) → skia.M44
static M44.LookAt(eye: SkV3, center: SkV3, up: SkV3) → skia.M44
static M44.Perspective(near: SupportsFloat | SupportsIndex, far: SupportsFloat | SupportsIndex, angle: SupportsFloat | SupportsIndex) → skia.M44
static M44.RectToRect(src: skia.Rect, dst: skia.Rect) → skia.M44
static M44.Rotate(axis: SkV3, radians: SupportsFloat | SupportsIndex) → skia.M44
static M44.RowMajor(r: SupportsFloat | SupportsIndex) → skia.M44
static M44.Rows(r0: SkV4, r1: SkV4, r2: SkV4, r3: SkV4) → skia.M44
static M44.Scale(x: SupportsFloat | SupportsIndex, y: SupportsFloat | SupportsIndex, z: SupportsFloat | SupportsIndex = 1) → skia.M44
static M44.Translate(x: SupportsFloat | SupportsIndex, y: SupportsFloat | SupportsIndex, z: SupportsFloat | SupportsIndex = 0) → skia.M44
M44.__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: skia.M44) -> None

  2. __init__(self: skia.M44, src: skia.Matrix) -> None

  3. __init__(self: skia.M44, a: skia.M44, b: skia.M44) -> None

M44.asM33(self: skia.M44) → skia.Matrix
M44.isFinite(self: skia.M44) → bool
M44.normalizePerspective(self: skia.M44) → None
M44.postConcat(self: skia.M44, m: skia.M44) → skia.M44
M44.postTranslate(self: skia.M44, x: SupportsFloat | SupportsIndex, y: SupportsFloat | SupportsIndex, z: SupportsFloat | SupportsIndex = 0) → skia.M44
M44.preConcat(*args, **kwargs)

Overloaded function.

  1. preConcat(self: skia.M44, m: skia.M44) -> skia.M44

  2. preConcat(self: skia.M44, m: skia.Matrix) -> skia.M44

M44.preScale(*args, **kwargs)

Overloaded function.

  1. preScale(self: skia.M44, x: typing.SupportsFloat | typing.SupportsIndex, y: typing.SupportsFloat | typing.SupportsIndex) -> skia.M44

  2. preScale(self: skia.M44, x: typing.SupportsFloat | typing.SupportsIndex, y: typing.SupportsFloat | typing.SupportsIndex, z: typing.SupportsFloat | typing.SupportsIndex) -> skia.M44

M44.preTranslate(self: skia.M44, x: SupportsFloat | SupportsIndex, y: SupportsFloat | SupportsIndex, z: SupportsFloat | SupportsIndex = 0) → skia.M44
M44.rc(self: skia.M44, r: SupportsInt | SupportsIndex, c: SupportsInt | SupportsIndex) → float

Returns one matrix value from a particular row/column.

Parameters:
  • r – matrix row to fetch

  • c – matrix column to fetch

Returns:

value at the given matrix position

M44.setConcat(self: skia.M44, a: skia.M44, b: skia.M44) → skia.M44
M44.setIdentity(self: skia.M44) → skia.M44
M44.setRC(self: skia.M44, r: SupportsInt | SupportsIndex, c: SupportsInt | SupportsIndex, value: SupportsFloat | SupportsIndex) → None

Set one matrix value at a particular row/column.

Parameters:
  • r – matrix row to set

  • c – matrix column to set

  • value – value to set

M44.setRotate(self: skia.M44, axis: SkV3, radians: SupportsFloat | SupportsIndex) → skia.M44
M44.setRotateUnit(self: skia.M44, axis: SkV3, radians: SupportsFloat | SupportsIndex) → skia.M44
M44.setRotateUnitSinCos(self: skia.M44, axis: SkV3, sinAngle: SupportsFloat | SupportsIndex, cosAngle: SupportsFloat | SupportsIndex) → skia.M44
M44.setScale(self: skia.M44, x: SupportsFloat | SupportsIndex, y: SupportsFloat | SupportsIndex, z: SupportsFloat | SupportsIndex = 1) → skia.M44
M44.setTranslate(self: skia.M44, x: SupportsFloat | SupportsIndex, y: SupportsFloat | SupportsIndex, z: SupportsFloat | SupportsIndex = 0) → skia.M44