1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-12-22 10:59:01 +00:00

Infer svgDimensionStyle instead of storing it in ImageBuilder.

This commit is contained in:
matthew16550 2021-04-07 19:41:13 +10:00
parent 8fc84d437a
commit f1b5a4c827

View File

@ -121,7 +121,6 @@ public class ImageBuilder {
private long seed = 42; private long seed = 42;
private ISkinParam skinParam; private ISkinParam skinParam;
private int status = 0; private int status = 0;
private boolean svgDimensionStyle = true;
private String svgLinkTarget; private String svgLinkTarget;
private TitledDiagram titledDiagram; private TitledDiagram titledDiagram;
private boolean randomPixel; private boolean randomPixel;
@ -219,7 +218,6 @@ public class ImageBuilder {
margin = calculateMargin(diagram); margin = calculateMargin(diagram);
metadata = fileFormatOption.isWithMetadata() ? diagram.getMetadata() : null; metadata = fileFormatOption.isWithMetadata() ? diagram.getMetadata() : null;
seed = diagram.seed(); seed = diagram.seed();
svgDimensionStyle = skinParam.svgDimensionStyle();
svgLinkTarget = (fileFormatOption.getSvgLinkTarget() != null) svgLinkTarget = (fileFormatOption.getSvgLinkTarget() != null)
? fileFormatOption.getSvgLinkTarget() : skinParam.getSvgLinkTarget(); ? fileFormatOption.getSvgLinkTarget() : skinParam.getSvgLinkTarget();
titledDiagram = diagram; titledDiagram = diagram;
@ -433,6 +431,7 @@ public class ImageBuilder {
final LengthAdjust lengthAdjust = skinParam == null ? LengthAdjust.defaultValue() : skinParam.getlengthAdjust(); final LengthAdjust lengthAdjust = skinParam == null ? LengthAdjust.defaultValue() : skinParam.getlengthAdjust();
final String preserveAspectRatio = getPreserveAspectRatio(); final String preserveAspectRatio = getPreserveAspectRatio();
final SvgCharSizeHack svgCharSizeHack = getSvgCharSizeHack(); final SvgCharSizeHack svgCharSizeHack = getSvgCharSizeHack();
final boolean svgDimensionStyle = skinParam == null || skinParam.svgDimensionStyle();
HColor backColor = HColorUtils.WHITE; // TODO simplify backcolor some more in a future PR HColor backColor = HColorUtils.WHITE; // TODO simplify backcolor some more in a future PR
if (this.backcolor instanceof HColorSimple) { if (this.backcolor instanceof HColorSimple) {
backColor = this.backcolor; backColor = this.backcolor;