#1156 FLA Export - 9 slice scaling (DefineScalingGrid)

This commit is contained in:
Jindra Petřík
2021-03-06 17:00:05 +01:00
parent 72d7a95d24
commit 5ecb5f8a87
2 changed files with 12 additions and 1 deletions

View File

@@ -58,6 +58,7 @@ import com.jpexs.decompiler.flash.tags.DefineButtonSoundTag;
import com.jpexs.decompiler.flash.tags.DefineButtonTag;
import com.jpexs.decompiler.flash.tags.DefineEditTextTag;
import com.jpexs.decompiler.flash.tags.DefineFontNameTag;
import com.jpexs.decompiler.flash.tags.DefineScalingGridTag;
import com.jpexs.decompiler.flash.tags.DefineSoundTag;
import com.jpexs.decompiler.flash.tags.DefineSpriteTag;
import com.jpexs.decompiler.flash.tags.DefineText2Tag;
@@ -1503,6 +1504,15 @@ public class XFLConverter {
if (linkageExportForAS) {
symbolStr.writeAttribute("linkageExportForAS", true);
}
DefineScalingGridTag scalingGrid = symbol.getScalingGridTag();
if (scalingGrid != null) {
symbolStr.writeAttribute("scaleGridLeft", doubleToString(scalingGrid.splitter.Xmin / SWF.unitDivisor));
symbolStr.writeAttribute("scaleGridRight", doubleToString(scalingGrid.splitter.Xmax / SWF.unitDivisor));
symbolStr.writeAttribute("scaleGridTop", doubleToString(scalingGrid.splitter.Ymin / SWF.unitDivisor));
symbolStr.writeAttribute("scaleGridBottom", doubleToString(scalingGrid.splitter.Ymax / SWF.unitDivisor));
}
symbolStr.writeStartElement("timeline");
String itemIcon = null;
if (symbol instanceof ButtonTag) {