From 902c7a556e45341900c2836f7a28dacb310d6929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Thu, 8 May 2025 08:22:57 +0200 Subject: [PATCH] Grid does not overlap SWF border. --- src/com/jpexs/decompiler/flash/gui/ImagePanel.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/com/jpexs/decompiler/flash/gui/ImagePanel.java b/src/com/jpexs/decompiler/flash/gui/ImagePanel.java index a68fa9577..3053e46da 100644 --- a/src/com/jpexs/decompiler/flash/gui/ImagePanel.java +++ b/src/com/jpexs/decompiler/flash/gui/ImagePanel.java @@ -924,18 +924,18 @@ public final class ImagePanel extends JPanel implements MediaDisplay { while ((double) realRect.x + ix * Configuration.gridHorizontalSpace.get() * zoom < realRect.getMaxX()) { ix++; } - maxIx = ix; + maxIx = ix - 1; iy = 0; while ((double) realRect.y + iy * Configuration.gridVerticalSpace.get() * zoom < realRect.getMaxY()) { iy++; } - maxIy = iy; + maxIy = iy - 1; for (ix = minIx; ix <= maxIx; ix++) { x = realRect.x + ix * Configuration.gridHorizontalSpace.get() * zoom; - Point2D p1 = new Point2D.Double(x, realRect.y + minIy * Configuration.gridVerticalSpace.get() * zoom); - Point2D p2 = new Point2D.Double(x, realRect.y + maxIy * Configuration.gridVerticalSpace.get() * zoom); + Point2D p1 = new Point2D.Double(x, realRect.getMinY()); + Point2D p2 = new Point2D.Double(x, realRect.getMaxY()); g.drawLine( (int) Math.round(p1.getX()), (int) Math.round(p1.getY()), @@ -946,8 +946,8 @@ public final class ImagePanel extends JPanel implements MediaDisplay { for (iy = minIy; iy <= maxIy; iy++) { y = realRect.y + iy * Configuration.gridVerticalSpace.get() * zoom; - Point2D p1 = new Point2D.Double(realRect.x + minIx * Configuration.gridHorizontalSpace.get() * zoom, y); - Point2D p2 = new Point2D.Double(realRect.x + maxIx * Configuration.gridHorizontalSpace.get() * zoom, y); + Point2D p1 = new Point2D.Double(realRect.getMinX(), y); + Point2D p2 = new Point2D.Double(realRect.getMaxX(), y); g.drawLine( (int) Math.round(p1.getX()), (int) Math.round(p1.getY()),