From 75a2ca32c142a23d34855a16151d52832ed20f0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Fri, 8 May 2026 12:45:10 +0200 Subject: [PATCH] fix: fix text position calculation in DefineEditText --- .../decompiler/flash/tags/DefineEditTextTag.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java index 667a2e59b..93a33d08a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java @@ -1355,15 +1355,22 @@ public class DefineEditTextTag extends TextTag { } if (hasText) { List allTextRecords = getTextRecords(swf, normalizedFonts); + + MATRIX textMatrix = new MATRIX(); + + int borderPadding = 40; + textMatrix.translateX = bounds.Xmin + borderPadding; + textMatrix.translateY = bounds.Ymin + borderPadding; + switch (renderMode) { case BITMAP: - staticTextToImage(swf, allTextRecords, 2, image, getTextMatrix(), transformation, colorTransform, selectionStart, selectionEnd, aaScale); + staticTextToImage(swf, allTextRecords, 2, image, textMatrix, transformation, colorTransform, selectionStart, selectionEnd, aaScale); break; case HTML5_CANVAS: - staticTextToHtmlCanvas(zoom, swf, allTextRecords, 2, htmlCanvasBuilder, getBounds(), getTextMatrix(), colorTransform); + staticTextToHtmlCanvas(zoom, swf, allTextRecords, 2, htmlCanvasBuilder, getBounds(), textMatrix, colorTransform); break; case SVG: - staticTextToSVG(swf, allTextRecords, 2, svgExporter, getBounds(), getTextMatrix(), colorTransform, zoom, transformation); + staticTextToSVG(swf, allTextRecords, 2, svgExporter, getBounds(), textMatrix, colorTransform, zoom, transformation); break; } }