tell the exporter the ID and name of the drawable tag

This commit is contained in:
NoobTracker
2022-09-06 11:15:34 +02:00
committed by Jindra Petřík
parent 93a09b4c59
commit 6aba08bd31
2 changed files with 5 additions and 2 deletions

View File

@@ -405,8 +405,11 @@ public class SVGExporter {
}
_svgGs.peek().appendChild(image);
}
public Element addUse(Matrix transform, RECT boundRect, String href, String instanceName, RECT scalingRect) {
return addUse(transform, boundRect, href, instanceName, scalingRect, null, null);
}
public Element addUse(Matrix transform, RECT boundRect, String href, String instanceName, RECT scalingRect, String characterId, String characterName) {
if (scalingRect != null && (transform == null || (Double.compare(transform.rotateSkew0, 0.0) == 0 && Double.compare(transform.rotateSkew1, 0.0) == 0))) {
addScalingGridUse(transform, boundRect, href, instanceName, scalingRect);
return null; //??

View File

@@ -1219,7 +1219,7 @@ public class Timeline {
exporter.endGroup();
}
Matrix mat = Matrix.getTranslateInstance(rect.xMin, rect.yMin).preConcatenate(new Matrix(layer.matrix));
exporter.addUse(mat, boundRect, assetName, layer.instanceName, scalingGrid == null ? null : scalingGrid.splitter);
exporter.addUse(mat, boundRect, assetName, layer.instanceName, scalingGrid == null ? null : scalingGrid.splitter, drawable.getCharacterId(), drawable.getClassName());
}
}
}