mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 11:00:48 +00:00
Changed #1913 SVG export/import of shapes - shape exact position (bounds) is retained
This commit is contained in:
+1
-1
@@ -154,7 +154,7 @@ public class IggyToSwfConvertor {
|
||||
SHAPE shp;
|
||||
if (glyph != null) {
|
||||
shp = IggyShapeToSwfConvertor.convertCharToShape(glyph);
|
||||
fontTag.fontBoundsTable.add(shp.getBounds());
|
||||
fontTag.fontBoundsTable.add(shp.getBounds(1));
|
||||
} else {
|
||||
shp = new SHAPE();
|
||||
shp.shapeRecords = new ArrayList<>();
|
||||
|
||||
+2
-2
@@ -37,12 +37,12 @@ public class SwfShapeToIggyConvertor {
|
||||
return (val / 1024f);
|
||||
}
|
||||
|
||||
public static IggyShape convertShape(SHAPE swfShape) {
|
||||
public static IggyShape convertShape(int shapeNum, SHAPE swfShape) {
|
||||
/*if (swfShape.shapeRecords.size() == 1) { //no glyphs, maybe space
|
||||
return null;
|
||||
}*/
|
||||
List<IggyShapeNode> nodes = new ArrayList<>();
|
||||
RECT bounds = swfShape.getBounds();
|
||||
RECT bounds = swfShape.getBounds(shapeNum);
|
||||
boolean first = true;
|
||||
float curX = 0f;
|
||||
float curY = 0f;
|
||||
|
||||
+1
-1
@@ -126,7 +126,7 @@ public class SwfToIggyConvertor {
|
||||
List<IggyShape> glyphs = new ArrayList<>();
|
||||
|
||||
for (SHAPE s : fontTag.glyphShapeTable) {
|
||||
glyphs.add(SwfShapeToIggyConvertor.convertShape(s));
|
||||
glyphs.add(SwfShapeToIggyConvertor.convertShape(1, s));
|
||||
}
|
||||
|
||||
List<Character> chars = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user