Position and size properties

This commit is contained in:
Jindra Petřík
2024-10-13 18:43:27 +02:00
parent 4e063491e7
commit 87c6b403a7
7 changed files with 215 additions and 69 deletions

View File

@@ -57,6 +57,11 @@ public class DepthState {
* Matrix
*/
public MATRIX matrix;
/**
* Temporary matrix
*/
public MATRIX temporaryMatrix;
/**
* Instance name
@@ -376,4 +381,12 @@ public class DepthState {
}
return Arrays.equals(this.amfData, other.amfData);
}
public MATRIX getDrawingMatrix() {
MATRIX temp = temporaryMatrix;
if (temp != null) {
return temp;
}
return matrix;
}
}

View File

@@ -1394,7 +1394,7 @@ public class Timeline {
if (character == null) {
continue;
}
Matrix layerMatrix = new Matrix(layer.matrix);
Matrix layerMatrix = new Matrix(layer.getDrawingMatrix());
Matrix mat = transformation.concatenate(layerMatrix);
Matrix absMat = absoluteTransformation.concatenate(layerMatrix);
@@ -1726,7 +1726,7 @@ public class Timeline {
CharacterTag character = layer.getCharacter();
if (character instanceof DrawableTag) {
DrawableTag drawable = (DrawableTag) character;
Matrix m = transformation.concatenate(new Matrix(layer.matrix));
Matrix m = transformation.concatenate(new Matrix(layer.getDrawingMatrix()));
int drawableFrameCount = drawable.getNumFrames();
if (drawableFrameCount == 0) {