mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 20:50:46 +00:00
Auto update bounds on points save.
Select cursor.
This commit is contained in:
@@ -195,10 +195,7 @@ public class SvgImporter {
|
||||
|
||||
st.shapes = shapes;
|
||||
if (!fill) {
|
||||
st.shapeBounds = shapes.getBounds(st.getShapeNum());
|
||||
if (st instanceof DefineShape4Tag) {
|
||||
((DefineShape4Tag)st).edgeBounds = shapes.getEdgeBounds();
|
||||
}
|
||||
st.updateBounds();
|
||||
}
|
||||
st.setModified(true);
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.jpexs.decompiler.flash.types.SHAPEWITHSTYLE;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Reserved;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFType;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFVersion;
|
||||
import com.jpexs.decompiler.flash.types.shaperecords.SHAPERECORD;
|
||||
import com.jpexs.helpers.ByteArrayRange;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -109,4 +110,12 @@ public class DefineShape4Tag extends ShapeTag {
|
||||
public int getShapeNum() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBounds() {
|
||||
super.updateBounds();
|
||||
edgeBounds = SHAPERECORD.getBounds(shapes.shapeRecords, null, 4, true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -263,4 +263,8 @@ public abstract class ShapeTag extends DrawableTag implements LazyObject {
|
||||
public void setCharacterId(int characterId) {
|
||||
this.shapeId = characterId;
|
||||
}
|
||||
|
||||
public void updateBounds() {
|
||||
shapeBounds = SHAPERECORD.getBounds(shapes.shapeRecords, shapes.lineStyles, getShapeNum(), false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user