Merge branch 'renderer_minor_fix' into 'master'

Minor fix of size calculation for rendering split cards

See merge request core-developers/forge!5164
This commit is contained in:
Alumi
2021-08-02 09:53:37 +00:00

View File

@@ -212,7 +212,7 @@ public class FCardImageRenderer {
rightArt = art.getSubimage(leftWidth, 0, art.getWidth() - leftWidth, art.getHeight());
}
int halfHeight = Math.round(370 * ratio);
int halfWidth = Math.round((halfHeight - 10) * ratio);
int halfWidth = Math.round(360 * ratio);
CARD_ART_RATIO = 2.719f;
updateAreaSizes(ratio, ratio);
drawCardStateImage(g, leftState, leftText, width, halfHeight, leftArt);
@@ -228,7 +228,7 @@ public class FCardImageRenderer {
rightArt = art.getSubimage(art.getWidth() / 2, 0, art.getWidth() / 2, art.getHeight());
}
CARD_ART_RATIO = 1.443f;
updateAreaSizes(ratio, (float)height / 2f / (float)width);
updateAreaSizes(ratio, ((float)height / 2f / (float)width) * ratio);
int widthAdjust = OUTER_BORDER_THICKNESS + PT_SIZE / 2;
int heightAdjust = height - widthAdjust - BLACK_BORDER_THICKNESS;
AffineTransform tf = g.getTransform();