mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-26 06:46:45 +00:00
Remove redundant UGraphicTikz constructor param
This commit is contained in:
parent
ff53f679ef
commit
eecb097640
@ -48,7 +48,6 @@ import net.sourceforge.plantuml.EmptyImageBuilder;
|
|||||||
import net.sourceforge.plantuml.FileFormat;
|
import net.sourceforge.plantuml.FileFormat;
|
||||||
import net.sourceforge.plantuml.SpriteContainerEmpty;
|
import net.sourceforge.plantuml.SpriteContainerEmpty;
|
||||||
import net.sourceforge.plantuml.SvgCharSizeHack;
|
import net.sourceforge.plantuml.SvgCharSizeHack;
|
||||||
import net.sourceforge.plantuml.TikzFontDistortion;
|
|
||||||
import net.sourceforge.plantuml.api.ImageDataSimple;
|
import net.sourceforge.plantuml.api.ImageDataSimple;
|
||||||
import net.sourceforge.plantuml.core.ImageData;
|
import net.sourceforge.plantuml.core.ImageData;
|
||||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||||
@ -99,7 +98,7 @@ public class GraphicsSudoku {
|
|||||||
|
|
||||||
public ImageData writeImageLatex(OutputStream os, FileFormat fileFormat) throws IOException {
|
public ImageData writeImageLatex(OutputStream os, FileFormat fileFormat) throws IOException {
|
||||||
final UGraphicTikz ug = new UGraphicTikz(HColorUtils.WHITE, new ColorMapperIdentity(), FileFormat.LATEX.getDefaultStringBounder(), 1,
|
final UGraphicTikz ug = new UGraphicTikz(HColorUtils.WHITE, new ColorMapperIdentity(), FileFormat.LATEX.getDefaultStringBounder(), 1,
|
||||||
fileFormat == FileFormat.LATEX, TikzFontDistortion.getDefault());
|
fileFormat == FileFormat.LATEX);
|
||||||
drawInternal(ug);
|
drawInternal(ug);
|
||||||
ug.writeToStream(os, null, -1); // dpi param is not used
|
ug.writeToStream(os, null, -1); // dpi param is not used
|
||||||
return ImageDataSimple.ok();
|
return ImageDataSimple.ok();
|
||||||
|
@ -418,9 +418,9 @@ public class ImageBuilder {
|
|||||||
case VDX:
|
case VDX:
|
||||||
return new UGraphicVdx(backcolor, colorMapper);
|
return new UGraphicVdx(backcolor, colorMapper);
|
||||||
case LATEX:
|
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:
|
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:
|
case BRAILLE_PNG:
|
||||||
return new UGraphicBraille(backcolor, colorMapper);
|
return new UGraphicBraille(backcolor, colorMapper);
|
||||||
case UTXT:
|
case UTXT:
|
||||||
|
@ -37,7 +37,6 @@ package net.sourceforge.plantuml.ugraphic.tikz;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.TikzFontDistortion;
|
|
||||||
import net.sourceforge.plantuml.Url;
|
import net.sourceforge.plantuml.Url;
|
||||||
import net.sourceforge.plantuml.creole.legacy.AtomText;
|
import net.sourceforge.plantuml.creole.legacy.AtomText;
|
||||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
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 {
|
public class UGraphicTikz extends AbstractUGraphic<TikzGraphics> implements ClipContainer {
|
||||||
|
|
||||||
private UGraphicTikz(HColor defaultBackground, ColorMapper colorMapper, StringBounder stringBounder, TikzGraphics tikz,
|
private UGraphicTikz(HColor defaultBackground, ColorMapper colorMapper, StringBounder stringBounder, TikzGraphics tikz) {
|
||||||
TikzFontDistortion tikzFontDistortion) {
|
|
||||||
super(defaultBackground, colorMapper, stringBounder, tikz);
|
super(defaultBackground, colorMapper, stringBounder, tikz);
|
||||||
register();
|
register();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public UGraphicTikz(HColor defaultBackground, ColorMapper colorMapper, StringBounder stringBounder, double scale, boolean withPreamble,
|
public UGraphicTikz(HColor defaultBackground, ColorMapper colorMapper, StringBounder stringBounder, double scale, boolean withPreamble) {
|
||||||
TikzFontDistortion tikzFontDistortion) {
|
this(defaultBackground, colorMapper, stringBounder, new TikzGraphics(scale, withPreamble));
|
||||||
this(defaultBackground, colorMapper, stringBounder, new TikzGraphics(scale, withPreamble), tikzFontDistortion);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user