Matrix
- class Matrix
Matrixholds a 3x3 matrix for transforming coordinates.This allows mapping
Pointand vectors with translation, scaling, skewing, rotation, and perspective.Matrixelements are in row major order.Matrixdoes not have a constructor, so it must be explicitly initialized.setIdentity()initializesMatrixso it has no effect.setTranslate(),setScale(),setSkew(),setRotate(),set9()andsetAll()initializes allMatrixelements with the corresponding mapping.Matrixincludes a hidden variable that classifies the type of matrix to improve performance.Matrixis not thread safe unless getType() is called first.Classes
Members:
Members:
Methods
Concat(a: skia.Matrix, b: skia.Matrix) -> skia.Matrix
I() -> skia.Matrix
InvalidMatrix() -> skia.Matrix
MakeAll(scaleX: float, skewX: float, transX: float, skewY: float, scaleY: float, transY: float, pers0: float, pers1: float, pers2: float) -> skia.Matrix
MakeRectToRect(src: skia.Rect, dst: skia.Rect, stf: skia.Matrix.ScaleToFit) -> skia.Matrix
RotateRad(rad: float) -> skia.Matrix
Scale(sx: float, sy: float) -> skia.Matrix
SetAffineIdentity() -> list[float]
asAffine(self: skia.Matrix) -> object
decomposeScale(self: skia.Matrix, scale: skia.Size, remaining: skia.Matrix) -> bool
dirtyMatrixTypeCache(self: skia.Matrix) -> None
dump(self: skia.Matrix) -> None
get(self: skia.Matrix, index: int) -> float
get9(self: skia.Matrix) -> list[float]
getMaxScale(self: skia.Matrix) -> float
getMinMaxScales(self: skia.Matrix) -> tuple
getMinScale(self: skia.Matrix) -> float
getPerspX(self: skia.Matrix) -> float
getPerspY(self: skia.Matrix) -> float
getScaleX(self: skia.Matrix) -> float
getScaleY(self: skia.Matrix) -> float
getSkewX(self: skia.Matrix) -> float
getSkewY(self: skia.Matrix) -> float
getTranslateX(self: skia.Matrix) -> float
getTranslateY(self: skia.Matrix) -> float
getType(self: skia.Matrix) -> skia.Matrix.TypeMask
hasPerspective(self: skia.Matrix) -> bool
invert(self: skia.Matrix, inverse: skia.Matrix) -> bool
isFinite(self: skia.Matrix) -> bool
isIdentity(self: skia.Matrix) -> bool
isScaleTranslate(self: skia.Matrix) -> bool
isSimilarity(self: skia.Matrix, tol: float = 0.000244140625) -> bool
isTranslate(self: skia.Matrix) -> bool
mapPoints(self: skia.Matrix, pts: list[skia.Point]) -> list[skia.Point]
mapRadius(self: skia.Matrix, radius: float) -> float
mapRect(self: skia.Matrix, src: skia.Rect, pc: skia.ApplyPerspectiveClip = skia.ApplyPerspectiveClip.kYes) -> skia.Rect
mapRectScaleTranslate(self: skia.Matrix, src: skia.Rect) -> skia.Rect
mapRectToQuad(self: skia.Matrix, rect: skia.Rect) -> list[skia.Point]
mapVector(self: skia.Matrix, dx: float, dy: float) -> skia.Point
mapVectors(self: skia.Matrix, src: list[skia.Point]) -> list[skia.Point]
mapXY(self: skia.Matrix, x: float, y: float) -> skia.Point
normalizePerspective(self: skia.Matrix) -> None
postConcat(self: skia.Matrix, other: skia.Matrix) -> skia.Matrix
postTranslate(self: skia.Matrix, dx: float, dy: float) -> skia.Matrix
preConcat(self: skia.Matrix, other: skia.Matrix) -> skia.Matrix
preTranslate(self: skia.Matrix, dx: float, dy: float) -> skia.Matrix
preservesAxisAlignment(self: skia.Matrix) -> bool
preservesRightAngles(self: skia.Matrix, tol: float = 0.000244140625) -> bool
rc(self: skia.Matrix, r: int, c: int) -> float
rectStaysRect(self: skia.Matrix) -> bool
reset(self: skia.Matrix) -> skia.Matrix
set(self: skia.Matrix, index: int, value: float) -> None
set9(self: skia.Matrix, buffer: list[float]) -> skia.Matrix
setAffine(self: skia.Matrix, affine: list[float]) -> skia.Matrix
setAll(self: skia.Matrix, scaleX: float, skewX: float, transX: float, skewY: float, scaleY: float, transY: float, persp0: float, persp1: float, persp2: float) -> skia.Matrix
setConcat(self: skia.Matrix, a: skia.Matrix, b: skia.Matrix) -> skia.Matrix
setIdentity(self: skia.Matrix) -> skia.Matrix
setPerspX(self: skia.Matrix, v: float) -> skia.Matrix
setPerspY(self: skia.Matrix, v: float) -> skia.Matrix
setPolyToPoly(self: skia.Matrix, src: list[skia.Point], dst: list[skia.Point]) -> bool
setRSXform(self: skia.Matrix, rsxForm: SkRSXform) -> skia.Matrix
setRectToRect(self: skia.Matrix, src: skia.Rect, dst: skia.Rect, stf: skia.Matrix.ScaleToFit) -> bool
setScaleTranslate(self: skia.Matrix, sx: float, sy: float, tx: float, ty: float) -> None
setScaleX(self: skia.Matrix, v: float) -> skia.Matrix
setScaleY(self: skia.Matrix, v: float) -> skia.Matrix
setSkewX(self: skia.Matrix, v: float) -> skia.Matrix
setSkewY(self: skia.Matrix, v: float) -> skia.Matrix
setTranslateX(self: skia.Matrix, v: float) -> skia.Matrix
setTranslateY(self: skia.Matrix, v: float) -> skia.Matrix
Attributes
Methods
- static Matrix.Concat(a: skia.Matrix, b: skia.Matrix) skia.Matrix
Returns
Matrixa multiplied byMatrixb.Given:
| A B C | | J K L | a = | D E F |, b = | M N O | | G H I | | P Q R |
sets
Matrixto:| A B C | | J K L | | AJ+BM+CP AK+BN+CQ AL+BO+CR | a * b = | D E F | * | M N O | = | DJ+EM+FP DK+EN+FQ DL+EO+FR | | G H I | | P Q R | | GJ+HM+IP GK+HN+IQ GL+HO+IR |
- Parameters:
a (skia.Matrix) –
Matrixon left side of multiply expressionb (skia.Matrix) –
Matrixon right side of multiply expression
- Returns:
Matrixcomputed from a times b
- static Matrix.I() skia.Matrix
Returns reference to const identity
Matrix.Returned
Matrixis set to:1 0 0 |0 1 0 |0 0 1 |- Returns:
const identity
Matrix
- static Matrix.InvalidMatrix() skia.Matrix
Returns reference to a const
Matrixwith invalid values.Returned
Matrixis set to:SK_ScalarMax SK_ScalarMax SK_ScalarMax |SK_ScalarMax SK_ScalarMax SK_ScalarMax |SK_ScalarMax SK_ScalarMax SK_ScalarMax |- Returns:
const invalid
Matrix
- static Matrix.MakeAll(scaleX: float, skewX: float, transX: float, skewY: float, scaleY: float, transY: float, pers0: float, pers1: float, pers2: float) skia.Matrix
Sets
Matrixto:| scaleX skewX transX | | skewY scaleY transY | | pers0 pers1 pers2 |
- Parameters:
scaleX (float) – horizontal scale factor
skewX (float) – horizontal skew factor
transX (float) – horizontal translation
skewY (float) – vertical skew factor
scaleY (float) – vertical scale factor
transY (float) – vertical translation
pers0 (float) – input x-axis perspective factor
pers1 (float) – input y-axis perspective factor
pers2 (float) – perspective scale factor
- Returns:
Matrixconstructed from parameters
- static Matrix.MakeRectToRect(src: skia.Rect, dst: skia.Rect, stf: skia.Matrix.ScaleToFit) skia.Matrix
Returns
Matrixset to scale and translate srcRectto dstRect.stf selects whether mapping completely fills dst or preserves the aspect ratio, and how to align src within dst. Returns the identity
Matrixif src is empty. If dst is empty, returnsMatrixset to:| 0 0 0 | | 0 0 0 | | 0 0 1 |
- static Matrix.RotateDeg(*args, **kwargs)
Overloaded function.
RotateDeg(deg: float) -> skia.Matrix
RotateDeg(deg: float, pt: skia.Point) -> skia.Matrix
- static Matrix.RotateRad(rad: float) skia.Matrix
- static Matrix.Scale(sx: float, sy: float) skia.Matrix
Sets
Matrixto scale by (sx, sy).Returned matrix is:
sx 0 0 |0 sy 0 |0 0 1 |- Parameters:
sx (float) – horizontal scale factor
sy (float) – vertical scale factor
- Returns:
Matrixwith scale
- static Matrix.SetAffineIdentity() list[float]
Fills affine with identity values in column major order.
Sets affine to:
1 0 0 |0 1 0 |Affine 3 by 2 matrices in column major order are used by OpenGL and XPS.
- Returns:
List of float
- static Matrix.Translate(*args, **kwargs)
Overloaded function.
Translate(dx: float, dy: float) -> skia.Matrix
Translate(t: skia.Point) -> skia.Matrix
Translate(t: skia.IPoint) -> skia.Matrix
- Matrix.__init__(*args, **kwargs)
Overloaded function.
- Matrix.asAffine(self: skia.Matrix) object
Fills affine in column major order.
Sets affine to:
| scale-x skew-x translate-x | | skew-y scale-y translate-y |
If
Matrixcontains perspective, returns None.- Returns:
list of float if
Matrixdoes not contain perspective, else None
- Matrix.decomposeScale(self: skia.Matrix, scale: skia.Size, remaining: skia.Matrix) bool
Decomposes
Matrixinto scale components and whatever remains.Returns false if
Matrixcould not be decomposed.Sets scale to portion of
Matrixthat scale axes. Sets remaining toMatrixwith scaling factored out. remaining may be passed as nullptr to determine ifMatrixcan be decomposed without computing remainder.Returns true if scale components are found. scale and remaining are unchanged if
Matrixcontains perspective; scale factors are not finite, or are nearly zero.On success: Matrix = Remaining * scale.
- Parameters:
scale (skia.Size) – axes scaling factors; may be nullptr
remaining (skia.Matrix) –
Matrixwithout scaling; may be nullptr
- Returns:
true if scale can be computed
- Matrix.dirtyMatrixTypeCache(self: skia.Matrix) None
Sets internal cache to unknown state.
Use to force update after repeated modifications to
Matrixelement reference returned by operator[](int index).
- Matrix.dump(self: skia.Matrix) None
Writes text representation of
Matrixto standard output.Floating point values are written with limited precision; it may not be possible to reconstruct original
Matrixfrom output.
- Matrix.get(self: skia.Matrix, index: int) float
Returns one matrix value.
Asserts if index is out of range and SK_DEBUG is defined.
- Parameters:
index (int) – one of: kMScaleX, kMSkewX, kMTransX, kMSkewY, kMScaleY, kMTransY, kMPersp0, kMPersp1, kMPersp2
- Returns:
value corresponding to index
- Matrix.get9(self: skia.Matrix) list[float]
Returns nine scalar values contained by
Matrixinto list, in member value ascending order: kMScaleX, kMSkewX, kMTransX, kMSkewY, kMScaleY, kMTransY, kMPersp0, kMPersp1, kMPersp2.
- Matrix.getMaxScale(self: skia.Matrix) float
Returns the maximum scaling factor of
Matrixby decomposing the scaling and skewing elements.Returns -1 if scale factor overflows or
Matrixcontains perspective.- Returns:
maximum scale factor
- Matrix.getMinMaxScales(self: skia.Matrix) tuple
Returns the minimum scaling factor and the maximum scaling factor.
Scaling factors are computed by decomposing the
Matrixscaling and skewing elements.Returns (min, max) if scale factors are found; otherwise, returns (-1, -1).
- Returns:
tuple of min and max factors
- Matrix.getMinScale(self: skia.Matrix) float
Returns the minimum scaling factor of
Matrixby decomposing the scaling and skewing elements.Returns -1 if scale factor overflows or
Matrixcontains perspective.- Returns:
minimum scale factor
- Matrix.getPerspX(self: skia.Matrix) float
Returns factor scaling input x-axis relative to input y-axis.
- Returns:
input x-axis perspective factor
- Matrix.getPerspY(self: skia.Matrix) float
Returns factor scaling input y-axis relative to input x-axis.
- Returns:
input y-axis perspective factor
- Matrix.getScaleX(self: skia.Matrix) float
Returns scale factor multiplied by x-axis input, contributing to x-axis output.
With
mapPoints(), scalesPointalong the x-axis.- Returns:
horizontal scale factor
- Matrix.getScaleY(self: skia.Matrix) float
Returns scale factor multiplied by y-axis input, contributing to y-axis output.
With
mapPoints(), scalesPointalong the y-axis.- Returns:
vertical scale factor
- Matrix.getSkewX(self: skia.Matrix) float
Returns scale factor multiplied by y-axis input, contributing to x-axis output.
With
mapPoints(), skewsPointalong the x-axis. Skewing both axes can rotatePoint.- Returns:
horizontal scale factor
- Matrix.getSkewY(self: skia.Matrix) float
Returns scale factor multiplied by x-axis input, contributing to y-axis output.
With
mapPoints(), skewsPointalong the y-axis. Skewing both axes can rotatePoint.- Returns:
vertical skew factor
- Matrix.getTranslateX(self: skia.Matrix) float
Returns translation contributing to x-axis output.
With
mapPoints(), movesPointalong the x-axis.- Returns:
horizontal translation factor
- Matrix.getTranslateY(self: skia.Matrix) float
Returns translation contributing to y-axis output.
With
mapPoints(), movesPointalong the y-axis.- Returns:
vertical translation factor
- Matrix.getType(self: skia.Matrix) skia.Matrix.TypeMask
Returns a bit field describing the transformations the matrix may perform.
The bit field is computed conservatively, so it may include false positives. For example, when kPerspective_Mask is set, all other bits are set.
- Returns:
kIdentity_Mask, or combinations of: kTranslate_Mask, kScale_Mask, kAffine_Mask, kPerspective_Mask
- Matrix.hasPerspective(self: skia.Matrix) bool
Returns true if the matrix contains perspective elements.
Matrixform is:| – – – | | – – – | | perspective-x perspective-y perspective-scale |
where perspective-x or perspective-y is non-zero, or perspective-scale is not one. All other elements may have any value.
- Returns:
true if
Matrixis in most general form
- Matrix.invert(self: skia.Matrix, inverse: skia.Matrix) bool
Sets inverse to reciprocal matrix, returning true if
Matrixcan be inverted.Geometrically, if
Matrixmaps from source to destination, inverseMatrixmaps from destination to source. IfMatrixcan not be inverted, inverse is unchanged.- Parameters:
inverse (skia.Matrix) – storage for inverted
Matrix; may be nullptr- Returns:
true if
Matrixcan be inverted
- Matrix.isFinite(self: skia.Matrix) bool
Returns true if all elements of the matrix are finite.
Returns false if any element is infinity, or NaN.
- Returns:
true if matrix has only finite elements
- Matrix.isIdentity(self: skia.Matrix) bool
Returns true if
Matrixis identity.Identity matrix is:
| 1 0 0 | | 0 1 0 | | 0 0 1 |
- Returns:
true if
Matrixhas no effect
- Matrix.isScaleTranslate(self: skia.Matrix) bool
Returns true if
Matrixat most scales and translates.Matrixmay be identity, contain only scale elements, only translate elements, or both.Matrixform is:| scale-x 0 translate-x | | 0 scale-y translate-y | | 0 0 1 |
- Returns:
true if
Matrixis identity; or scales, translates, or both
- Matrix.isSimilarity(self: skia.Matrix, tol: float = 0.000244140625) bool
Returns true if
Matrixcontains only translation, rotation, reflection, and uniform scale.Returns false if
Matrixcontains different scales, skewing, perspective, or degenerate forms that collapse to a line or point.Describes that the
Matrixmakes rendering with and without the matrix are visually alike; a transformed circle remains a circle. Mathematically, this is referred to as similarity of a Euclidean space, or a similarity transformation.Preserves right angles, keeping the arms of the angle equal lengths.
- Parameters:
tol (float) – to be deprecated
- Returns:
true if
Matrixonly rotates, uniformly scales, translates
- Matrix.isTranslate(self: skia.Matrix) bool
Returns true if
Matrixis identity, or translates.Matrixform is:| 1 0 translate-x | | 0 1 translate-y | | 0 0 1 |
- Returns:
true if
Matrixis identity, or translates
- Matrix.mapHomogeneousPoints(*args, **kwargs)
Overloaded function.
mapHomogeneousPoints(self: skia.Matrix, pts: list[skia.Point3]) -> object
Takes src
Point3array and returns mappedPoint3array.Point3array is mapped by multiplying eachPoint3byMatrix. Given:| A B C | | x | Matrix = | D E F |, src = | y | | G H I | | z |
each resulting dst
Pointis computed as:|A B C| |x| Matrix * src = |D E F| |y| = |Ax+By+Cz Dx+Ey+Fz Gx+Hy+Iz| |G H I| |z|
- pts:
Point3array to transform
mapHomogeneousPoints(self: skia.Matrix, pts: list[skia.Point]) -> object
Returns homogeneous points, starting with 2D src points (with implied w = 1).
- pts:
Pointarray to transform
- Matrix.mapPoints(self: skia.Matrix, pts: list[skia.Point]) list[skia.Point]
Takes src
Pointarray and returns mappedPointarray.Pointare mapped by multiplying eachPointbyMatrix. Given:| A B C | | x | Matrix = | D E F |, pt = | y | | G H I | | 1 |
where:
for (i = 0; i < count; ++i) { x = src[i].fX y = src[i].fY }
each dst
Pointis computed as:|A B C| |x| Ax+By+C Dx+Ey+F Matrix * pt = |D E F| |y| = |Ax+By+C Dx+Ey+F Gx+Hy+I| = ------- , ------- |G H I| |1| Gx+Hy+I Gx+Hy+I
- Parameters:
src (List[skia.Point]) – list of
Pointto transform
- Matrix.mapRadius(self: skia.Matrix, radius: float) float
Returns geometric mean radius of ellipse formed by constructing circle of size radius, and mapping constructed circle with
Matrix.The result squared is equal to the major axis length times the minor axis length. Result is not meaningful if
Matrixcontains perspective elements.- Parameters:
radius – circle size to map
- Returns:
average mapped radius
- Matrix.mapRect(self: skia.Matrix, src: skia.Rect, pc: skia.ApplyPerspectiveClip = skia.ApplyPerspectiveClip.kYes) skia.Rect
Returns bounds of src corners mapped by
Matrix.- Parameters:
src (skia.Rect) – rectangle to map
pc (skia.ApplyPerspectiveClip) – whether to apply perspective clipping
- Returns:
mapped bounds
- Matrix.mapRectScaleTranslate(self: skia.Matrix, src: skia.Rect) skia.Rect
Returns bounds of src corners mapped by
Matrix.If matrix contains elements other than scale or translate: asserts if SK_DEBUG is defined; otherwise, results are undefined.
- Matrix.mapRectToQuad(self: skia.Matrix, rect: skia.Rect) list[skia.Point]
Maps four corners of rect to dst.
Pointare mapped by multiplying each rect corner byMatrix. rect corner is processed in this order: (rect.fLeft, rect.fTop), (rect.fRight, rect.fTop), (rect.fRight, rect.fBottom), (rect.fLeft, rect.fBottom).rect may be empty: rect.fLeft may be greater than or equal to rect.fRight; rect.fTop may be greater than or equal to rect.fBottom.
Given:
| A B C | | x | Matrix = | D E F |, pt = | y | | G H I | | 1 |
where pt is initialized from each of (rect.fLeft, rect.fTop), (rect.fRight, rect.fTop), (rect.fRight, rect.fBottom), (rect.fLeft, rect.fBottom), each dst
Pointis computed as:|A B C| |x| Ax+By+C Dx+Ey+F Matrix * pt = |D E F| |y| = |Ax+By+C Dx+Ey+F Gx+Hy+I| = ------- , ------- |G H I| |1| Gx+Hy+I Gx+Hy+I
Note: this does not perform perspective clipping (as that might result in more than 4 points, so results are suspect if the matrix contains perspective.
- Matrix.mapVector(self: skia.Matrix, dx: float, dy: float) skia.Point
Returns vector (dx, dy) multiplied by
Matrix, treatingMatrixtranslation as zero.Given:
| A B 0 | | dx | Matrix = | D E 0 |, vec = | dy | | G H I | | 1 |
each result vector is computed as:
|A B 0| |dx| A*dx+B*dy D*dx+E*dy Matrix * vec = |D E 0| |dy| = |A*dx+B*dy D*dx+E*dy G*dx+H*dy+I| = --------—--, --------—-- |G H I| | 1| G*dx+H*dy+I G*dx+*dHy+I- Parameters:
dx (float) – x-axis value of vector to map
dy (float) – y-axis value of vector to map
- Returns:
mapped vector
- Matrix.mapVectors(self: skia.Matrix, src: list[skia.Point]) list[skia.Point]
Maps src vector array to vector
Pointarray.Vectors are mapped by multiplying each vector by
Matrix, treatingMatrixtranslation as zero. Given:| A B 0 | | x | Matrix = | D E 0 |, src = | y | | G H I | | 1 |
where:
for (i = 0; i < count; ++i) { x = src[i].fX y = src[i].fY }
each dst vector is computed as:
|A B 0| |x| Ax+By Dx+Ey Matrix * src = |D E 0| |y| = |Ax+By Dx+Ey Gx+Hy+I| = ------- , ------- |G H I| |1| Gx+Hy+I Gx+Hy+I
- Parameters:
src (List[skia.Point]) – vectors to transform
- Matrix.mapXY(self: skia.Matrix, x: float, y: float) skia.Point
Returns
Point(x, y) multiplied byMatrix.Given:
| A B C | | x | Matrix = | D E F |, pt = | y | | G H I | | 1 |
result is computed as:
|A B C| |x| Ax+By+C Dx+Ey+F Matrix * pt = |D E F| |y| = |Ax+By+C Dx+Ey+F Gx+Hy+I| = ------- , ------- |G H I| |1| Gx+Hy+I Gx+Hy+I
- Matrix.normalizePerspective(self: skia.Matrix) None
A matrix is categorized as ‘perspective’ if the bottom row is not [0, 0, 1].
However, for most uses (e.g. mapPoints) a bottom row of [0, 0, X] behaves like a non-perspective matrix, though it will be categorized as perspective. Calling
normalizePerspective()will change the matrix such that, if its bottom row was [0, 0, X], it will be changed to [0, 0, 1] by scaling the rest of the matrix by 1/X:| A B C | | A/X B/X C/X | | D E F | -> \ | D/X E/X F/X | for X != 0 | 0 0 X | | 0 0 1 |
- Matrix.postConcat(self: skia.Matrix, other: skia.Matrix) skia.Matrix
Sets
MatrixtoMatrixother multiplied byMatrix.This can be thought of mapping by other after applying
Matrix.Given:
| J K L | | A B C | Matrix = | M N O |, other = | D E F | | P Q R | | G H I |
sets
Matrixto:| A B C | | J K L | | AJ+BM+CP AK+BN+CQ AL+BO+CR | other * Matrix = | D E F | * | M N O | = | DJ+EM+FP DK+EN+FQ DL+EO+FR | | G H I | | P Q R | | GJ+HM+IP GK+HN+IQ GL+HO+IR |
- Parameters:
other (skia.Matrix) –
Matrixon left side of multiply expression
- Matrix.postRotate(*args, **kwargs)
Overloaded function.
postRotate(self: skia.Matrix, degrees: float, px: float, py: float) -> skia.Matrix
Sets
MatrixtoMatrixconstructed from rotating by degrees about pivot point (px, py), multiplied byMatrix.This can be thought of as rotating about a pivot point after applying
Matrix.Positive degrees rotates clockwise.
Given:
| J K L | | c -s dx | Matrix = | M N O |, R(degrees, px, py) = | s c dy | | P Q R | | 0 0 1 |
where:
c = cos(degrees) s = sin(degrees) dx = s * py + (1 - c) * px dy = -s * px + (1 - c) * py
sets
Matrixto:|c -s dx| |J K L| |cJ-sM+dx*P cK-sN+dx*Q cL-sO+dx+R| R(degrees, px, py) * Matrix = |s c dy| |M N O| = |sJ+cM+dy*P sK+cN+dy*Q sL+cO+dy*R| |0 0 1| |P Q R| | P Q R|
- degrees:
angle of axes relative to upright axes
- px:
pivot on x-axis
- py:
pivot on y-axis
postRotate(self: skia.Matrix, degrees: float) -> skia.Matrix
Sets
MatrixtoMatrixconstructed from rotating by degrees about pivot point (0, 0), multiplied byMatrix.This can be thought of as rotating about the origin after applying
Matrix.Positive degrees rotates clockwise.
Given:
| J K L | | c -s 0 | Matrix = | M N O |, R(degrees, px, py) = | s c 0 | | P Q R | | 0 0 1 |
where:
c = cos(degrees) s = sin(degrees)
sets
Matrixto:| c -s dx | | J K L | | cJ-sM cK-sN cL-sO | R(degrees, px, py) * Matrix = | s c dy | | M N O | = | sJ+cM sK+cN sL+cO | | 0 0 1 | | P Q R | | P Q R |
- degrees:
angle of axes relative to upright axes
- Matrix.postScale(*args, **kwargs)
Overloaded function.
postScale(self: skia.Matrix, sx: float, sy: float, px: float, py: float) -> skia.Matrix
Sets
MatrixtoMatrixconstructed from scaling by (sx, sy) about pivot point (px, py), multiplied byMatrix.This can be thought of as scaling about a pivot point after applying
Matrix.Given:
| J K L | | sx 0 dx | Matrix = | M N O |, S(sx, sy, px, py) = | 0 sy dy | | P Q R | | 0 0 1 |
where:
dx = px - sx * px dy = py - sy * py
sets
Matrixto:| sx 0 dx | | J K L | | sx*J+dx*P sx*K+dx*Q sx*L+dx+R | S(sx, sy, px, py) * Matrix = | 0 sy dy | | M N O | = | sy*M+dy*P sy*N+dy*Q sy*O+dy*R | | 0 0 1 | | P Q R | | P Q R |
- sx:
horizontal scale factor
- sy:
vertical scale factor
- px:
pivot on x-axis
- py:
pivot on y-axis
postScale(self: skia.Matrix, sx: float, sy: float) -> skia.Matrix
Sets
MatrixtoMatrixconstructed from scaling by (sx, sy) about pivot point (0, 0), multiplied byMatrix.This can be thought of as scaling about the origin after applying
Matrix.Given:
| J K L | | sx 0 0 | Matrix = | M N O |, S(sx, sy) = | 0 sy 0 | | P Q R | | 0 0 1 |
sets
Matrixto:| sx 0 0 | | J K L | | sx*J sx*K sx*L | S(sx, sy) * Matrix = | 0 sy 0 | | M N O | = | sy*M sy*N sy*O | | 0 0 1 | | P Q R | | P Q R |
- sx:
horizontal scale factor
- sy:
vertical scale factor
- Matrix.postSkew(*args, **kwargs)
Overloaded function.
postSkew(self: skia.Matrix, kx: float, ky: float, px: float, py: float) -> skia.Matrix
Sets
MatrixtoMatrixconstructed from skewing by (kx, ky) about pivot point (px, py), multiplied byMatrix.This can be thought of as skewing about a pivot point after applying
Matrix.Given:
| J K L | | 1 kx dx | Matrix = | M N O |, K(kx, ky, px, py) = | ky 1 dy | | P Q R | | 0 0 1 |
where:
dx = -kx * py dy = -ky * px
sets
Matrixto:| 1 kx dx| |J K L| |J+kx*M+dx*P K+kx*N+dx*Q L+kx*O+dx+R| K(kx, ky, px, py) * Matrix = |ky 1 dy| |M N O| = |ky*J+M+dy*P ky*K+N+dy*Q ky*L+O+dy*R| | 0 0 1| |P Q R| | P Q R|
- kx:
horizontal skew factor
- ky:
vertical skew factor
- px:
pivot on x-axis
- py:
pivot on y-axis
postSkew(self: skia.Matrix, kx: float, ky: float) -> skia.Matrix
Sets
MatrixtoMatrixconstructed from skewing by (kx, ky) about pivot point (0, 0), multiplied byMatrix.This can be thought of as skewing about the origin after applying
Matrix.Given:
| J K L | | 1 kx 0 | Matrix = | M N O |, K(kx, ky) = | ky 1 0 | | P Q R | | 0 0 1 |
sets
Matrixto:| 1 kx 0 | | J K L | | J+kx*M K+kx*N L+kx*O | K(kx, ky) * Matrix = | ky 1 0 | | M N O | = | ky*J+M ky*K+N ky*L+O | | 0 0 1 | | P Q R | | P Q R |
- kx:
horizontal skew factor
- ky:
vertical skew factor
- Matrix.postTranslate(self: skia.Matrix, dx: float, dy: float) skia.Matrix
Sets
MatrixtoMatrixconstructed from translation (dx, dy) multiplied byMatrix.This can be thought of as moving the point to be mapped after applying
Matrix.Given:
| J K L | | 1 0 dx | Matrix = | M N O |, T(dx, dy) = | 0 1 dy | | P Q R | | 0 0 1 |
sets
Matrixto:| 1 0 dx | | J K L | | J+dx*P K+dx*Q L+dx*R | T(dx, dy) * Matrix = | 0 1 dy | | M N O | = | M+dy*P N+dy*Q O+dy*R | | 0 0 1 | | P Q R | | P Q R |
- Matrix.preConcat(self: skia.Matrix, other: skia.Matrix) skia.Matrix
Sets
MatrixtoMatrixmultiplied byMatrixother.This can be thought of mapping by other before applying
Matrix.Given:
| A B C | | J K L | Matrix = | D E F |, other = | M N O | | G H I | | P Q R |
sets
Matrixto:| A B C | | J K L | | AJ+BM+CP AK+BN+CQ AL+BO+CR | Matrix * other = | D E F | * | M N O | = | DJ+EM+FP DK+EN+FQ DL+EO+FR | | G H I | | P Q R | | GJ+HM+IP GK+HN+IQ GL+HO+IR |
- Parameters:
other (skia.Matrix) –
Matrixon right side of multiply expression
- Matrix.preRotate(*args, **kwargs)
Overloaded function.
preRotate(self: skia.Matrix, degrees: float, px: float, py: float) -> skia.Matrix
Sets
MatrixtoMatrixmultiplied byMatrixconstructed from rotating by degrees about pivot point (px, py).This can be thought of as rotating about a pivot point before applying
Matrix.Positive degrees rotates clockwise.
Given:
| A B C | | c -s dx | Matrix = | D E F |, R(degrees, px, py) = | s c dy | | G H I | | 0 0 1 |
where:
c = cos(degrees) s = sin(degrees) dx = s * py + (1 - c) * px dy = -s * px + (1 - c) * py
sets
Matrixto:| A B C | | c -s dx | | Ac+Bs -As+Bc A*dx+B*dy+C | Matrix * R(degrees, px, py) = | D E F | | s c dy | = | Dc+Es -Ds+Ec D*dx+E*dy+F | | G H I | | 0 0 1 | | Gc+Hs -Gs+Hc G*dx+H*dy+I |
- degrees:
angle of axes relative to upright axes
- px:
pivot on x-axis
- py:
pivot on y-axis
preRotate(self: skia.Matrix, degrees: float) -> skia.Matrix
Sets
MatrixtoMatrixmultiplied byMatrixconstructed from rotating by degrees about pivot point (0, 0).This can be thought of as rotating about the origin before applying
Matrix.Positive degrees rotates clockwise.
Given:
| A B C | | c -s 0 | Matrix = | D E F |, R(degrees, px, py) = | s c 0 | | G H I | | 0 0 1 |
where:
c = cos(degrees) s = sin(degrees)
sets
Matrixto:| A B C | | c -s 0 | | Ac+Bs -As+Bc C | Matrix * R(degrees, px, py) = | D E F | | s c 0 | = | Dc+Es -Ds+Ec F | | G H I | | 0 0 1 | | Gc+Hs -Gs+Hc I |
- degrees:
angle of axes relative to upright axes
- Matrix.preScale(*args, **kwargs)
Overloaded function.
preScale(self: skia.Matrix, sx: float, sy: float, px: float, py: float) -> skia.Matrix
Sets
MatrixtoMatrixmultiplied byMatrixconstructed from scaling by (sx, sy) about pivot point (px, py).This can be thought of as scaling about a pivot point before applying
Matrix.Given:
| A B C | | sx 0 dx | Matrix = | D E F |, S(sx, sy, px, py) = | 0 sy dy | | G H I | | 0 0 1 |
where:
dx = px - sx * px dy = py - sy * py
sets
Matrixto:| A B C | | sx 0 dx | | A*sx B*sy A*dx+B*dy+C | Matrix * S(sx, sy, px, py) = | D E F | | 0 sy dy | = | D*sx E*sy D*dx+E*dy+F | | G H I | | 0 0 1 | | G*sx H*sy G*dx+H*dy+I |
- sx:
horizontal scale factor
- sy:
vertical scale factor
- px:
pivot on x-axis
- py:
pivot on y-axis
preScale(self: skia.Matrix, sx: float, sy: float) -> skia.Matrix
Sets
MatrixtoMatrixmultiplied byMatrixconstructed from scaling by (sx, sy) about pivot point (0, 0).This can be thought of as scaling about the origin before applying
Matrix.Given:
| A B C | | sx 0 0 | Matrix = | D E F |, S(sx, sy) = | 0 sy 0 | | G H I | | 0 0 1 |
sets
Matrixto:| A B C | | sx 0 0 | | A*sx B*sy C | Matrix * S(sx, sy) = | D E F | | 0 sy 0 | = | D*sx E*sy F | | G H I | | 0 0 1 | | G*sx H*sy I |
- sx:
horizontal scale factor
- sy:
vertical scale factor
- Matrix.preSkew(*args, **kwargs)
Overloaded function.
preSkew(self: skia.Matrix, kx: float, ky: float, px: float, py: float) -> skia.Matrix
Sets
MatrixtoMatrixmultiplied byMatrixconstructed from skewing by (kx, ky) about pivot point (px, py).This can be thought of as skewing about a pivot point before applying
Matrix.Given:
| A B C | | 1 kx dx | Matrix = | D E F |, K(kx, ky, px, py) = | ky 1 dy | | G H I | | 0 0 1 |
where:
dx = -kx * py dy = -ky * px
sets
Matrixto:| A B C | | 1 kx dx | | A+B*ky A*kx+B A*dx+B*dy+C | Matrix * K(kx, ky, px, py) = | D E F | | ky 1 dy | = | D+E*ky D*kx+E D*dx+E*dy+F | | G H I | | 0 0 1 | | G+H*ky G*kx+H G*dx+H*dy+I |
- kx:
horizontal skew factor
- ky:
vertical skew factor
- px:
pivot on x-axis
- py:
pivot on y-axis
preSkew(self: skia.Matrix, kx: float, ky: float) -> skia.Matrix
Sets
MatrixtoMatrixmultiplied byMatrixconstructed from skewing by (kx, ky) about pivot point (0, 0).This can be thought of as skewing about the origin before applying
Matrix.Given:
| A B C | | 1 kx 0 | Matrix = | D E F |, K(kx, ky) = | ky 1 0 | | G H I | | 0 0 1 |
sets
Matrixto:| A B C | | 1 kx 0 | | A+B*ky A*kx+B C | Matrix * K(kx, ky) = | D E F | | ky 1 0 | = | D+E*ky D*kx+E F | | G H I | | 0 0 1 | | G+H*ky G*kx+H I |
- kx:
horizontal skew factor
- ky:
vertical skew factor
- Matrix.preTranslate(self: skia.Matrix, dx: float, dy: float) skia.Matrix
Sets
MatrixtoMatrixmultiplied byMatrixconstructed from translation (dx, dy).This can be thought of as moving the point to be mapped before applying
Matrix.Given:
| A B C | | 1 0 dx | Matrix = | D E F |, T(dx, dy) = | 0 1 dy | | G H I | | 0 0 1 |
sets
Matrixto:| A B C | | 1 0 dx | | A B A*dx+B*dy+C | Matrix * T(dx, dy) = | D E F | | 0 1 dy | = | D E D*dx+E*dy+F | | G H I | | 0 0 1 | | G H G*dx+H*dy+I |
- Matrix.preservesAxisAlignment(self: skia.Matrix) bool
Returns true
MatrixmapsRectto anotherRect.If true,
Matrixis identity, or scales, or rotates a multiple of 90 degrees, or mirrors on axes. In all cases,Matrixmay also have translation.Matrixform is either:| scale-x 0 translate-x | | 0 scale-y translate-y | | 0 0 1 |
or:
| 0 rotate-x translate-x | | rotate-y 0 translate-y | | 0 0 1 |
for non-zero values of scale-x, scale-y, rotate-x, and rotate-y.
Also called
rectStaysRect(); use the one that provides better inline documentation.
- Matrix.preservesRightAngles(self: skia.Matrix, tol: float = 0.000244140625) bool
Returns true if
Matrixcontains only translation, rotation, reflection, and scale.Scale may differ along rotated axes. Returns false if
Matrixskewing, perspective, or degenerate forms that collapse to a line or point.Preserves right angles, but not requiring that the arms of the angle retain equal lengths.
- Parameters:
tol (float) – to be deprecated
- Returns:
true if
Matrixonly rotates, scales, translates
- Matrix.rc(self: skia.Matrix, r: int, c: int) float
Returns one matrix value from a particular row/column. Asserts if index is out of range and SK_DEBUG is defined.
- Parameters:
r – matrix row to fetch
c – matrix column to fetch
- Returns:
value at the given matrix position
- Matrix.rectStaysRect(self: skia.Matrix) bool
Returns true SkMatrix maps SkRect to another SkRect.
If true,
Matrixis identity, or scales, or rotates a multiple of 90 degrees, or mirrors on axes. In all cases,Matrixmay also have translation.Matrixform is either:| scale-x 0 translate-x | | 0 scale-y translate-y | | 0 0 1 |
or:
| 0 rotate-x translate-x | | rotate-y 0 translate-y | | 0 0 1 | for non-zero values of scale-x, scale-y, rotate-x, and rotate-y.
Also called
preservesAxisAlignment(); use the one that provides better inline documentation.
- Matrix.reset(self: skia.Matrix) skia.Matrix
Sets
Matrixto identity; which has no effect on mappedPoint.Sets
Matrixto:| 1 0 0 | | 0 1 0 | | 0 0 1 |
Also called
setIdentity(); use the one that provides better inline documentation.
- Matrix.set(self: skia.Matrix, index: int, value: float) None
Returns writable
Matrixvalue.Asserts if index is out of range and SK_DEBUG is defined. Clears internal cache anticipating that caller will change
Matrixvalue.Next call to read
Matrixstate may recompute cache; subsequent writes toMatrixvalue must be followed bydirtyMatrixTypeCache().- Parameters:
index (int) – one of: kMScaleX, kMSkewX, kMTransX, kMSkewY, kMScaleY, kMTransY, kMPersp0, kMPersp1, kMPersp2
value – value to set
- Matrix.set9(self: skia.Matrix, buffer: list[float]) skia.Matrix
Sets
Matrixto nine scalar values in values, in member value ascending order: kMScaleX, kMSkewX, kMTransX, kMSkewY, kMScaleY, kMTransY, kMPersp0, kMPersp1, kMPersp2.Sets matrix to:
| values[0] values[1] values[2] | | values[3] values[4] values[5] | | values[6] values[7] values[8] |
In the future, set9 followed by get9 may not return the same values. Since
Matrixmaps non-homogeneous coordinates, scaling all nine values produces an equivalent transformation, possibly improving precision.- Parameters:
values – nine scalar values
- Matrix.setAffine(self: skia.Matrix, affine: list[float]) skia.Matrix
Sets
Matrixto affine values, passed in column major order.Given affine, column, then row, as:
| scale-x skew-x translate-x | | skew-y scale-y translate-y |
Matrixis set, row, then column, to:| scale-x skew-x translate-x | | skew-y scale-y translate-y | | 0 0 1 |
- Parameters:
affine – 3 by 2 affine matrix
- Matrix.setAll(self: skia.Matrix, scaleX: float, skewX: float, transX: float, skewY: float, scaleY: float, transY: float, persp0: float, persp1: float, persp2: float) skia.Matrix
Sets all values from parameters.
Sets matrix to:
| scaleX skewX transX | | skewY scaleY transY | | persp0 persp1 persp2 |
- Parameters:
scaleX (float) – horizontal scale factor to store
skewX (float) – horizontal skew factor to store
transX (float) – horizontal translation to store
skewY (float) – vertical skew factor to store
scaleY (float) – vertical scale factor to store
transY (float) – vertical translation to store
persp0 (float) – input x-axis values perspective factor to store
persp1 (float) – input y-axis values perspective factor to store
persp2 (float) – perspective scale factor to store
- Matrix.setConcat(self: skia.Matrix, a: skia.Matrix, b: skia.Matrix) skia.Matrix
Sets
MatrixtoMatrixa multiplied byMatrixb.Either a or b may be this.
Given:
| A B C | | J K L | a = | D E F |, b = | M N O | | G H I | | P Q R |
sets
Matrixto:| A B C | | J K L | | AJ+BM+CP AK+BN+CQ AL+BO+CR | a * b = | D E F | * | M N O | = | DJ+EM+FP DK+EN+FQ DL+EO+FR | | G H I | | P Q R | | GJ+HM+IP GK+HN+IQ GL+HO+IR |
- Parameters:
a (skia.Matrix) –
Matrixon left side of multiply expressionb (skia.Matrix) –
Matrixon right side of multiply expression
- Matrix.setIdentity(self: skia.Matrix) skia.Matrix
Sets
Matrixto identity; which has no effect on mappedPoint.Sets
Matrixto:| 1 0 0 | | 0 1 0 | | 0 0 1 |
Also called
reset(); use the one that provides better inline documentation.
- Matrix.setPerspX(self: skia.Matrix, v: float) skia.Matrix
Sets input x-axis perspective factor, which causes mapXY() to vary input x-axis values inversely proportional to input y-axis values.
- Parameters:
v (float) – perspective factor
- Matrix.setPerspY(self: skia.Matrix, v: float) skia.Matrix
Sets input y-axis perspective factor, which causes mapXY() to vary input y-axis values inversely proportional to input x-axis values.
- Parameters:
v (float) – perspective factor
- Matrix.setPolyToPoly(self: skia.Matrix, src: list[skia.Point], dst: list[skia.Point]) bool
Sets
Matrixto map src to dst.count must be zero or greater, and four or less.
If count is zero, sets
Matrixto identity and returns true. If count is one, setsMatrixto translate and returns true. If count is two or more, setsMatrixto mapPointif possible; returns false ifMatrixcannot be constructed. If count is four,Matrixmay include perspective.- Parameters:
src (List[skia.Point]) –
Pointto map fromdst (List[skia.Point]) –
Pointto map to
- Returns:
true if
Matrixwas constructed successfully
- Matrix.setRSXform(self: skia.Matrix, rsxForm: SkRSXform) skia.Matrix
Sets
Matrixto rotate, scale, and translate using a compressed matrix form.Vector (rsxForm.fSSin, rsxForm.fSCos) describes the angle of rotation relative to (0, 1). Vector length specifies scale. Mapped point is rotated and scaled by vector, then translated by (rsxForm.fTx, rsxForm.fTy).
- Parameters:
rsxForm (skia.RSXform) – compressed
RSXformmatrix- Returns:
reference to
Matrix
- Matrix.setRectToRect(self: skia.Matrix, src: skia.Rect, dst: skia.Rect, stf: skia.Matrix.ScaleToFit) bool
Sets
Matrixto scale and translate srcRectto dstRect.stf selects whether mapping completely fills dst or preserves the aspect ratio, and how to align src within dst. Returns false if src is empty, and sets
Matrixto identity. Returns true if dst is empty, and setsMatrixto:0 0 0 |0 0 0 |0 0 1 |
- Matrix.setRotate(*args, **kwargs)
Overloaded function.
setRotate(self: skia.Matrix, degrees: float, px: float, py: float) -> skia.Matrix
setRotate(self: skia.Matrix, degrees: float) -> skia.Matrix
Sets
Matrixto rotate by degrees about a pivot point at (0, 0).Positive degrees rotates clockwise.
- degrees:
angle of axes relative to upright axes
- Matrix.setScale(*args, **kwargs)
Overloaded function.
setScale(self: skia.Matrix, sx: float, sy: float, px: float, py: float) -> skia.Matrix
setScale(self: skia.Matrix, sx: float, sy: float) -> skia.Matrix
Sets
Matrixto scale by sx and sy about at pivot point at (0, 0).- sx:
horizontal scale factor
- sy:
vertical scale factor
- Matrix.setScaleTranslate(self: skia.Matrix, sx: float, sy: float, tx: float, ty: float) None
Initializes
Matrixwith scale and translate elements.sx 0 tx |0 sy ty |0 0 1 |- Parameters:
sx (float) – horizontal scale factor to store
sy (float) – vertical scale factor to store
tx (float) – horizontal translation to store
ty (float) – vertical translation to store
- Matrix.setScaleX(self: skia.Matrix, v: float) skia.Matrix
Sets horizontal scale factor.
- Parameters:
v (float) – horizontal scale factor to store
- Matrix.setScaleY(self: skia.Matrix, v: float) skia.Matrix
Sets vertical scale factor.
- Parameters:
v (float) – vertical scale factor to store
- Matrix.setSinCos(*args, **kwargs)
Overloaded function.
setSinCos(self: skia.Matrix, sinValue: float, cosValue: float, px: float, py: float) -> skia.Matrix
Sets
Matrixto rotate by sinValue and cosValue, about a pivot point at (px, py).The pivot point is unchanged when mapped with
Matrix.Vector (sinValue, cosValue) describes the angle of rotation relative to (0, 1). Vector length specifies scale.
- sinValue:
rotation vector x-axis component
- cosValue:
rotation vector y-axis component
- px:
pivot on x-axis
- py:
pivot on y-axis
setSinCos(self: skia.Matrix, sinValue: float, cosValue: float) -> skia.Matrix
Sets
Matrixto rotate by sinValue and cosValue, about a pivot point at (0, 0).Vector (sinValue, cosValue) describes the angle of rotation relative to (0, 1). Vector length specifies scale.
- sinValue:
rotation vector x-axis component
- cosValue:
rotation vector y-axis component
- Matrix.setSkew(*args, **kwargs)
Overloaded function.
setSkew(self: skia.Matrix, kx: float, ky: float, px: float, py: float) -> skia.Matrix
setSkew(self: skia.Matrix, kx: float, ky: float) -> skia.Matrix
Sets
Matrixto skew by kx and ky, about a pivot point at (0, 0).- kx:
horizontal skew factor
- ky:
vertical skew factor
- Matrix.setSkewX(self: skia.Matrix, v: float) skia.Matrix
Sets horizontal skew factor.
- Parameters:
v (float) – horizontal skew factor to store
- Matrix.setSkewY(self: skia.Matrix, v: float) skia.Matrix
Sets vertical skew factor.
- Parameters:
v – vertical skew factor to store
- Matrix.setTranslate(*args, **kwargs)
Overloaded function.
setTranslate(self: skia.Matrix, dx: float, dy: float) -> skia.Matrix
Sets
Matrixto translate by (dx, dy).- dx:
horizontal translation
- dy:
vertical translation
setTranslate(self: skia.Matrix, v: skia.Point) -> skia.Matrix
Sets
Matrixto translate by (v.fX, v.fY).- v:
vector containing horizontal and vertical translation
- Matrix.setTranslateX(self: skia.Matrix, v: float) skia.Matrix
Sets horizontal translation.
- Parameters:
v (float) – horizontal translation to store
- Matrix.setTranslateY(self: skia.Matrix, v: float) skia.Matrix
Sets vertical translation.
- Parameters:
v (float) – vertical translation to store
Attributes
- Matrix.kAScaleX = 0
- Matrix.kAScaleY = 3
- Matrix.kASkewX = 2
- Matrix.kASkewY = 1
- Matrix.kATransX = 4
- Matrix.kATransY = 5
- Matrix.kAffine_Mask = <TypeMask.kAffine_Mask: 4>
- Matrix.kCenter_ScaleToFit = <ScaleToFit.kCenter_ScaleToFit: 2>
- Matrix.kEnd_ScaleToFit = <ScaleToFit.kEnd_ScaleToFit: 3>
- Matrix.kFill_ScaleToFit = <ScaleToFit.kFill_ScaleToFit: 0>
- Matrix.kIdentity_Mask = <TypeMask.kIdentity_Mask: 0>
- Matrix.kMPersp0 = 6
- Matrix.kMPersp1 = 7
- Matrix.kMPersp2 = 8
- Matrix.kMScaleX = 0
- Matrix.kMScaleY = 4
- Matrix.kMSkewX = 1
- Matrix.kMSkewY = 3
- Matrix.kMTransX = 2
- Matrix.kMTransY = 5
- Matrix.kPerspective_Mask = <TypeMask.kPerspective_Mask: 8>
- Matrix.kScale_Mask = <TypeMask.kScale_Mask: 2>
- Matrix.kStart_ScaleToFit = <ScaleToFit.kStart_ScaleToFit: 1>
- Matrix.kTranslate_Mask = <TypeMask.kTranslate_Mask: 1>