mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 02:00:58 +00:00
calculateTextBounds hack
This commit is contained in:
@@ -361,6 +361,12 @@ public abstract class TextTag extends CharacterTag implements DrawableTag {
|
|||||||
// shapeNum: 1
|
// shapeNum: 1
|
||||||
SHAPE shape = glyphs.get(entry.glyphIndex);
|
SHAPE shape = glyphs.get(entry.glyphIndex);
|
||||||
RECT glyphBounds = shape.getBounds();
|
RECT glyphBounds = shape.getBounds();
|
||||||
|
int glyphWidth = glyphBounds.getWidth();
|
||||||
|
int glyphHeight = glyphBounds.getHeight();
|
||||||
|
glyphBounds.Xmin -= glyphWidth / 2;
|
||||||
|
glyphBounds.Ymin -= glyphHeight / 2;
|
||||||
|
glyphBounds.Xmax += glyphWidth;
|
||||||
|
glyphBounds.Ymax += glyphHeight;
|
||||||
if (glyphBounds.Xmax > glyphBounds.Xmin && glyphBounds.Ymax > glyphBounds.Ymin) {
|
if (glyphBounds.Xmax > glyphBounds.Xmin && glyphBounds.Ymax > glyphBounds.Ymin) {
|
||||||
ExportRectangle rect = mat.transform(new ExportRectangle(glyphBounds));
|
ExportRectangle rect = mat.transform(new ExportRectangle(glyphBounds));
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user