mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 10:50:47 +00:00
zoom fix
This commit is contained in:
@@ -2040,11 +2040,7 @@ public class CommandLineArgumentParser {
|
||||
}
|
||||
System.out.print("Page " + page + "/" + totalPages + "...");
|
||||
RECT displayRect = new RECT(ds.getTimeline().displayRect);
|
||||
//displayRect.Xmax *= zoom;
|
||||
//displayRect.Ymax *= zoom;
|
||||
Matrix m = new Matrix();
|
||||
//m.scale(zoom);
|
||||
BufferedImage img = SWF.frameToImageGet(ds.getTimeline(), 0, 0, null, 0, displayRect, m, m, null, Color.white, zoom).getBufferedImage();
|
||||
BufferedImage img = SWF.frameToImageGet(ds.getTimeline(), 0, 0, null, 0, displayRect, new Matrix(), null, Color.white, zoom).getBufferedImage();
|
||||
PageFormat pf = new PageFormat();
|
||||
pf.setOrientation(PageFormat.PORTRAIT);
|
||||
Paper p = new Paper();
|
||||
|
||||
@@ -313,7 +313,7 @@ public class FolderPreviewPanel extends JPanel {
|
||||
String key = "frame_" + fn.frame + "_" + timeline.id + "_" + zoom;
|
||||
imgSrc = swf.getFromCache(key);
|
||||
if (imgSrc == null) {
|
||||
imgSrc = SWF.frameToImageGet(timeline, fn.frame, fn.frame, null, 0, rect, new Matrix(), new Matrix(), null, null, zoom);
|
||||
imgSrc = SWF.frameToImageGet(timeline, fn.frame, fn.frame, null, 0, rect, new Matrix(), null, null, zoom);
|
||||
swf.putToCache(key, imgSrc);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@ import java.awt.BasicStroke;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.Cursor;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Point;
|
||||
@@ -418,8 +417,7 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
|
||||
/*if (width > swf.displayRect.getWidth()) {
|
||||
scale = (double) swf.displayRect.getWidth() / (double) width;
|
||||
}*/
|
||||
Matrix m = new Matrix();
|
||||
m.translate(-rect.Xmin, -rect.Ymin);
|
||||
Matrix m = Matrix.getTranslateInstance(-rect.Xmin, -rect.Ymin);
|
||||
m.scale(scale);
|
||||
|
||||
Point p = lastMouseEvent == null ? null : lastMouseEvent.getPoint();
|
||||
@@ -736,8 +734,7 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
|
||||
SerializableImage image = new SerializableImage((int) (width / SWF.unitDivisor) + 1,
|
||||
(int) (height / SWF.unitDivisor) + 1, SerializableImage.TYPE_INT_ARGB);
|
||||
image.fillTransparent();
|
||||
Matrix m = new Matrix();
|
||||
m.translate(-rect.Xmin * zoomDouble, -rect.Ymin * zoomDouble);
|
||||
Matrix m = Matrix.getTranslateInstance(-rect.Xmin * zoomDouble, -rect.Ymin * zoomDouble);
|
||||
m.scale(zoomDouble);
|
||||
textTag.toImage(0, 0, 0, new RenderContext(), image, false, m, m, m, new ConstantColorColorTransform(0xFFC0C0C0));
|
||||
|
||||
@@ -864,7 +861,7 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
|
||||
Matrix m = new Matrix();
|
||||
m.translate(-rect.Xmin * zoom, -rect.Ymin * zoom);
|
||||
m.scale(zoom);
|
||||
timeline.toImage(frame, time, renderContext, image, false, m, new Matrix(), m, null);
|
||||
timeline.toImage(frame, time, renderContext, image, false, m, m, m, null);
|
||||
|
||||
Graphics2D gg = (Graphics2D) image.getGraphics();
|
||||
gg.setStroke(new BasicStroke(3));
|
||||
|
||||
Reference in New Issue
Block a user