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

Remove redundant UGraphicTikz constructor param

This commit is contained in:
matthew16550 2021-10-03 04:34:41 +11:00
parent ff53f679ef
commit eecb097640
3 changed files with 6 additions and 10 deletions

View File

@ -48,7 +48,6 @@ import net.sourceforge.plantuml.EmptyImageBuilder;
import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.SpriteContainerEmpty;
import net.sourceforge.plantuml.SvgCharSizeHack;
import net.sourceforge.plantuml.TikzFontDistortion;
import net.sourceforge.plantuml.api.ImageDataSimple;
import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.cucadiagram.Display;
@ -99,7 +98,7 @@ public class GraphicsSudoku {
public ImageData writeImageLatex(OutputStream os, FileFormat fileFormat) throws IOException {
final UGraphicTikz ug = new UGraphicTikz(HColorUtils.WHITE, new ColorMapperIdentity(), FileFormat.LATEX.getDefaultStringBounder(), 1,
fileFormat == FileFormat.LATEX, TikzFontDistortion.getDefault());
fileFormat == FileFormat.LATEX);
drawInternal(ug);
ug.writeToStream(os, null, -1); // dpi param is not used
return ImageDataSimple.ok();

View File

@ -418,9 +418,9 @@ public class ImageBuilder {
case VDX:
return new UGraphicVdx(backcolor, colorMapper);
case LATEX:
return new UGraphicTikz(backcolor, colorMapper, FileFormat.LATEX.getDefaultStringBounder(option.getTikzFontDistortion()), scaleFactor, true, option.getTikzFontDistortion());
return new UGraphicTikz(backcolor, colorMapper, FileFormat.LATEX.getDefaultStringBounder(option.getTikzFontDistortion()), scaleFactor, true);
case LATEX_NO_PREAMBLE:
return new UGraphicTikz(backcolor, colorMapper, FileFormat.LATEX.getDefaultStringBounder(option.getTikzFontDistortion()), scaleFactor, false, option.getTikzFontDistortion());
return new UGraphicTikz(backcolor, colorMapper, FileFormat.LATEX.getDefaultStringBounder(option.getTikzFontDistortion()), scaleFactor, false);
case BRAILLE_PNG:
return new UGraphicBraille(backcolor, colorMapper);
case UTXT:

View File

@ -37,7 +37,6 @@ package net.sourceforge.plantuml.ugraphic.tikz;
import java.io.IOException;
import java.io.OutputStream;
import net.sourceforge.plantuml.TikzFontDistortion;
import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.creole.legacy.AtomText;
import net.sourceforge.plantuml.graphic.StringBounder;
@ -60,16 +59,14 @@ import net.sourceforge.plantuml.ugraphic.color.HColor;
public class UGraphicTikz extends AbstractUGraphic<TikzGraphics> implements ClipContainer {
private UGraphicTikz(HColor defaultBackground, ColorMapper colorMapper, StringBounder stringBounder, TikzGraphics tikz,
TikzFontDistortion tikzFontDistortion) {
private UGraphicTikz(HColor defaultBackground, ColorMapper colorMapper, StringBounder stringBounder, TikzGraphics tikz) {
super(defaultBackground, colorMapper, stringBounder, tikz);
register();
}
public UGraphicTikz(HColor defaultBackground, ColorMapper colorMapper, StringBounder stringBounder, double scale, boolean withPreamble,
TikzFontDistortion tikzFontDistortion) {
this(defaultBackground, colorMapper, stringBounder, new TikzGraphics(scale, withPreamble), tikzFontDistortion);
public UGraphicTikz(HColor defaultBackground, ColorMapper colorMapper, StringBounder stringBounder, double scale, boolean withPreamble) {
this(defaultBackground, colorMapper, stringBounder, new TikzGraphics(scale, withPreamble));
}