skia
    Preparing search index...

    Interface Matrix3x3Helpers

    TODO(kjlubick) Make this API return Float32Arrays

    interface Matrix3x3Helpers {
        identity(): number[];
        invert(m: number[] | Matrix3x3): number[] | null;
        mapPoints(m: number[] | Matrix3x3, points: number[]): number[];
        multiply(...matrices: (number[] | Matrix3x3)[]): number[];
        rotated(radians: number, px?: number, py?: number): number[];
        scaled(sx: number, sy: number, px?: number, py?: number): number[];
        skewed(kx: number, ky: number, px?: number, py?: number): number[];
        translated(dx: number, dy: number): number[];
    }
    Index

    Methods

    • Returns a new identity 3x3 matrix.

      Returns number[]

    • Returns the inverse of the given 3x3 matrix or null if it is not invertible.

      Parameters

      Returns number[] | null

    • Maps the given 2d points according to the given 3x3 matrix.

      Parameters

      • m: number[] | Matrix3x3
      • points: number[]

        the flattened points to map; the results are computed in place on this array.

      Returns number[]

    • Multiplies the provided 3x3 matrices together from left to right.

      Parameters

      Returns number[]

    • Returns a new 3x3 matrix representing a rotation by n radians.

      Parameters

      • radians: number
      • Optionalpx: number

        the X value to rotate around, defaults to 0.

      • Optionalpy: number

        the Y value to rotate around, defaults to 0.

      Returns number[]

    • Returns a new 3x3 matrix representing a scale in the x and y directions.

      Parameters

      • sx: number

        the scale in the X direction.

      • sy: number

        the scale in the Y direction.

      • Optionalpx: number

        the X value to scale from, defaults to 0.

      • Optionalpy: number

        the Y value to scale from, defaults to 0.

      Returns number[]

    • Returns a new 3x3 matrix representing a scale in the x and y directions.

      Parameters

      • kx: number

        the kurtosis in the X direction.

      • ky: number

        the kurtosis in the Y direction.

      • Optionalpx: number

        the X value to skew from, defaults to 0.

      • Optionalpy: number

        the Y value to skew from, defaults to 0.

      Returns number[]

    • Returns a new 3x3 matrix representing a translation in the x and y directions.

      Parameters

      • dx: number
      • dy: number

      Returns number[]