diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/Matrix.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/Matrix.java index b0540cde4..493cd2d6d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/Matrix.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/Matrix.java @@ -42,11 +42,17 @@ public final class Matrix implements Cloneable { mat.scale(scale); return mat; } - + + public static Matrix getScaleInstance(double scaleX, double scaleY) { + Matrix mat = new Matrix(); + mat.scale(scaleX, scaleY); + return mat; + } public static Matrix getRotateInstance(double rotateAngle) { return getRotateInstance(rotateAngle, 0, 0); } + public static Matrix getRotateInstance(double rotateAngle, double tx, double ty) { double angleRad = -rotateAngle * Math.PI / 180; Matrix mat = new Matrix(); @@ -73,12 +79,6 @@ public final class Matrix implements Cloneable { return mat; } - public static Matrix getScaleInstance(double scaleX, double scaleY) { - Matrix mat = new Matrix(); - mat.scale(scaleX, scaleY); - return mat; - } - public static Matrix getTranslateInstance(double x, double y) { Matrix mat = new Matrix(); mat.translate(x, y); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/svg/SvgImporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/svg/SvgImporter.java index bb067640a..37627c8a6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/svg/SvgImporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/svg/SvgImporter.java @@ -253,7 +253,7 @@ public class SvgImporter { rootElement.hasAttribute("ffdec:objectType") && "morphshape".equals(rootElement.getAttribute("ffdec:objectType")) && applyAnimation(rootElement) - ) { + ) { processSvgObject(idMap, shapeNum, shapes2, rootElement, transform, style, morphShape, cachedBitmaps, true); } } catch (SAXException | IOException | ParserConfigurationException ex) { @@ -299,7 +299,7 @@ public class SvgImporter { String values = childElement.getAttribute("values"); String attributeName = childElement.getAttribute("attributeName"); if (values.contains(";")) { - String parts[] = values.split(";"); + String[] parts = values.split(";"); if (parts.length >= 2) { element.setAttribute(attributeName, parts[1]); result = true; @@ -310,7 +310,7 @@ public class SvgImporter { if (childElement.hasAttribute("attributeName") && childElement.hasAttribute("type") && (childElement.hasAttribute("to") || childElement.hasAttribute("values")) - ) { + ) { String type = childElement.getAttribute("type"); String additive = childElement.hasAttribute("additive") ? childElement.getAttribute("additive") : "replace"; String attributeName = childElement.getAttribute("attributeName"); @@ -321,7 +321,7 @@ public class SvgImporter { } else if (childElement.hasAttribute("to")) { to = childElement.getAttribute("to"); } - String toParts[] = Matrix.parseSvgNumberList(to); + String[] toParts = Matrix.parseSvgNumberList(to); Matrix newMatrix = null; switch (type) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/svg/SvgStyle.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/svg/SvgStyle.java index 82ee7f6c4..f5fb8d54b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/svg/SvgStyle.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/svg/SvgStyle.java @@ -592,7 +592,7 @@ class SvgStyle { for (int i = 0; i < childNodes.getLength(); i++) { if (childNodes.item(i) instanceof Element) { - if ("animateTransform".equals(((Element)childNodes.item(i)).getTagName())) { + if ("animateTransform".equals(((Element) childNodes.item(i)).getTagName())) { continue; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java index 4c20d7565..37da0061e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java @@ -71,7 +71,7 @@ public class FOCALGRADIENT extends GRADIENT implements Serializable { } morphGradient.startFocalPoint = focalPoint; if (endGradient instanceof FOCALGRADIENT) { - morphGradient.endFocalPoint = ((FOCALGRADIENT)endGradient).focalPoint; + morphGradient.endFocalPoint = ((FOCALGRADIENT) endGradient).focalPoint; } else { morphGradient.endFocalPoint = 0; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/GRADIENT.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/GRADIENT.java index 19e8f59ec..7990f813d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/GRADIENT.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/GRADIENT.java @@ -104,8 +104,8 @@ public class GRADIENT implements Serializable { morphGradient.gradientRecords[i] = gradientRecords[i].toMorphGradRecord(endGradient.gradientRecords[i]); } if (endGradient instanceof FOCALGRADIENT) { - ((MORPHFOCALGRADIENT)morphGradient).startFocalPoint = 0; - ((MORPHFOCALGRADIENT)morphGradient).endFocalPoint = ((FOCALGRADIENT)endGradient).focalPoint; + ((MORPHFOCALGRADIENT) morphGradient).startFocalPoint = 0; + ((MORPHFOCALGRADIENT) morphGradient).endFocalPoint = ((FOCALGRADIENT) endGradient).focalPoint; } return morphGradient; }