1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-11-23 05:22:05 +00:00

Add FileFormat.getDefaultStringBounder(SvgCharSizeHack)

This commit is contained in:
matthew16550 2021-10-03 04:50:13 +11:00
parent f1bff6dde6
commit 2b2a47b9f0
2 changed files with 5 additions and 2 deletions

View File

@ -132,6 +132,10 @@ public enum FileFormat {
return getDefaultStringBounder(TikzFontDistortion.getDefault(), SvgCharSizeHack.NO_HACK); return getDefaultStringBounder(TikzFontDistortion.getDefault(), SvgCharSizeHack.NO_HACK);
} }
public StringBounder getDefaultStringBounder(SvgCharSizeHack charSizeHack) {
return getDefaultStringBounder(TikzFontDistortion.getDefault(), charSizeHack);
}
public StringBounder getDefaultStringBounder(TikzFontDistortion tikzFontDistortion) { public StringBounder getDefaultStringBounder(TikzFontDistortion tikzFontDistortion) {
return getDefaultStringBounder(tikzFontDistortion, SvgCharSizeHack.NO_HACK); return getDefaultStringBounder(tikzFontDistortion, SvgCharSizeHack.NO_HACK);
} }

View File

@ -42,7 +42,6 @@ import javax.xml.transform.TransformerException;
import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.SvgCharSizeHack; import net.sourceforge.plantuml.SvgCharSizeHack;
import net.sourceforge.plantuml.TikzFontDistortion;
import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.posimo.DotPath;
import net.sourceforge.plantuml.svg.LengthAdjust; import net.sourceforge.plantuml.svg.LengthAdjust;
@ -116,7 +115,7 @@ public class UGraphicSvg extends AbstractUGraphic<SvgGraphics> implements ClipCo
private UGraphicSvg(HColor defaultBackground, Dimension2D minDim, ColorMapper colorMapper, SvgGraphics svg, private UGraphicSvg(HColor defaultBackground, Dimension2D minDim, ColorMapper colorMapper, SvgGraphics svg,
boolean textAsPath, String linkTarget, SvgCharSizeHack charSizeHack) { boolean textAsPath, String linkTarget, SvgCharSizeHack charSizeHack) {
super(defaultBackground, colorMapper, FileFormat.SVG.getDefaultStringBounder(TikzFontDistortion.getDefault(), charSizeHack), svg); super(defaultBackground, colorMapper, FileFormat.SVG.getDefaultStringBounder(charSizeHack), svg);
this.textAsPath2 = textAsPath; this.textAsPath2 = textAsPath;
this.target = linkTarget; this.target = linkTarget;
register(); register();