mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-31 19:54:37 +00:00
Error color (red) extracted to constant in SWF class
This commit is contained in:
@@ -377,6 +377,11 @@ public final class SWF implements SWFContainerItem, Timelined {
|
||||
"CFX", // Compressed ScaleForm GFx
|
||||
"ABC" // Non-standard LZMA compressed Flash
|
||||
);
|
||||
|
||||
/**
|
||||
* Color to paint when there is an error (missing image, ...)
|
||||
*/
|
||||
public static final Color ERROR_COLOR = Color.red;
|
||||
|
||||
public void updateCharacters() {
|
||||
characters = null;
|
||||
|
||||
@@ -378,8 +378,7 @@ public class BitmapExporter extends ShapeExporterBase {
|
||||
}
|
||||
}
|
||||
|
||||
// fill with red in case any error
|
||||
fillPaint = Color.RED;
|
||||
fillPaint = SWF.ERROR_COLOR;
|
||||
fillTransform = matrix.toTransform();
|
||||
}
|
||||
|
||||
@@ -576,8 +575,7 @@ public class BitmapExporter extends ShapeExporterBase {
|
||||
}
|
||||
}
|
||||
|
||||
// fill with red in case any error
|
||||
linePaint = Color.RED;
|
||||
linePaint = SWF.ERROR_COLOR;
|
||||
lineTransform = matrix.toTransform();
|
||||
}
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ public class CanvasShapeExporter extends ShapeExporterBase {
|
||||
}
|
||||
}
|
||||
|
||||
fillData.append("\tctx.fillStyle=").append(color(Color.RED.getRGB())).append(";\r\n");
|
||||
fillData.append("\tctx.fillStyle=").append(color(SWF.ERROR_COLOR.getRGB())).append(";\r\n");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -126,7 +126,7 @@ public class DefineExternalImage extends ImageTag {
|
||||
|
||||
serImage = new SerializableImage(targetWidth, targetHeight, BufferedImage.TYPE_INT_ARGB_PRE);
|
||||
Graphics g = serImage.getGraphics();
|
||||
g.setColor(Color.red);
|
||||
g.setColor(SWF.ERROR_COLOR);
|
||||
g.fillRect(0, 0, targetWidth, targetHeight);
|
||||
cachedImageFilename = null;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ public class DefineExternalImage2 extends ImageTag {
|
||||
|
||||
serImage = new SerializableImage(targetWidth, targetHeight, BufferedImage.TYPE_INT_ARGB_PRE);
|
||||
Graphics g = serImage.getGraphics();
|
||||
g.setColor(Color.red);
|
||||
g.setColor(SWF.ERROR_COLOR);
|
||||
g.fillRect(0, 0, targetWidth, targetHeight);
|
||||
cachedImageFilename = null;
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ public class DefineSubImage extends ImageTag {
|
||||
}
|
||||
serImage = new SerializableImage(x2 - x1, y2 - y1, BufferedImage.TYPE_INT_ARGB_PRE);
|
||||
Graphics g = serImage.getGraphics();
|
||||
g.setColor(Color.red);
|
||||
g.setColor(SWF.ERROR_COLOR);
|
||||
g.fillRect(0, 0, x2 - x1, y2 - y1);
|
||||
cachedImageFilename = null;
|
||||
cachedX1 = x1;
|
||||
|
||||
Reference in New Issue
Block a user