checkstyle fix

This commit is contained in:
Jindra Petřík
2023-10-27 17:19:19 +02:00
parent 87e7db594e
commit e60f790e53
5 changed files with 15 additions and 15 deletions

View File

@@ -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);

View File

@@ -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) {

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}