mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-23 12:15:34 +00:00
tags parameter removed where not needed
ImageFrame - resizing sprites to max of stage size ButtonTag is Timelined MorphShapeTag has getShapeAtRatio using DefineButtonCxForm on Button1 timeline
This commit is contained in:
@@ -223,8 +223,15 @@ public final class ImagePanel extends JPanel implements ActionListener, FlashDis
|
||||
if (rect == null) { //??? Why?
|
||||
rect = new RECT(0, 0, 1, 1);
|
||||
}
|
||||
SerializableImage image = new SerializableImage((int) (rect.getWidth() / SWF.unitDivisor) + 1,
|
||||
(int) (rect.getHeight() / SWF.unitDivisor) + 1, SerializableImage.TYPE_INT_ARGB);
|
||||
int width = rect.getWidth();
|
||||
int height = rect.getHeight();
|
||||
double scale = 1.0;
|
||||
if (width > swf.displayRect.getWidth()) {
|
||||
scale = (double) swf.displayRect.getWidth() / (double) width;
|
||||
width = swf.displayRect.getWidth();
|
||||
}
|
||||
SerializableImage image = new SerializableImage((int) (width / SWF.unitDivisor) + 1,
|
||||
(int) (height / SWF.unitDivisor) + 1, SerializableImage.TYPE_INT_ARGB);
|
||||
//Make all pixels transparent
|
||||
Graphics2D g = (Graphics2D) image.getGraphics();
|
||||
g.setComposite(AlphaComposite.Src);
|
||||
@@ -232,6 +239,7 @@ public final class ImagePanel extends JPanel implements ActionListener, FlashDis
|
||||
g.fillRect(0, 0, image.getWidth(), image.getHeight());
|
||||
Matrix m = new Matrix();
|
||||
m.translate(-rect.Xmin, -rect.Ymin);
|
||||
m.scale(scale);
|
||||
drawable.toImage(frame, frame, swf.tags, characters, new Stack<Integer>(), image, m, new ColorTransform());
|
||||
img = image;
|
||||
} else if (drawable instanceof FontTag) {
|
||||
|
||||
Reference in New Issue
Block a user