1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-09-28 06:59:02 +00:00

Infer lengthAdjust instead of storing it in ImageBuilder.

This commit is contained in:
matthew16550 2021-04-07 19:11:44 +10:00
parent 5c8b1dc46a
commit 2b712e44c0

View File

@ -116,7 +116,6 @@ public class ImageBuilder {
private Dimension2D dimension;
private final FileFormatOption fileFormatOption;
private String hoverPathColorRGB;
private LengthAdjust lengthAdjust = LengthAdjust.defaultValue();
private UDrawable udrawable;
private ClockwiseTopRightBottomLeft margin = ClockwiseTopRightBottomLeft.none();
private String metadata;
@ -226,7 +225,6 @@ public class ImageBuilder {
backcolor = calculateBackColor(diagram);
colorMapper = skinParam.getColorMapper();
hoverPathColorRGB = calculateHoverPathColor(skinParam);
lengthAdjust = skinParam.getlengthAdjust();
margin = calculateMargin(diagram);
metadata = fileFormatOption.isWithMetadata() ? diagram.getMetadata() : null;
preserveAspectRatio = calculatePreserveAspectRatio(fileFormatOption, skinParam);
@ -443,6 +441,7 @@ public class ImageBuilder {
}
private UGraphic2 createUGraphicSVG(double scaleFactor, Dimension2D dim) {
final LengthAdjust lengthAdjust = skinParam == null ? LengthAdjust.defaultValue() : skinParam.getlengthAdjust();
final SvgCharSizeHack svgCharSizeHack = getSvgCharSizeHack();
HColor backColor = HColorUtils.WHITE; // TODO simplify backcolor some more in a future PR
if (this.backcolor instanceof HColorSimple) {