applyAncestorMatrix method
void
applyAncestorMatrix(
- Matrix4? ancestorMatrix
)
Implementation
void applyAncestorMatrix(Matrix4? ancestorMatrix) {
if (ancestorMatrix != null) {
if (skeletons?.isNotEmpty == true) {
// _transformRect can occur just here because the [RenderTransform] has no skeletons -> the transform for skeletons is always from ancestor
for (int i = 0; i < skeletons!.length; i++) {
skeletons![i].rect = _transformRect(ancestorMatrix, skeletons![i].rect!);
}
final newRect = _transformRect(ancestorMatrix, this.rect);
this.rect = newRect;
}
if (this.matrix == null) {
this.matrix = ancestorMatrix;
} else {
//Order of matrices matter
this.matrix = ancestorMatrix * this.matrix;
}
}
}