1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-06-18 08:02:21 +00:00

version 1.2020.3

This commit is contained in:
Arnaud Roques 2020-03-18 11:50:02 +01:00
parent 7a5b515bf6
commit 03b30b1007
721 changed files with 5390 additions and 3980 deletions

View File

@ -35,7 +35,7 @@
<groupId>net.sourceforge.plantuml</groupId>
<artifactId>plantuml</artifactId>
<version>1.2020.3-SNAPSHOT</version>
<version>1.2020.4-SNAPSHOT</version>
<packaging>jar</packaging>
<name>PlantUML</name>

View File

@ -44,8 +44,6 @@ import net.sourceforge.plantuml.cucadiagram.DisplayPositionned;
import net.sourceforge.plantuml.cucadiagram.DisplaySection;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.graphic.InnerStrategy;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.SymbolContext;
@ -60,6 +58,8 @@ import net.sourceforge.plantuml.svek.TextBlockBackcolored;
import net.sourceforge.plantuml.ugraphic.MinMax;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public class AnnotatedWorker {
@ -97,7 +97,7 @@ public class AnnotatedWorker {
final double y1 = 10;
final double y2 = 10;
final SymbolContext symbolContext = new SymbolContext(getSkinParam().getBackgroundColor(), HtmlColorUtils.BLACK)
final SymbolContext symbolContext = new SymbolContext(getSkinParam().getBackgroundColor(), HColorUtils.BLACK)
.withShadow(getSkinParam().shadowing(null) ? 3 : 0);
final MinMax originalMinMax = TextBlockUtils.getMinMax(original, stringBounder);
final TextBlock title = mainFrame.create(new FontConfiguration(getSkinParam(), FontParam.CAPTION, null),
@ -112,7 +112,7 @@ public class AnnotatedWorker {
return new TextBlockBackcolored() {
public void drawU(UGraphic ug) {
frame.drawU(ug.apply(new UTranslate(originalMinMax.getMinX(), 0)));
frame.drawU(ug.apply(UTranslate.dx(originalMinMax.getMinX())));
original.drawU(ug.apply(new UTranslate(x1, y1 + dimTitle.getHeight())));
// original.drawU(ug);
}
@ -131,7 +131,7 @@ public class AnnotatedWorker {
return original.calculateDimension(stringBounder);
}
public HtmlColor getBackcolor() {
public HColor getBackcolor() {
return symbolContext.getBackColor();
}
};

View File

@ -40,7 +40,9 @@ import java.security.MessageDigest;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import net.sourceforge.plantuml.code.AsciiEncoder;
import net.sourceforge.plantuml.code.Transcoder;
@ -49,6 +51,7 @@ import net.sourceforge.plantuml.command.regex.Matcher2;
import net.sourceforge.plantuml.core.Diagram;
import net.sourceforge.plantuml.error.PSystemErrorPreprocessor;
import net.sourceforge.plantuml.preproc.Defines;
import net.sourceforge.plantuml.preproc.FileWithSuffix;
import net.sourceforge.plantuml.preproc2.PreprocessorModeSet;
import net.sourceforge.plantuml.tim.TimLoader;
import net.sourceforge.plantuml.utils.StartUtils;
@ -61,6 +64,11 @@ public class BlockUml {
private Diagram system;
private final Defines localDefines;
private final ISkinSimple skinParam;
private final Set<FileWithSuffix> included = new HashSet<FileWithSuffix>();
public Set<FileWithSuffix> getIncluded() {
return Collections.unmodifiableSet(included);
}
BlockUml(String... strings) {
this(convert(strings), Defines.createEmpty(), null, null);
@ -111,7 +119,7 @@ public class BlockUml {
} else {
final TimLoader timLoader = new TimLoader(mode.getImportedFiles(), defines, mode.getCharset(),
(DefinitionsContainer) mode);
timLoader.load(strings);
this.included.addAll(timLoader.load(strings));
this.data = timLoader.getResultList();
this.debug = timLoader.getDebug();
this.preprocessorError = timLoader.isPreprocessorError();

View File

@ -75,7 +75,7 @@ public final class BlockUmlBuilder implements DefinitionsContainer {
} finally {
if (includer != null) {
includer.close();
usedFiles = includer.getFilesUsed();
// usedFiles = includer.getFilesUsedTOBEREMOVED();
}
readerInit.close();
}
@ -120,7 +120,9 @@ public final class BlockUmlBuilder implements DefinitionsContainer {
if (paused) {
current2.add(s);
}
blocks.add(new BlockUml(current2, defines.cloneMe(), null, this));
final BlockUml uml = new BlockUml(current2, defines.cloneMe(), null, this);
usedFiles.addAll(uml.getIncluded());
blocks.add(uml);
current2 = null;
reader.setPaused(false);
}

View File

@ -35,164 +35,164 @@
*/
package net.sourceforge.plantuml;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public enum ColorParam {
background(HtmlColorUtils.WHITE, true, ColorType.BACK),
hyperlink(HtmlColorUtils.BLUE),
background(HColorUtils.WHITE, true, ColorType.BACK),
hyperlink(HColorUtils.BLUE),
activityDiamondBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
activityDiamondBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
activityBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
activityBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
activityStart(HtmlColorUtils.BLACK),
activityEnd(HtmlColorUtils.BLACK),
activityBar(HtmlColorUtils.BLACK),
swimlaneBorder(HtmlColorUtils.BLACK),
activityDiamondBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
activityDiamondBorder(HColorUtils.MY_RED, ColorType.LINE),
activityBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
activityBorder(HColorUtils.MY_RED, ColorType.LINE),
activityStart(HColorUtils.BLACK),
activityEnd(HColorUtils.BLACK),
activityBar(HColorUtils.BLACK),
swimlaneBorder(HColorUtils.BLACK),
swimlaneTitleBackground(null),
usecaseBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
usecaseBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
usecaseBorder(HColorUtils.MY_RED, ColorType.LINE),
usecaseBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
objectBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
objectBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
objectBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
objectBorder(HColorUtils.MY_RED, ColorType.LINE),
classHeaderBackground(null, true, ColorType.BACK),
classBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
enumBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
classBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
stereotypeCBackground(HtmlColorUtils.COL_ADD1B2),
stereotypeNBackground(HtmlColorUtils.COL_E3664A),
stereotypeABackground(HtmlColorUtils.COL_A9DCDF),
stereotypeIBackground(HtmlColorUtils.COL_B4A7E5),
stereotypeEBackground(HtmlColorUtils.COL_EB937F),
classBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
enumBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
classBorder(HColorUtils.MY_RED, ColorType.LINE),
stereotypeCBackground(HColorUtils.COL_ADD1B2),
stereotypeNBackground(HColorUtils.COL_E3664A),
stereotypeABackground(HColorUtils.COL_A9DCDF),
stereotypeIBackground(HColorUtils.COL_B4A7E5),
stereotypeEBackground(HColorUtils.COL_EB937F),
stereotypeCBorder(null),
stereotypeNBorder(null),
stereotypeABorder(null),
stereotypeIBorder(null),
stereotypeEBorder(null),
packageBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
packageBorder(HtmlColorUtils.BLACK, ColorType.LINE),
packageBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
packageBorder(HColorUtils.BLACK, ColorType.LINE),
partitionBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
partitionBorder(HtmlColorUtils.BLACK, ColorType.LINE),
partitionBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
partitionBorder(HColorUtils.BLACK, ColorType.LINE),
componentBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
componentBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
interfaceBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
interfaceBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
arrow(HtmlColorUtils.MY_RED, ColorType.ARROW),
componentBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
componentBorder(HColorUtils.MY_RED, ColorType.LINE),
interfaceBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
interfaceBorder(HColorUtils.MY_RED, ColorType.LINE),
arrow(HColorUtils.MY_RED, ColorType.ARROW),
stateBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
stateBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
stateStart(HtmlColorUtils.BLACK),
stateEnd(HtmlColorUtils.BLACK),
stateBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
stateBorder(HColorUtils.MY_RED, ColorType.LINE),
stateStart(HColorUtils.BLACK),
stateEnd(HColorUtils.BLACK),
noteBackground(HtmlColorUtils.COL_FBFB77, true, ColorType.BACK),
noteBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
noteBackground(HColorUtils.COL_FBFB77, true, ColorType.BACK),
noteBorder(HColorUtils.MY_RED, ColorType.LINE),
legendBackground(HtmlColorUtils.COL_DDDDDD, true, ColorType.BACK),
legendBorder(HtmlColorUtils.BLACK, ColorType.LINE),
legendBackground(HColorUtils.COL_DDDDDD, true, ColorType.BACK),
legendBorder(HColorUtils.BLACK, ColorType.LINE),
titleBackground(null, true, ColorType.BACK),
titleBorder(null, ColorType.LINE),
diagramBorder(null, ColorType.LINE),
actorBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
actorBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
participantBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
participantBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
sequenceGroupBorder(HtmlColorUtils.BLACK, ColorType.LINE),
sequenceGroupBackground(HtmlColorUtils.COL_EEEEEE, true, ColorType.BACK),
sequenceGroupBodyBackground(HtmlColorUtils.RED, true, ColorType.BACK),
sequenceReferenceBorder(HtmlColorUtils.BLACK, ColorType.LINE),
sequenceReferenceHeaderBackground(HtmlColorUtils.COL_EEEEEE, true, ColorType.BACK),
sequenceReferenceBackground(HtmlColorUtils.WHITE, true, ColorType.BACK),
sequenceDividerBackground(HtmlColorUtils.COL_EEEEEE, true, ColorType.BACK),
sequenceDividerBorder(HtmlColorUtils.BLACK, ColorType.LINE),
sequenceLifeLineBackground(HtmlColorUtils.WHITE, true, ColorType.BACK),
sequenceLifeLineBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
sequenceNewpageSeparator(HtmlColorUtils.BLACK, ColorType.LINE),
sequenceBoxBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
sequenceBoxBackground(HtmlColorUtils.COL_DDDDDD, true, ColorType.BACK),
actorBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
actorBorder(HColorUtils.MY_RED, ColorType.LINE),
participantBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
participantBorder(HColorUtils.MY_RED, ColorType.LINE),
sequenceGroupBorder(HColorUtils.BLACK, ColorType.LINE),
sequenceGroupBackground(HColorUtils.COL_EEEEEE, true, ColorType.BACK),
sequenceGroupBodyBackground(HColorUtils.RED, true, ColorType.BACK),
sequenceReferenceBorder(HColorUtils.BLACK, ColorType.LINE),
sequenceReferenceHeaderBackground(HColorUtils.COL_EEEEEE, true, ColorType.BACK),
sequenceReferenceBackground(HColorUtils.WHITE, true, ColorType.BACK),
sequenceDividerBackground(HColorUtils.COL_EEEEEE, true, ColorType.BACK),
sequenceDividerBorder(HColorUtils.BLACK, ColorType.LINE),
sequenceLifeLineBackground(HColorUtils.WHITE, true, ColorType.BACK),
sequenceLifeLineBorder(HColorUtils.MY_RED, ColorType.LINE),
sequenceNewpageSeparator(HColorUtils.BLACK, ColorType.LINE),
sequenceBoxBorder(HColorUtils.MY_RED, ColorType.LINE),
sequenceBoxBackground(HColorUtils.COL_DDDDDD, true, ColorType.BACK),
artifactBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
artifactBorder(HtmlColorUtils.BLACK, ColorType.LINE),
cloudBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
cloudBorder(HtmlColorUtils.BLACK, ColorType.LINE),
queueBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
queueBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
stackBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
stackBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
databaseBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
databaseBorder(HtmlColorUtils.BLACK, ColorType.LINE),
folderBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
folderBorder(HtmlColorUtils.BLACK, ColorType.LINE),
fileBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
fileBorder(HtmlColorUtils.BLACK, ColorType.LINE),
frameBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
frameBorder(HtmlColorUtils.BLACK, ColorType.LINE),
nodeBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
nodeBorder(HtmlColorUtils.BLACK, ColorType.LINE),
rectangleBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
rectangleBorder(HtmlColorUtils.BLACK, ColorType.LINE),
archimateBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
archimateBorder(HtmlColorUtils.BLACK, ColorType.LINE),
cardBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
cardBorder(HtmlColorUtils.BLACK, ColorType.LINE),
agentBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
agentBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
storageBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
storageBorder(HtmlColorUtils.BLACK, ColorType.LINE),
boundaryBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
boundaryBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
collectionsBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
collectionsBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
controlBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
controlBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
entityBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK),
entityBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
artifactBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
artifactBorder(HColorUtils.BLACK, ColorType.LINE),
cloudBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
cloudBorder(HColorUtils.BLACK, ColorType.LINE),
queueBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
queueBorder(HColorUtils.MY_RED, ColorType.LINE),
stackBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
stackBorder(HColorUtils.MY_RED, ColorType.LINE),
databaseBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
databaseBorder(HColorUtils.BLACK, ColorType.LINE),
folderBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
folderBorder(HColorUtils.BLACK, ColorType.LINE),
fileBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
fileBorder(HColorUtils.BLACK, ColorType.LINE),
frameBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
frameBorder(HColorUtils.BLACK, ColorType.LINE),
nodeBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
nodeBorder(HColorUtils.BLACK, ColorType.LINE),
rectangleBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
rectangleBorder(HColorUtils.BLACK, ColorType.LINE),
archimateBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
archimateBorder(HColorUtils.BLACK, ColorType.LINE),
cardBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
cardBorder(HColorUtils.BLACK, ColorType.LINE),
agentBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
agentBorder(HColorUtils.MY_RED, ColorType.LINE),
storageBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
storageBorder(HColorUtils.BLACK, ColorType.LINE),
boundaryBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
boundaryBorder(HColorUtils.MY_RED, ColorType.LINE),
collectionsBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
collectionsBorder(HColorUtils.MY_RED, ColorType.LINE),
controlBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
controlBorder(HColorUtils.MY_RED, ColorType.LINE),
entityBackground(HColorUtils.MY_YELLOW, true, ColorType.BACK),
entityBorder(HColorUtils.MY_RED, ColorType.LINE),
iconPrivate(HtmlColorUtils.COL_C82930),
iconPrivateBackground(HtmlColorUtils.COL_F24D5C),
iconPackage(HtmlColorUtils.COL_1963A0),
iconPackageBackground(HtmlColorUtils.COL_4177AF),
iconProtected(HtmlColorUtils.COL_B38D22),
iconProtectedBackground(HtmlColorUtils.COL_FFFF44),
iconPublic(HtmlColorUtils.COL_038048),
iconPublicBackground(HtmlColorUtils.COL_84BE84),
iconIEMandatory(HtmlColorUtils.BLACK),
iconPrivate(HColorUtils.COL_C82930),
iconPrivateBackground(HColorUtils.COL_F24D5C),
iconPackage(HColorUtils.COL_1963A0),
iconPackageBackground(HColorUtils.COL_4177AF),
iconProtected(HColorUtils.COL_B38D22),
iconProtectedBackground(HColorUtils.COL_FFFF44),
iconPublic(HColorUtils.COL_038048),
iconPublicBackground(HColorUtils.COL_84BE84),
iconIEMandatory(HColorUtils.BLACK),
arrowLollipop(HtmlColorUtils.WHITE),
arrowLollipop(HColorUtils.WHITE),
machineBackground(HtmlColorUtils.WHITE),
machineBorder(HtmlColorUtils.BLACK, ColorType.LINE),
requirementBackground(HtmlColorUtils.WHITE),
requirementBorder(HtmlColorUtils.BLACK, ColorType.LINE),
designedBackground(HtmlColorUtils.WHITE),
designedBorder(HtmlColorUtils.BLACK, ColorType.LINE),
domainBackground(HtmlColorUtils.WHITE),
domainBorder(HtmlColorUtils.BLACK, ColorType.LINE),
lexicalBackground(HtmlColorUtils.WHITE),
lexicalBorder(HtmlColorUtils.BLACK, ColorType.LINE),
biddableBackground(HtmlColorUtils.WHITE),
biddableBorder(HtmlColorUtils.BLACK, ColorType.LINE);
machineBackground(HColorUtils.WHITE),
machineBorder(HColorUtils.BLACK, ColorType.LINE),
requirementBackground(HColorUtils.WHITE),
requirementBorder(HColorUtils.BLACK, ColorType.LINE),
designedBackground(HColorUtils.WHITE),
designedBorder(HColorUtils.BLACK, ColorType.LINE),
domainBackground(HColorUtils.WHITE),
domainBorder(HColorUtils.BLACK, ColorType.LINE),
lexicalBackground(HColorUtils.WHITE),
lexicalBorder(HColorUtils.BLACK, ColorType.LINE),
biddableBackground(HColorUtils.WHITE),
biddableBorder(HColorUtils.BLACK, ColorType.LINE);
private final boolean isBackground;
private final HtmlColor defaultValue;
private final HColor defaultValue;
private final ColorType colorType;
private ColorParam(HtmlColor defaultValue, ColorType colorType) {
private ColorParam(HColor defaultValue, ColorType colorType) {
this(defaultValue, false, colorType);
}
private ColorParam(HtmlColor defaultValue) {
private ColorParam(HColor defaultValue) {
this(defaultValue, false, null);
}
@ -204,7 +204,7 @@ public enum ColorParam {
this(null, isBackground, null);
}
private ColorParam(HtmlColor defaultValue, boolean isBackground, ColorType colorType) {
private ColorParam(HColor defaultValue, boolean isBackground, ColorType colorType) {
this.isBackground = isBackground;
this.defaultValue = defaultValue;
this.colorType = colorType;
@ -218,7 +218,7 @@ public enum ColorParam {
return isBackground;
}
public final HtmlColor getDefaultValue() {
public final HColor getDefaultValue() {
return defaultValue;
}

View File

@ -45,7 +45,7 @@ import java.util.List;
import javax.imageio.ImageIO;
import net.sourceforge.plantuml.core.Diagram;
import net.sourceforge.plantuml.creole.Atom;
import net.sourceforge.plantuml.creole.atom.Atom;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;

View File

@ -41,8 +41,8 @@ import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils;
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.UAntiAliasing;
import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.g2d.UGraphicG2d;
public class EmptyImageBuilder {

View File

@ -41,7 +41,6 @@ import net.sourceforge.plantuml.cucadiagram.Rankdir;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.cucadiagram.dot.DotSplines;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.SkinParameter;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.skin.ActorStyle;
@ -54,22 +53,23 @@ import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.svek.PackageStyle;
import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public interface ISkinParam extends ISkinSimple {
public static final int SWIMLANE_WIDTH_SAME = -1;
public HtmlColor getHyperlinkColor();
public HColor getHyperlinkColor();
public boolean useUnderlineForHyperlink();
public HtmlColor getBackgroundColor();
public HColor getBackgroundColor();
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable);
public HColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable);
public Colors getColors(ColorParam param, Stereotype stereotype);
public HtmlColor getFontHtmlColor(Stereotype stereotype, FontParam... param);
public HColor getFontHtmlColor(Stereotype stereotype, FontParam... param);
public UStroke getThickness(LineParam param, Stereotype stereotype);
@ -156,7 +156,7 @@ public interface ISkinParam extends ISkinSimple {
public UmlDiagramType getUmlDiagramType();
public HtmlColor getHoverPathColor();
public HColor getHoverPathColor();
public TikzFontDistortion getTikzFontDistortion();

View File

@ -37,8 +37,8 @@ package net.sourceforge.plantuml;
import java.util.Map;
import net.sourceforge.plantuml.graphic.IHtmlColorSet;
import net.sourceforge.plantuml.ugraphic.ColorMapper;
import net.sourceforge.plantuml.ugraphic.color.ColorMapper;
import net.sourceforge.plantuml.ugraphic.color.HColorSet;
public interface ISkinSimple extends SpriteContainer {
@ -52,7 +52,7 @@ public interface ISkinSimple extends SpriteContainer {
public int getTabSize();
public IHtmlColorSet getIHtmlColorSet();
public HColorSet getIHtmlColorSet();
public int getDpi();

View File

@ -35,15 +35,15 @@
*/
package net.sourceforge.plantuml;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public interface LineConfigurable {
public Colors getColors(ISkinParam skinParam);
public void setSpecificColorTOBEREMOVED(ColorType type, HtmlColor color);
public void setSpecificColorTOBEREMOVED(ColorType type, HColor color);

View File

@ -58,6 +58,7 @@ public enum LineParam {
archimateBorder,
componentBorder,
cardBorder,
queueBorder,
agentBorder,
domainBorder, designedDomainBorder, machineBorder, requirementBorder;
// sequenceBoxBorder(0.1);

View File

@ -49,11 +49,11 @@ import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3;
import net.sourceforge.plantuml.core.Diagram;
import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.cucadiagram.CucaDiagram;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.html.CucaDiagramHtmlMaker;
import net.sourceforge.plantuml.png.PngSplitter;
import net.sourceforge.plantuml.project.GanttDiagram;
import net.sourceforge.plantuml.sequencediagram.SequenceDiagram;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public class PSystemUtils {
@ -300,7 +300,7 @@ public class PSystemUtils {
List<File> result = Arrays.asList(suggestedFile.getFile(0));
if (fileFormat.getFileFormat() == FileFormat.PNG) {
final SplitParam splitParam = new SplitParam(HtmlColorUtils.BLACK, null, 5);
final SplitParam splitParam = new SplitParam(HColorUtils.BLACK, null, 5);
result = new PngSplitter(suggestedFile, system.getHorizontalPages(), system.getVerticalPages(),
system.getMetadata(), system.getDpi(fileFormat), fileFormat.isWithMetadata(), splitParam)
.getFiles();

View File

@ -291,8 +291,8 @@ public class Run {
}
final String name = getSpriteName(fileName);
final String s = compressed ? SpriteUtils.encodeCompressed(im, name, level) : SpriteUtils.encode(im, name,
level);
final String s = compressed ? SpriteUtils.encodeCompressed(im, name, level)
: SpriteUtils.encode(im, name, level);
System.out.println(s);
}
@ -326,8 +326,8 @@ public class Run {
public static void printFonts() {
final Font fonts[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
for (Font f : fonts) {
System.out.println("f=" + f + "/" + f.getPSName() + "/" + f.getName() + "/" + f.getFontName() + "/"
+ f.getFamily());
System.out.println(
"f=" + f + "/" + f.getPSName() + "/" + f.getName() + "/" + f.getFontName() + "/" + f.getFamily());
}
final String name[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
for (String n : name) {
@ -458,8 +458,8 @@ public class Run {
ProgressBar.incTotal(nb);
}
private static void manageFileInternal(File f, Option option, ErrorStatus error) throws IOException,
InterruptedException {
private static void manageFileInternal(File f, Option option, ErrorStatus error)
throws IOException, InterruptedException {
Log.info("Working on " + f.getAbsolutePath());
if (OptionFlags.getInstance().isExtractFromMetadata()) {
System.out.println("------------------------");
@ -540,9 +540,19 @@ public class Run {
final File file = suggested.getFile(0);
Log.info("Export preprocessing source to " + file.getAbsolutePath());
final PrintWriter pw = charset == null ? new PrintWriter(file) : new PrintWriter(file, charset);
for (CharSequence s : blockUml.getDefinition(true)) {
int level = 0;
for (CharSequence cs : blockUml.getDefinition(true)) {
String s = cs.toString();
if (cypher != null) {
s = cypher.cypher(s.toString());
if (s.contains("skinparam") && s.contains("{")) {
level++;
}
if (level == 0 && s.contains("skinparam") == false) {
s = cypher.cypher(s);
}
if (level > 0 && s.contains("}")) {
level--;
}
}
pw.println(s);
}

View File

@ -52,16 +52,12 @@ import net.sourceforge.plantuml.command.BlocLines;
import net.sourceforge.plantuml.command.regex.Matcher2;
import net.sourceforge.plantuml.command.regex.MyPattern;
import net.sourceforge.plantuml.command.regex.Pattern2;
import net.sourceforge.plantuml.creole.CommandCreoleMonospaced;
import net.sourceforge.plantuml.creole.command.CommandCreoleMonospaced;
import net.sourceforge.plantuml.cucadiagram.LinkStyle;
import net.sourceforge.plantuml.cucadiagram.Rankdir;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.cucadiagram.dot.DotSplines;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorSetSimple;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.graphic.IHtmlColorSet;
import net.sourceforge.plantuml.graphic.SkinParameter;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.skin.ActorStyle;
@ -76,13 +72,17 @@ import net.sourceforge.plantuml.style.StyleLoader;
import net.sourceforge.plantuml.svek.ConditionEndStyle;
import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.svek.PackageStyle;
import net.sourceforge.plantuml.ugraphic.ColorMapper;
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.ColorMapperMonochrome;
import net.sourceforge.plantuml.ugraphic.ColorMapperReverse;
import net.sourceforge.plantuml.ugraphic.ColorOrder;
import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.color.ColorMapper;
import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.color.ColorMapperLightnessInverse;
import net.sourceforge.plantuml.ugraphic.color.ColorMapperMonochrome;
import net.sourceforge.plantuml.ugraphic.color.ColorMapperReverse;
import net.sourceforge.plantuml.ugraphic.color.ColorOrder;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorSet;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public class SkinParam implements ISkinParam {
@ -255,18 +255,18 @@ public class SkinParam implements ISkinParam {
return s.replaceAll(src, target);
}
public HtmlColor getHyperlinkColor() {
final HtmlColor result = getHtmlColor(ColorParam.hyperlink, null, false);
public HColor getHyperlinkColor() {
final HColor result = getHtmlColor(ColorParam.hyperlink, null, false);
if (result == null) {
return HtmlColorUtils.BLUE;
return HColorUtils.BLUE;
}
return result;
}
public HtmlColor getBackgroundColor() {
final HtmlColor result = getHtmlColor(ColorParam.background, null, false);
public HColor getBackgroundColor() {
final HColor result = getHtmlColor(ColorParam.background, null, false);
if (result == null) {
return HtmlColorUtils.WHITE;
return HColorUtils.WHITE;
}
return result;
}
@ -296,7 +296,7 @@ public class SkinParam implements ISkinParam {
return sb.toString();
}
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
public HColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
if (stereotype != null) {
checkStereotype(stereotype);
for (String s : stereotype.getMultipleLabels()) {
@ -310,9 +310,16 @@ public class SkinParam implements ISkinParam {
if (value == null) {
return null;
}
final boolean acceptTransparent = param == ColorParam.background
|| param == ColorParam.sequenceGroupBodyBackground || param == ColorParam.sequenceBoxBackground;
return getIHtmlColorSet().getColorIfValid(value, acceptTransparent);
if (param == ColorParam.background && value.equalsIgnoreCase("transparent")) {
return null;
}
if (param == ColorParam.background) {
return getIHtmlColorSet().getColorIfValid(value);
}
assert param != ColorParam.background;
// final boolean acceptTransparent = param == ColorParam.background
// || param == ColorParam.sequenceGroupBodyBackground || param == ColorParam.sequenceBoxBackground;
return getIHtmlColorSet().getColorIfValid(value, getBackgroundColor());
}
public char getCircledCharacter(Stereotype stereotype) {
@ -352,7 +359,8 @@ public class SkinParam implements ISkinParam {
}
private void checkStereotype(Stereotype stereotype) {
// if (stereotype.startsWith("<<") == false || stereotype.endsWith(">>") == false) {
// if (stereotype.startsWith("<<") == false || stereotype.endsWith(">>") ==
// false) {
// throw new IllegalArgumentException();
// }
}
@ -399,7 +407,7 @@ public class SkinParam implements ISkinParam {
return param[0].getDefaultFamily();
}
public HtmlColor getFontHtmlColor(Stereotype stereotype, FontParam... param) {
public HColor getFontHtmlColor(Stereotype stereotype, FontParam... param) {
String value = null;
if (stereotype != null) {
checkStereotype(stereotype);
@ -684,6 +692,9 @@ public class SkinParam implements ISkinParam {
if (value == null) {
return new ColorMapperIdentity();
}
if ("dark".equalsIgnoreCase(value)) {
return new ColorMapperLightnessInverse();
}
final ColorOrder order = ColorOrder.fromString(value);
if (order == null) {
return new ColorMapperIdentity();
@ -876,14 +887,14 @@ public class SkinParam implements ISkinParam {
if (stereotype != null) {
checkStereotype(stereotype);
final String styleValue = getValue(param.name() + "style"
+ stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR));
final String styleValue = getValue(
param.name() + "style" + stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR));
if (styleValue != null) {
style = LinkStyle.fromString2(styleValue);
}
final String value2 = getValue(param.name() + "thickness"
+ stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR));
final String value2 = getValue(
param.name() + "thickness" + stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR));
if (value2 != null && value2.matches("[\\d.]+")) {
if (style == null) {
style = LinkStyle.NORMAL();
@ -1000,9 +1011,9 @@ public class SkinParam implements ISkinParam {
return false;
}
private final IHtmlColorSet htmlColorSet = new HtmlColorSetSimple();
private final HColorSet htmlColorSet = HColorSet.instance();
public IHtmlColorSet getIHtmlColorSet() {
public HColorSet getIHtmlColorSet() {
return htmlColorSet;
}
@ -1116,12 +1127,12 @@ public class SkinParam implements ISkinParam {
return type;
}
public HtmlColor getHoverPathColor() {
public HColor getHoverPathColor() {
final String value = getValue("pathhovercolor");
if (value == null) {
return null;
}
return getIHtmlColorSet().getColorIfValid(value, false);
return getIHtmlColorSet().getColorIfValid(value, null);
}
public double getPadding() {
@ -1199,8 +1210,8 @@ public class SkinParam implements ISkinParam {
if (padding == 0 && margin == 0 && borderColor == null && backgroundColor == null) {
return Padder.NONE;
}
final HtmlColor border = getIHtmlColorSet().getColorIfValid(borderColor);
final HtmlColor background = getIHtmlColorSet().getColorIfValid(backgroundColor);
final HColor border = getIHtmlColorSet().getColorIfValid(borderColor);
final HColor background = getIHtmlColorSet().getColorIfValid(backgroundColor);
final double roundCorner = getRoundCorner(CornerParam.DEFAULT, null);
return Padder.NONE.withMargin(margin).withPadding(padding).withBackgroundColor(background)
.withBorderColor(border).withRoundCorner(roundCorner);

View File

@ -39,23 +39,23 @@ import java.util.EnumMap;
import java.util.Map;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class SkinParamBackcolored extends SkinParamDelegator {
final private HtmlColor backColorElement;
final private HtmlColor backColorGeneral;
final private HColor backColorElement;
final private HColor backColorGeneral;
final private boolean forceClickage;
public SkinParamBackcolored(ISkinParam skinParam, HtmlColor backColorElement) {
public SkinParamBackcolored(ISkinParam skinParam, HColor backColorElement) {
this(skinParam, backColorElement, null, false);
}
public SkinParamBackcolored(ISkinParam skinParam, HtmlColor backColorElement, boolean forceClickage) {
public SkinParamBackcolored(ISkinParam skinParam, HColor backColorElement, boolean forceClickage) {
this(skinParam, backColorElement, null, forceClickage);
}
public SkinParamBackcolored(ISkinParam skinParam, HtmlColor backColorElement, HtmlColor backColorGeneral) {
public SkinParamBackcolored(ISkinParam skinParam, HColor backColorElement, HColor backColorGeneral) {
this(skinParam, backColorElement, backColorGeneral, false);
}
@ -64,7 +64,7 @@ public class SkinParamBackcolored extends SkinParamDelegator {
return super.toString() + " " + backColorElement + " " + backColorGeneral;
}
public SkinParamBackcolored(ISkinParam skinParam, HtmlColor backColorElement, HtmlColor backColorGeneral,
public SkinParamBackcolored(ISkinParam skinParam, HColor backColorElement, HColor backColorGeneral,
boolean forceClickage) {
super(skinParam);
this.forceClickage = forceClickage;
@ -73,7 +73,7 @@ public class SkinParamBackcolored extends SkinParamDelegator {
}
@Override
public HtmlColor getBackgroundColor() {
public HColor getBackgroundColor() {
if (backColorGeneral != null) {
return backColorGeneral;
}
@ -81,27 +81,27 @@ public class SkinParamBackcolored extends SkinParamDelegator {
}
@Override
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
public HColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
if (param.isBackground() && backColorElement != null) {
return backColorElement;
}
if (forceClickage) {
final HtmlColor c1 = super.getHtmlColor(param, stereotype, true);
final HColor c1 = super.getHtmlColor(param, stereotype, true);
if (c1 != null) {
return c1;
}
// clickable = true;
}
final HtmlColor forcedColor = forced.get(param);
final HColor forcedColor = forced.get(param);
if (forcedColor != null) {
return forcedColor;
}
return super.getHtmlColor(param, stereotype, clickable);
}
private final Map<ColorParam, HtmlColor> forced = new EnumMap<ColorParam, HtmlColor>(ColorParam.class);
private final Map<ColorParam, HColor> forced = new EnumMap<ColorParam, HColor>(ColorParam.class);
public void forceColor(ColorParam param, HtmlColor color) {
public void forceColor(ColorParam param, HColor color) {
forced.put(param, color);
}

View File

@ -36,22 +36,22 @@
package net.sourceforge.plantuml;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class SkinParamBackcoloredReference extends SkinParamDelegator {
final private HtmlColor sequenceReferenceHeaderBackground;
final private HtmlColor sequenceReferenceBackground;
final private HColor sequenceReferenceHeaderBackground;
final private HColor sequenceReferenceBackground;
public SkinParamBackcoloredReference(ISkinParam skinParam, HtmlColor sequenceReferenceHeaderBackground,
HtmlColor sequenceReferenceBackground) {
public SkinParamBackcoloredReference(ISkinParam skinParam, HColor sequenceReferenceHeaderBackground,
HColor sequenceReferenceBackground) {
super(skinParam);
this.sequenceReferenceBackground = sequenceReferenceBackground;
this.sequenceReferenceHeaderBackground = sequenceReferenceHeaderBackground;
}
@Override
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
public HColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
if (param == ColorParam.sequenceReferenceHeaderBackground && sequenceReferenceHeaderBackground != null) {
return sequenceReferenceHeaderBackground;
}

View File

@ -36,9 +36,9 @@
package net.sourceforge.plantuml;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class SkinParamColors extends SkinParamDelegator {
@ -67,8 +67,8 @@ public class SkinParamColors extends SkinParamDelegator {
}
@Override
public HtmlColor getFontHtmlColor(Stereotype stereotype, FontParam... param) {
final HtmlColor value = colors.getColor(ColorType.TEXT);
public HColor getFontHtmlColor(Stereotype stereotype, FontParam... param) {
final HColor value = colors.getColor(ColorType.TEXT);
if (value == null) {
return super.getFontHtmlColor(stereotype, param);
}
@ -76,12 +76,12 @@ public class SkinParamColors extends SkinParamDelegator {
}
@Override
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
public HColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
final ColorType type = param.getColorType();
if (type == null) {
return super.getHtmlColor(param, stereotype, clickable);
}
final HtmlColor value = colors.getColor(type);
final HColor value = colors.getColor(type);
if (value != null) {
return value;
}

View File

@ -42,8 +42,6 @@ import net.sourceforge.plantuml.cucadiagram.Rankdir;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.cucadiagram.dot.DotSplines;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.IHtmlColorSet;
import net.sourceforge.plantuml.graphic.SkinParameter;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.skin.ActorStyle;
@ -55,9 +53,11 @@ import net.sourceforge.plantuml.style.StyleBuilder;
import net.sourceforge.plantuml.svek.ConditionEndStyle;
import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.svek.PackageStyle;
import net.sourceforge.plantuml.ugraphic.ColorMapper;
import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.color.ColorMapper;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorSet;
public class SkinParamDelegator implements ISkinParam {
@ -67,11 +67,11 @@ public class SkinParamDelegator implements ISkinParam {
this.skinParam = skinParam;
}
public HtmlColor getHyperlinkColor() {
public HColor getHyperlinkColor() {
return skinParam.getHyperlinkColor();
}
public HtmlColor getBackgroundColor() {
public HColor getBackgroundColor() {
return skinParam.getBackgroundColor();
}
@ -83,11 +83,11 @@ public class SkinParamDelegator implements ISkinParam {
return skinParam.getFont(stereotype, false, fontParam);
}
public HtmlColor getFontHtmlColor(Stereotype stereotype, FontParam... param) {
public HColor getFontHtmlColor(Stereotype stereotype, FontParam... param) {
return skinParam.getFontHtmlColor(stereotype, param);
}
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
public HColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
return skinParam.getHtmlColor(param, stereotype, clickable);
}
@ -204,7 +204,7 @@ public class SkinParamDelegator implements ISkinParam {
return skinParam.useOctagonForActivity(stereotype);
}
public IHtmlColorSet getIHtmlColorSet() {
public HColorSet getIHtmlColorSet() {
return skinParam.getIHtmlColorSet();
}
@ -276,7 +276,7 @@ public class SkinParamDelegator implements ISkinParam {
return skinParam.getUmlDiagramType();
}
public HtmlColor getHoverPathColor() {
public HColor getHoverPathColor() {
return skinParam.getHoverPathColor();
}

View File

@ -36,21 +36,21 @@
package net.sourceforge.plantuml;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class SkinParamForceColor extends SkinParamDelegator {
final private ColorParam colorParam;;
final private HtmlColor color;
final private HColor color;
public SkinParamForceColor(ISkinParam skinParam, ColorParam colorParam, HtmlColor color) {
public SkinParamForceColor(ISkinParam skinParam, ColorParam colorParam, HColor color) {
super(skinParam);
this.color = color;
this.colorParam = colorParam;
}
@Override
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
public HColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
if (colorParam == param) {
return color;
}

View File

@ -36,19 +36,19 @@
package net.sourceforge.plantuml;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class SkinParamForecolored extends SkinParamDelegator {
final private HtmlColor forecolor;
final private HColor forecolor;
public SkinParamForecolored(ISkinParam skinParam, HtmlColor forecolor) {
public SkinParamForecolored(ISkinParam skinParam, HColor forecolor) {
super(skinParam);
this.forecolor = forecolor;
}
@Override
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
public HColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
return forecolor;
}

View File

@ -36,9 +36,9 @@
package net.sourceforge.plantuml;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class SkinParamUtils {
@ -48,11 +48,11 @@ public class SkinParamUtils {
return skinParam.getFont(stereo, false, fontParam);
}
public static HtmlColor getFontColor(ISkinParam skinParam, FontParam fontParam, Stereotype stereo) {
public static HColor getFontColor(ISkinParam skinParam, FontParam fontParam, Stereotype stereo) {
return skinParam.getFontHtmlColor(stereo, fontParam);
}
public static HtmlColor getColor(ISkinParam skinParam, Stereotype stereo, ColorParam... colorParam) {
public static HColor getColor(ISkinParam skinParam, Stereotype stereo, ColorParam... colorParam) {
return rose.getHtmlColor(skinParam, stereo, colorParam);
}

View File

@ -51,8 +51,8 @@ import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.graphic.GraphicStrings;
import net.sourceforge.plantuml.preproc.Defines;
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.ImageBuilder;
import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity;
public class SourceStringReader {

View File

@ -37,20 +37,20 @@ package net.sourceforge.plantuml;
import java.awt.Color;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorSimple;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorSimple;
public class SplitParam {
private final HtmlColor borderColor;
private final HtmlColor externalColor;
private final HColor borderColor;
private final HColor externalColor;
private final int externalMargin;
public SplitParam() {
this(null, null, 0);
}
public SplitParam(HtmlColor borderColor, HtmlColor externalColor, int externalMargin) {
public SplitParam(HColor borderColor, HColor externalColor, int externalMargin) {
if (borderColor != null && externalMargin == 0) {
externalMargin = 1;
}
@ -71,14 +71,14 @@ public class SplitParam {
if (borderColor == null) {
return null;
}
return ((HtmlColorSimple) borderColor).getColor999();
return ((HColorSimple) borderColor).getColor999();
}
public Color getExternalColor() {
if (externalColor == null) {
return null;
}
return ((HtmlColorSimple) externalColor).getColor999();
return ((HColorSimple) externalColor).getColor999();
}
}

View File

@ -37,13 +37,12 @@ package net.sourceforge.plantuml;
import java.util.Map;
import net.sourceforge.plantuml.creole.CommandCreoleMonospaced;
import net.sourceforge.plantuml.graphic.HtmlColorSetSimple;
import net.sourceforge.plantuml.graphic.IHtmlColorSet;
import net.sourceforge.plantuml.creole.command.CommandCreoleMonospaced;
import net.sourceforge.plantuml.sprite.Sprite;
import net.sourceforge.plantuml.sprite.SpriteImage;
import net.sourceforge.plantuml.ugraphic.ColorMapper;
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.color.ColorMapper;
import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.color.HColorSet;
public class SpriteContainerEmpty implements SpriteContainer, ISkinSimple {
@ -71,8 +70,8 @@ public class SpriteContainerEmpty implements SpriteContainer, ISkinSimple {
return 8;
}
public IHtmlColorSet getIHtmlColorSet() {
return new HtmlColorSetSimple();
public HColorSet getIHtmlColorSet() {
return HColorSet.instance();
}
public int getDpi() {

View File

@ -49,9 +49,9 @@ import net.sourceforge.plantuml.command.regex.Matcher2;
import net.sourceforge.plantuml.command.regex.MyPattern;
import net.sourceforge.plantuml.command.regex.Pattern2;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorTransparent;
import net.sourceforge.plantuml.ugraphic.ColorMapper;
import net.sourceforge.plantuml.ugraphic.color.ColorMapper;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorBackground;
// Do not move
public class StringUtils {
@ -371,7 +371,9 @@ public class StringUtils {
public static List<String> splitComma(String s) {
s = trin(s);
// if (s.matches("([\\p{L}0-9_.]+|[%g][^%g]+[%g])(\\s*,\\s*([\\p{L}0-9_.]+|[%g][^%g]+[%g]))*") == false) {
// if
// (s.matches("([\\p{L}0-9_.]+|[%g][^%g]+[%g])(\\s*,\\s*([\\p{L}0-9_.]+|[%g][^%g]+[%g]))*")
// == false) {
// throw new IllegalArgumentException();
// }
final List<String> result = new ArrayList<String>();
@ -390,12 +392,12 @@ public class StringUtils {
return getAsHtml(color.getRGB());
}
public static String getAsSvg(ColorMapper mapper, HtmlColor color) {
public static String getAsSvg(ColorMapper mapper, HColor color) {
if (color == null) {
return "none";
}
if (color instanceof HtmlColorTransparent) {
return "#FFFFFF";
if (color instanceof HColorBackground) {
return ((HColorBackground) color).getSvg(mapper);
}
return getAsHtml(mapper.getMappedColor(color));
}

View File

@ -47,6 +47,10 @@ public class SvgString {
this.svg = svg;
this.scale = scale;
}
public String getMD5Hex() {
return SignatureUtils.getMD5Hex(svg);
}
public String getSvg(boolean raw) {
String result = svg;

View File

@ -70,8 +70,6 @@ import net.sourceforge.plantuml.flashcode.FlashCodeUtils;
import net.sourceforge.plantuml.fun.IconLoader;
import net.sourceforge.plantuml.graphic.GraphicPosition;
import net.sourceforge.plantuml.graphic.GraphicStrings;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.graphic.UDrawable;
import net.sourceforge.plantuml.mjpeg.MJPEGGenerator;
import net.sourceforge.plantuml.pdf.PdfConverter;
@ -79,11 +77,13 @@ import net.sourceforge.plantuml.sprite.Sprite;
import net.sourceforge.plantuml.svek.EmptySvgException;
import net.sourceforge.plantuml.svek.GraphvizCrash;
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.ImageBuilder;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UImage;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
import net.sourceforge.plantuml.version.Version;
public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annotated, WithSprite {
@ -182,7 +182,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot
final protected ImageData exportDiagramNow(OutputStream os, int index, FileFormatOption fileFormatOption, long seed)
throws IOException {
final HtmlColor hover = getSkinParam().getHoverPathColor();
final HColor hover = getSkinParam().getHoverPathColor();
if (fileFormatOption.getSvgLinkTarget() == null || fileFormatOption.getSvgLinkTarget().equals("_top")) {
fileFormatOption = fileFormatOption.withSvgLinkTarget(getSkinParam().getSvgLinkTarget());
}
@ -227,7 +227,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot
strings.addAll(CommandExecutionResult.getStackTrace(exception));
final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, HtmlColorUtils.WHITE,
final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, HColorUtils.WHITE,
metadata, null, 0, 0, null, false);
final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
@ -246,7 +246,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot
public void drawU(UGraphic ug) {
graphicStrings.drawU(ug);
final double height = graphicStrings.calculateDimension(ug.getStringBounder()).getHeight();
ug = ug.apply(new UTranslate(0, height));
ug = ug.apply(UTranslate.dy(height));
ug.draw(new UImage(im).scaleNearestNeighbor(3));
}
});

View File

@ -54,7 +54,6 @@ import net.sourceforge.plantuml.command.CommandExecutionResult;
import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockRecentred;
@ -63,6 +62,7 @@ import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.sequencediagram.NotePosition;
import net.sourceforge.plantuml.sequencediagram.NoteType;
import net.sourceforge.plantuml.ugraphic.ImageBuilder;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.comp.CompressionMode;
import net.sourceforge.plantuml.ugraphic.comp.TextBlockCompressedOnXorY;
@ -86,7 +86,7 @@ public class ActivityDiagram3 extends UmlDiagram {
}
}
public CommandExecutionResult swimlane(String name, HtmlColor color, Display label) {
public CommandExecutionResult swimlane(String name, HColor color, Display label) {
if (swimlaneStrategy == null) {
swimlaneStrategy = SwimlaneStrategy.SWIMLANE_ALLOWED;
}
@ -122,7 +122,7 @@ public class ActivityDiagram3 extends UmlDiagram {
}
}
public void addSpot(String spot, HtmlColor color) {
public void addSpot(String spot, HColor color) {
final InstructionSpot ins = new InstructionSpot(spot, color, nextLinkRenderer(), swinlanes.getCurrentSwimlane());
current().add(ins);
setNextLinkRendererInternal(LinkRendering.none());
@ -295,7 +295,7 @@ public class ActivityDiagram3 extends UmlDiagram {
return CommandExecutionResult.error("Cannot find split");
}
public void startSwitch(Display test, HtmlColor color) {
public void startSwitch(Display test, HColor color) {
manageSwimlaneStrategy();
final InstructionSwitch instructionSwitch = new InstructionSwitch(swinlanes.getCurrentSwimlane(), current(),
test, nextLinkRenderer(), color, getSkinParam());
@ -327,7 +327,7 @@ public class ActivityDiagram3 extends UmlDiagram {
return CommandExecutionResult.error("Cannot find switch");
}
public void startIf(Display test, Display whenThen, HtmlColor color, Url url) {
public void startIf(Display test, Display whenThen, HColor color, Url url) {
manageSwimlaneStrategy();
final InstructionIf instructionIf = new InstructionIf(swinlanes.getCurrentSwimlane(), current(), test,
whenThen, nextLinkRenderer(), color, getSkinParam(), url);
@ -336,7 +336,7 @@ public class ActivityDiagram3 extends UmlDiagram {
setCurrent(instructionIf);
}
public CommandExecutionResult elseIf(Display inlabel, Display test, Display whenThen, HtmlColor color) {
public CommandExecutionResult elseIf(Display inlabel, Display test, Display whenThen, HColor color) {
if (current() instanceof InstructionIf) {
final boolean ok = ((InstructionIf) current()).elseIf(inlabel, test, whenThen, nextLinkRenderer(), color);
if (ok == false) {
@ -371,7 +371,7 @@ public class ActivityDiagram3 extends UmlDiagram {
return CommandExecutionResult.error("Cannot find if");
}
public void startRepeat(HtmlColor color, Display label, BoxStyle boxStyleIn, Colors colors) {
public void startRepeat(HColor color, Display label, BoxStyle boxStyleIn, Colors colors) {
manageSwimlaneStrategy();
final InstructionRepeat instructionRepeat = new InstructionRepeat(swinlanes.getCurrentSwimlane(), current(),
nextLinkRenderer(), color, label, boxStyleIn, colors);
@ -410,7 +410,7 @@ public class ActivityDiagram3 extends UmlDiagram {
}
public void doWhile(Display test, Display yes, HtmlColor color) {
public void doWhile(Display test, Display yes, HColor color) {
manageSwimlaneStrategy();
final InstructionWhile instructionWhile = new InstructionWhile(swinlanes.getCurrentSwimlane(), current(), test,
nextLinkRenderer(), yes, color, getSkinParam());
@ -435,7 +435,7 @@ public class ActivityDiagram3 extends UmlDiagram {
return CommandExecutionResult.ok();
}
public void startGroup(Display name, HtmlColor backColor, HtmlColor titleColor, HtmlColor borderColor,
public void startGroup(Display name, HColor backColor, HColor titleColor, HColor borderColor,
USymbol type, double roundCorner) {
manageSwimlaneStrategy();
final InstructionGroup instructionGroup = new InstructionGroup(current(), name, backColor, titleColor,

View File

@ -44,7 +44,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.activitydiagram3.ftile.WeldingPoint;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.sequencediagram.NotePosition;
@ -54,6 +53,7 @@ import net.sourceforge.plantuml.style.SName;
import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.StyleBuilder;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class Branch {
@ -61,7 +61,7 @@ public class Branch {
private final Display labelTest;
private final Display labelPositive;
private final Display inlabel;
private final HtmlColor color;
private final HColor color;
private LinkRendering inlinkRendering = LinkRendering.none();
private Ftile ftile;
@ -79,7 +79,7 @@ public class Branch {
}
public Branch(StyleBuilder styleBuilder, Swimlane swimlane, Display labelPositive, Display labelTest,
HtmlColor color, Display inlabel) {
HColor color, Display inlabel) {
if (labelPositive == null) {
throw new IllegalArgumentException();
}
@ -162,7 +162,7 @@ public class Branch {
return ftile.skinParam();
}
public final HtmlColor getColor() {
public final HColor getColor() {
return color;
}

View File

@ -43,19 +43,19 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileWithNotes;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.sequencediagram.NotePosition;
import net.sourceforge.plantuml.sequencediagram.NoteType;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class InstructionGroup implements Instruction, InstructionCollection {
private final InstructionList list;
private final Instruction parent;
private final HtmlColor backColor;
private final HtmlColor borderColor;
private final HtmlColor titleColor;
private final HColor backColor;
private final HColor borderColor;
private final HColor titleColor;
private final LinkRendering linkRendering;
private final USymbol type;
@ -67,8 +67,8 @@ public class InstructionGroup implements Instruction, InstructionCollection {
return list.containsBreak();
}
public InstructionGroup(Instruction parent, Display test, HtmlColor backColor, HtmlColor titleColor,
Swimlane swimlane, HtmlColor borderColor, LinkRendering linkRendering, USymbol type, double roundCorner) {
public InstructionGroup(Instruction parent, Display test, HColor backColor, HColor titleColor,
Swimlane swimlane, HColor borderColor, LinkRendering linkRendering, USymbol type, double roundCorner) {
this.list = new InstructionList(swimlane);
this.type = type;
this.linkRendering = linkRendering;

View File

@ -50,10 +50,10 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.activitydiagram3.ftile.WeldingPoint;
import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileWithNoteOpale;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.sequencediagram.NotePosition;
import net.sourceforge.plantuml.sequencediagram.NoteType;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class InstructionIf extends WithNote implements Instruction, InstructionCollection {
@ -84,7 +84,7 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC
}
public InstructionIf(Swimlane swimlane, Instruction parent, Display labelTest, Display whenThen,
LinkRendering inlinkRendering, HtmlColor color, ISkinParam skinParam, Url url) {
LinkRendering inlinkRendering, HColor color, ISkinParam skinParam, Url url) {
this.url = url;
this.parent = parent;
this.skinParam = skinParam;
@ -142,7 +142,7 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC
}
public boolean elseIf(Display inlabel, Display test, Display whenThen, LinkRendering nextLinkRenderer,
HtmlColor color) {
HColor color) {
if (elseBranch != null) {
return false;
}

View File

@ -43,10 +43,10 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileKilled;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.sequencediagram.NotePosition;
import net.sourceforge.plantuml.sequencediagram.NoteType;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class InstructionRepeat implements Instruction {
@ -73,7 +73,7 @@ public class InstructionRepeat implements Instruction {
return repeatList.containsBreak();
}
public InstructionRepeat(Swimlane swimlane, Instruction parent, LinkRendering nextLinkRenderer, HtmlColor color,
public InstructionRepeat(Swimlane swimlane, Instruction parent, LinkRendering nextLinkRenderer, HColor color,
Display startLabel, BoxStyle boxStyleIn, Colors colors) {
this.boxStyleIn = boxStyleIn;
this.startLabel = startLabel;

View File

@ -39,20 +39,20 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileKilled;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class InstructionSpot extends MonoSwimable implements Instruction {
private boolean killed = false;
private final LinkRendering inlinkRendering;
private final String spot;
private final HtmlColor color;
private final HColor color;
public boolean containsBreak() {
return false;
}
public InstructionSpot(String spot, HtmlColor color, LinkRendering inlinkRendering, Swimlane swimlane) {
public InstructionSpot(String spot, HColor color, LinkRendering inlinkRendering, Swimlane swimlane) {
super(swimlane);
this.spot = spot;
this.inlinkRendering = inlinkRendering;

View File

@ -46,7 +46,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class InstructionSwitch extends WithNote implements Instruction, InstructionCollection {
@ -72,7 +72,7 @@ public class InstructionSwitch extends WithNote implements Instruction, Instruct
}
public InstructionSwitch(Swimlane swimlane, Instruction parent, Display labelTest, LinkRendering inlinkRendering,
HtmlColor color, ISkinParam skinParam) {
HColor color, ISkinParam skinParam) {
this.topInlinkRendering = inlinkRendering;
this.parent = parent;
this.skinParam = skinParam;

View File

@ -44,17 +44,17 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.FtileKilled;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileWithNoteOpale;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.sequencediagram.NotePosition;
import net.sourceforge.plantuml.sequencediagram.NoteType;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class InstructionWhile extends WithNote implements Instruction, InstructionCollection {
private final InstructionList repeatList = new InstructionList();
private final Instruction parent;
private final LinkRendering nextLinkRenderer;
private final HtmlColor color;
private final HColor color;
private boolean killed = false;
private final Display test;
@ -73,7 +73,7 @@ public class InstructionWhile extends WithNote implements Instruction, Instructi
}
public InstructionWhile(Swimlane swimlane, Instruction parent, Display test, LinkRendering nextLinkRenderer,
Display yes, HtmlColor color, ISkinParam skinParam) {
Display yes, HColor color, ISkinParam skinParam) {
if (test == null) {
throw new IllegalArgumentException();
}

View File

@ -43,8 +43,8 @@ import net.sourceforge.plantuml.command.regex.IRegex;
import net.sourceforge.plantuml.command.regex.RegexConcat;
import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandCircleSpot3 extends SingleLineCommand2<ActivityDiagram3> {
@ -62,7 +62,7 @@ public class CommandCircleSpot3 extends SingleLineCommand2<ActivityDiagram3> {
@Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) {
final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
final HColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
diagram.addSpot(arg.get("SPOT", 0), color);
return CommandExecutionResult.ok();
}

View File

@ -45,8 +45,8 @@ import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexOptional;
import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandElseIf2 extends SingleLineCommand2<ActivityDiagram3> {
@ -80,7 +80,7 @@ public class CommandElseIf2 extends SingleLineCommand2<ActivityDiagram3> {
@Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) {
final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
final HColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
String test = arg.get("TEST", 0);
if (test.length() == 0) {

View File

@ -48,8 +48,8 @@ import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexOptional;
import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandIf2 extends SingleLineCommand2<ActivityDiagram3> {
@ -79,7 +79,7 @@ public class CommandIf2 extends SingleLineCommand2<ActivityDiagram3> {
@Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) {
final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
final HColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
String test = arg.get("TEST", 0);
if (test.length() == 0) {

View File

@ -44,8 +44,8 @@ import net.sourceforge.plantuml.command.regex.RegexConcat;
import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandIf4 extends SingleLineCommand2<ActivityDiagram3> {
@ -76,7 +76,7 @@ public class CommandIf4 extends SingleLineCommand2<ActivityDiagram3> {
@Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) {
final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
final HColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
String test = arg.get("TEST", 0);
if (test.length() == 0) {

View File

@ -43,8 +43,8 @@ import net.sourceforge.plantuml.command.regex.IRegex;
import net.sourceforge.plantuml.command.regex.RegexConcat;
import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandLink3 extends SingleLineCommand2<ActivityDiagram3> {
@ -63,7 +63,7 @@ public class CommandLink3 extends SingleLineCommand2<ActivityDiagram3> {
@Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) {
final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
final HColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
if (color != null) {
diagram.setColorNextArrow(Rainbow.fromColor(color));
}

View File

@ -49,8 +49,6 @@ import net.sourceforge.plantuml.command.regex.RegexOptional;
import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.graphic.color.ColorType;
@ -59,6 +57,8 @@ import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.SName;
import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
@ -129,20 +129,20 @@ public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
final String stereo = arg.get("STEREO", 0);
final Stereotype stereotype = stereo == null ? null : new Stereotype(stereo);
final HtmlColor backColorInSkinparam = diagram.getSkinParam().getHtmlColor(getColorParamBack(symbol),
final HColor backColorInSkinparam = diagram.getSkinParam().getHtmlColor(getColorParamBack(symbol),
stereotype, false);
HtmlColor backColor;
HColor backColor;
if (backColorInSkinparam == null) {
backColor = colors.getColor(ColorType.BACK);
} else {
backColor = backColorInSkinparam;
}
HtmlColor titleColor = colors.getColor(ColorType.HEADER);
HColor titleColor = colors.getColor(ColorType.HEADER);
// Warning : titleColor unused in FTileGroupW
HtmlColor borderColor = diagram.getSkinParam().getHtmlColor(getColorParamBorder(symbol), stereotype, false);
HColor borderColor = diagram.getSkinParam().getHtmlColor(getColorParamBorder(symbol), stereotype, false);
if (borderColor == null) {
borderColor = HtmlColorUtils.BLACK;
borderColor = HColorUtils.BLACK;
}
double roundCorner = symbol.getSkinParameter().getRoundCorner(diagram.getSkinParam(), stereotype);
@ -155,7 +155,7 @@ public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
backColor = stylePartition.value(PName.BackGroundColor).asColor(
diagram.getSkinParam().getIHtmlColorSet());
}
titleColor = HtmlColorUtils.BLUE;// stylePartition.value(PName.FontColor).asColor(diagram.getSkinParam().getIHtmlColorSet());
titleColor = HColorUtils.BLUE;// stylePartition.value(PName.FontColor).asColor(diagram.getSkinParam().getIHtmlColorSet());
roundCorner = stylePartition.value(PName.RoundCorner).asDouble();
}

View File

@ -48,10 +48,10 @@ import net.sourceforge.plantuml.command.regex.RegexOptional;
import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandRepeat3 extends SingleLineCommand2<ActivityDiagram3> {
@ -77,7 +77,7 @@ public class CommandRepeat3 extends SingleLineCommand2<ActivityDiagram3> {
@Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) {
final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
final HColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
final Display label = Display.getWithNewlines(arg.get("LABEL", 0));
final BoxStyle boxStyle;
final String styleString = arg.get("STYLE", 0);

View File

@ -44,8 +44,8 @@ import net.sourceforge.plantuml.command.regex.RegexConcat;
import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandSwimlane extends SingleLineCommand2<ActivityDiagram3> {
@ -65,7 +65,7 @@ public class CommandSwimlane extends SingleLineCommand2<ActivityDiagram3> {
@Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) {
final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
final HColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
final String name = arg.get("SWIMLANE", 0);
final Display label = Display.getWithNewlines(arg.get("LABEL", 0));
return diagram.swimlane(name, color, label);

View File

@ -45,8 +45,8 @@ import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexOptional;
import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandSwimlane2 extends SingleLineCommand2<ActivityDiagram3> {
@ -73,7 +73,7 @@ public class CommandSwimlane2 extends SingleLineCommand2<ActivityDiagram3> {
@Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) {
final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
final HColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
final String name = arg.get("SWIMLANE", 0);
final Display label = Display.getWithNewlines(arg.get("LABEL", 0));
return diagram.swimlane(name, color, label);

View File

@ -44,8 +44,8 @@ import net.sourceforge.plantuml.command.regex.RegexConcat;
import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandSwitch extends SingleLineCommand2<ActivityDiagram3> {
@ -67,7 +67,7 @@ public class CommandSwitch extends SingleLineCommand2<ActivityDiagram3> {
@Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) {
final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
final HColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
String test = arg.get("TEST", 0);
if (test.length() == 0) {

View File

@ -45,8 +45,8 @@ import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexOptional;
import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandWhile3 extends SingleLineCommand2<ActivityDiagram3> {
@ -73,7 +73,7 @@ public class CommandWhile3 extends SingleLineCommand2<ActivityDiagram3> {
@Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) {
final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
final HColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0));
diagram.doWhile(Display.getWithNewlines(arg.get("TEST", 0)), Display.getWithNewlines(arg.get("YES", 0)), color);
return CommandExecutionResult.ok();

View File

@ -45,11 +45,11 @@ import net.sourceforge.plantuml.LineParam;
import net.sourceforge.plantuml.activitydiagram3.LinkRendering;
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.IHtmlColorSet;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.MinMax;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColorSet;
public abstract class AbstractFtile extends AbstractTextBlock implements Ftile {
@ -66,7 +66,7 @@ public abstract class AbstractFtile extends AbstractTextBlock implements Ftile {
return skinParam;
}
final public IHtmlColorSet getIHtmlColorSet() {
final public HColorSet getIHtmlColorSet() {
return skinParam.getIHtmlColorSet();
}

View File

@ -50,7 +50,7 @@ public enum BoxStyle {
PLAIN {
@Override
protected Shadowable getShape(double width, double height, double roundCorner) {
return new URectangle(width, height, roundCorner, roundCorner);
return new URectangle(width, height).rounded(roundCorner);
}
},
SDL_INPUT('<') {
@ -83,9 +83,9 @@ public enum BoxStyle {
final URectangle rect = new URectangle(width, height);
rect.setDeltaShadow(shadowing);
ug.draw(rect);
final ULine vline = new ULine(0, height);
ug.apply(new UTranslate(PADDING, 0)).draw(vline);
ug.apply(new UTranslate(width - PADDING, 0)).draw(vline);
final ULine vline = ULine.vline(height);
ug.apply(UTranslate.dx(PADDING)).draw(vline);
ug.apply(UTranslate.dx(width - PADDING)).draw(vline);
}
},
SDL_SAVE('\\') {

View File

@ -40,10 +40,7 @@ import java.util.ArrayList;
import java.util.List;
import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.ColorMapper;
import net.sourceforge.plantuml.ugraphic.MinMax;
import net.sourceforge.plantuml.ugraphic.UChange;
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
@ -57,6 +54,9 @@ import net.sourceforge.plantuml.ugraphic.URectangle;
import net.sourceforge.plantuml.ugraphic.UShape;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.ColorMapper;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public class CollisionDetector implements UGraphic {
@ -88,7 +88,7 @@ public class CollisionDetector implements UGraphic {
minmax.drawGrey(ug);
}
}
final HtmlColor color = HtmlColorUtils.BLACK;
final HColor color = HColorUtils.BLACK;
ug = ug.apply(new UChangeColor(color)).apply(new UStroke(5));
for (Snake snake : snakes) {
for (Line2D line : snake.getHorizontalLines()) {

View File

@ -42,11 +42,11 @@ import net.sourceforge.plantuml.LineParam;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils;
import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class EntityImageLegend {
@ -55,8 +55,8 @@ public class EntityImageLegend {
final TextBlock textBlock = note.create(new FontConfiguration(skinParam, FontParam.LEGEND, null),
HorizontalAlignment.LEFT, skinParam);
final Rose rose = new Rose();
final HtmlColor legendBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.legendBackground);
final HtmlColor legendColor = rose.getHtmlColor(skinParam, ColorParam.legendBorder);
final HColor legendBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.legendBackground);
final HColor legendColor = rose.getHtmlColor(skinParam, ColorParam.legendBorder);
final UStroke stroke = skinParam.getThickness(LineParam.legendBorder, null);
final int cornersize = 10;

View File

@ -133,7 +133,7 @@ public class FtileAssemblySimple extends AbstractTextBlock implements Ftile {
private UTranslate getTranslated1(StringBounder stringBounder) {
final double left = calculateDimension(stringBounder).getLeft();
return new UTranslate(left - tile1.calculateDimension(stringBounder).getLeft(), 0);
return UTranslate.dx(left - tile1.calculateDimension(stringBounder).getLeft());
}
private UTranslate getTranslated2(StringBounder stringBounder) {

View File

@ -46,10 +46,10 @@ import net.sourceforge.plantuml.activitydiagram3.Instruction;
import net.sourceforge.plantuml.activitydiagram3.LinkRendering;
import net.sourceforge.plantuml.activitydiagram3.PositionedNote;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public interface FtileFactory {
@ -63,7 +63,7 @@ public interface FtileFactory {
public Ftile end(Swimlane swimlane);
public Ftile spot(Swimlane swimlane, String spot, HtmlColor color);
public Ftile spot(Swimlane swimlane, String spot, HColor color);
public Ftile activity(Display label, Swimlane swimlane, BoxStyle style, Colors colors);
@ -82,7 +82,7 @@ public interface FtileFactory {
Ftile backward, boolean noOut);
public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out,
LinkRendering afterEndwhile, HtmlColor color, Instruction specialOut);
LinkRendering afterEndwhile, HColor color, Instruction specialOut);
public Ftile createIf(Swimlane swimlane, List<Branch> thens, Branch elseBranch, LinkRendering afterEndwhile,
LinkRendering topInlinkRendering, Url url);
@ -92,7 +92,7 @@ public interface FtileFactory {
public Ftile createParallel(List<Ftile> all, ForkStyle style, String label, Swimlane in, Swimlane out);
public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note,
HtmlColor borderColor, USymbol type, double roundCorner);
public Ftile createGroup(Ftile list, Display name, HColor backColor, HColor titleColor, PositionedNote note,
HColor borderColor, USymbol type, double roundCorner);
}

View File

@ -51,7 +51,6 @@ import net.sourceforge.plantuml.creole.CreoleMode;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
@ -61,6 +60,7 @@ import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.style.SName;
import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileFactoryDelegator implements FtileFactory {
@ -145,7 +145,7 @@ public class FtileFactoryDelegator implements FtileFactory {
return factory.stop(swimlane);
}
public Ftile spot(Swimlane swimlane, String spot, HtmlColor color) {
public Ftile spot(Swimlane swimlane, String spot, HColor color) {
return factory.spot(swimlane, spot, color);
}
@ -187,7 +187,7 @@ public class FtileFactoryDelegator implements FtileFactory {
}
public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out,
LinkRendering afterEndwhile, HtmlColor color, Instruction specialOut) {
LinkRendering afterEndwhile, HColor color, Instruction specialOut) {
return factory.createWhile(swimlane, whileBlock, test, yes, out, afterEndwhile, color, specialOut);
}
@ -205,8 +205,8 @@ public class FtileFactoryDelegator implements FtileFactory {
return factory.createParallel(all, style, label, in, out);
}
public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note,
HtmlColor borderColor, USymbol type, double roundCorner) {
public Ftile createGroup(Ftile list, Display name, HColor backColor, HColor titleColor, PositionedNote note,
HColor borderColor, USymbol type, double roundCorner) {
return factory.createGroup(list, name, backColor, titleColor, note, borderColor, type, roundCorner);
}

View File

@ -86,7 +86,7 @@ public class FtileHeightFixed extends AbstractFtile {
if (dim.getHeight() > fixedHeight) {
throw new IllegalStateException();
}
return new UTranslate(0, (fixedHeight - dim.getHeight()) / 2);
return UTranslate.dy((fixedHeight - dim.getHeight()) / 2);
}
public void drawU(UGraphic ug) {

View File

@ -102,7 +102,7 @@ public class FtileMarged extends AbstractFtile {
}
private UTranslate getTranslate() {
return new UTranslate(margin1, 0);
return UTranslate.dx(margin1);
}
public void drawU(UGraphic ug) {

View File

@ -53,7 +53,7 @@ public class FtileMargedVertically extends FtileDecorate {
public void drawU(UGraphic ug) {
if (margin1 > 0) {
ug = ug.apply(new UTranslate(0, margin1));
ug = ug.apply(UTranslate.dy(margin1));
}
ug.draw(getFtileDelegated());
}

View File

@ -87,7 +87,7 @@ public class FtileMinWidth extends FtileDecorate {
private UTranslate getUTranslateInternal(final StringBounder stringBounder) {
final Dimension2D dimTile = getFtileDelegated().calculateDimension(stringBounder);
final Dimension2D dimTotal = getDimensionInternal(stringBounder);
final UTranslate change = new UTranslate((dimTotal.getWidth() - dimTile.getWidth()) / 2, 0);
final UTranslate change = UTranslate.dx((dimTotal.getWidth() - dimTile.getWidth()) / 2);
return change;
}

View File

@ -68,8 +68,8 @@ public class Snake implements UShape {
private Direction emphasizeDirection;
private final HorizontalAlignment horizontalAlignment;
public final void setIgnoreForCompression(boolean ignoreForCompression) {
this.worm.setIgnoreForCompression(ignoreForCompression);
public final void setIgnoreForCompression() {
this.worm.setIgnoreForCompression();
}
public Snake transformX(CompressionTransform compressionTransform) {

View File

@ -38,11 +38,11 @@ package net.sourceforge.plantuml.activitydiagram3.ftile;
import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.SpecificBackcolorable;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.ugraphic.MinMax;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class Swimlane implements SpecificBackcolorable {
@ -88,7 +88,7 @@ public class Swimlane implements SpecificBackcolorable {
return colors;
}
public void setSpecificColorTOBEREMOVED(ColorType type, HtmlColor color) {
public void setSpecificColorTOBEREMOVED(ColorType type, HColor color) {
if (color != null) {
this.colors = colors.add(type, color);
}

View File

@ -57,7 +57,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.UGraphicIntercep
import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.VCompactFactory;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils;
@ -77,6 +76,7 @@ import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.URectangle;
import net.sourceforge.plantuml.ugraphic.UShape;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.comp.SlotSet;
import net.sourceforge.plantuml.utils.MathUtils;
@ -126,7 +126,7 @@ public class SwimlanesA extends AbstractTextBlock implements TextBlock, Styleabl
return factory;
}
public void swimlane(String name, HtmlColor color, Display label) {
public void swimlane(String name, HColor color, Display label) {
currentSwimlane = getOrCreate(name);
if (color != null) {
currentSwimlane.setSpecificColorTOBEREMOVED(ColorType.BACK, color);
@ -203,7 +203,7 @@ public class SwimlanesA extends AbstractTextBlock implements TextBlock, Styleabl
drawWhenSwimlanes(ug, full);
}
static private void printDebug(UGraphic ug, SlotSet slot, HtmlColor col, TextBlock full) {
static private void printDebug(UGraphic ug, SlotSet slot, HColor col, TextBlock full) {
slot.drawDebugX(ug.apply(new UChangeColor(col)).apply(new UChangeBackColor(col)),
full.calculateDimension(ug.getStringBounder()).getHeight());
@ -218,13 +218,12 @@ public class SwimlanesA extends AbstractTextBlock implements TextBlock, Styleabl
double x2 = 0;
for (Swimlane swimlane : swimlanes) {
final HtmlColor back = swimlane.getColors(skinParam).getColor(ColorType.BACK);
final HColor back = swimlane.getColors(skinParam).getColor(ColorType.BACK);
if (back != null) {
final UGraphic background = ug.apply(new UChangeBackColor(back)).apply(new UChangeColor(back))
.apply(new UTranslate(x2, 0));
.apply(UTranslate.dx(x2));
final URectangle rectangle = new URectangle(swimlane.getActualWidth(), dimensionFull.getHeight()
+ titleHeightTranslate.getDy());
rectangle.setIgnoreForCompression(true);
+ titleHeightTranslate.getDy()).ignoreForCompression();
background.draw(rectangle);
}
@ -270,8 +269,8 @@ public class SwimlanesA extends AbstractTextBlock implements TextBlock, Styleabl
for (Swimlane swimlane : swimlanes) {
final double swimlaneActualWidth = swimlaneActualWidth(ug.getStringBounder(), swimlaneWidth, swimlane);
final UTranslate translate = new UTranslate(x1 - swimlane.getMinMax().getMinX() + separationMargin
+ (swimlaneActualWidth - rawDrawingWidth(swimlane)) / 2.0, 0);
final UTranslate translate = UTranslate.dx(x1 - swimlane.getMinMax().getMinX() + separationMargin
+ (swimlaneActualWidth - rawDrawingWidth(swimlane)) / 2.0);
swimlane.setTranslateAndWidth(translate, swimlaneActualWidth);
x1 += swimlaneActualWidth;

View File

@ -43,7 +43,6 @@ import net.sourceforge.plantuml.Pragma;
import net.sourceforge.plantuml.SkinParam;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.style.PName;
@ -52,6 +51,7 @@ import net.sourceforge.plantuml.ugraphic.UChangeColor;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.URectangle;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.utils.MathUtils;
public class SwimlanesB extends SwimlanesA {
@ -67,21 +67,20 @@ public class SwimlanesB extends SwimlanesA {
final StringBounder stringBounder = ug.getStringBounder();
HtmlColor color = skinParam.getHtmlColor(ColorParam.swimlaneTitleBackground, null, false);
HColor color = skinParam.getHtmlColor(ColorParam.swimlaneTitleBackground, null, false);
if (SkinParam.USE_STYLES()) {
color = getStyle().value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet());
}
if (color != null) {
final double titleHeight = getTitlesHeight(stringBounder);
final URectangle back = new URectangle(getTitlesWidth(stringBounder), titleHeight);
back.setIgnoreForCompression(true);
final URectangle back = new URectangle(getTitlesWidth(stringBounder), titleHeight).ignoreForCompression();
ug.apply(new UChangeBackColor(color)).apply(new UChangeColor(color)).draw(back);
}
for (Swimlane swimlane : swimlanes) {
final TextBlock swTitle = getTitle(swimlane);
final double titleWidth = swTitle.calculateDimension(stringBounder).getWidth();
final double posTitle = x2 + (swimlane.getActualWidth() - titleWidth) / 2;
swTitle.drawU(ug.apply(new UTranslate(posTitle, 0)));
swTitle.drawU(ug.apply(UTranslate.dx(posTitle)));
x2 += swimlane.getActualWidth();
}
}
@ -132,7 +131,7 @@ public class SwimlanesB extends SwimlanesA {
@Override
protected UTranslate getTitleHeightTranslate(final StringBounder stringBounder) {
double titlesHeight = getTitlesHeight(stringBounder);
return new UTranslate(0, titlesHeight > 0 ? titlesHeight + 5 : 0);
return UTranslate.dy(titlesHeight > 0 ? titlesHeight + 5 : 0);
}
private double getTitlesHeight(StringBounder stringBounder) {

View File

@ -42,7 +42,6 @@ import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.LineParam;
import net.sourceforge.plantuml.Pragma;
import net.sourceforge.plantuml.SkinParam;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.skin.rose.Rose;
@ -52,6 +51,7 @@ import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.ULine;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class SwimlanesC extends SwimlanesB {
@ -70,17 +70,17 @@ public class SwimlanesC extends SwimlanesB {
final UTranslate titleHeightTranslate = getTitleHeightTranslate(stringBounder);
for (Swimlane swimlane : swimlanes) {
drawSeparation(ug.apply(new UTranslate(x2, 0)), dimensionFull.getHeight() + titleHeightTranslate.getDy());
drawSeparation(ug.apply(UTranslate.dx(x2)), dimensionFull.getHeight() + titleHeightTranslate.getDy());
x2 += swimlane.getActualWidth();
}
drawSeparation(ug.apply(new UTranslate(x2, 0)), dimensionFull.getHeight() + titleHeightTranslate.getDy());
drawSeparation(ug.apply(UTranslate.dx(x2)), dimensionFull.getHeight() + titleHeightTranslate.getDy());
}
private void drawSeparation(UGraphic ug, double height) {
HtmlColor color = skinParam.getHtmlColor(ColorParam.swimlaneBorder, null, false);
HColor color = skinParam.getHtmlColor(ColorParam.swimlaneBorder, null, false);
if (color == null) {
color = ColorParam.swimlaneBorder.getDefaultValue();
}
@ -89,7 +89,7 @@ public class SwimlanesC extends SwimlanesB {
color = getStyle().value(PName.LineColor).asColor(skinParam.getIHtmlColorSet());
thickness = getStyle().getStroke();
}
ug.apply(thickness).apply(new UChangeColor(color)).draw(new ULine(0, height));
ug.apply(thickness).apply(new UChangeColor(color)).draw(ULine.vline(height));
}
}

View File

@ -38,7 +38,6 @@ package net.sourceforge.plantuml.activitydiagram3.ftile;
import java.awt.geom.Point2D;
import java.util.Map;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.graphic.UDrawable;
import net.sourceforge.plantuml.graphic.UGraphicDelegator;
import net.sourceforge.plantuml.svek.UGraphicForSnake;
@ -50,6 +49,7 @@ import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.ULine;
import net.sourceforge.plantuml.ugraphic.UShape;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public class UGraphicInterceptorUDrawable2 extends UGraphicDelegator {
@ -89,8 +89,8 @@ public class UGraphicInterceptorUDrawable2 extends UGraphicDelegator {
private void drawGoto(FtileGoto ftile) {
final FtileGeometry geom = ftile.calculateDimension(getStringBounder());
final Point2D pt = geom.getPointIn();
UGraphic ugGoto = getUg().apply(new UChangeColor(HtmlColorUtils.GREEN)).apply(
new UChangeBackColor(HtmlColorUtils.GREEN));
UGraphic ugGoto = getUg().apply(new UChangeColor(HColorUtils.GREEN)).apply(
new UChangeBackColor(HColorUtils.GREEN));
ugGoto = ugGoto.apply(new UTranslate(pt));
final UTranslate posNow = getPosition();
final UTranslate dest = positions.get(ftile.getName());
@ -98,8 +98,8 @@ public class UGraphicInterceptorUDrawable2 extends UGraphicDelegator {
final double dy = dest.getDy() - posNow.getDy();
ugGoto.draw(new UEllipse(3, 3));
ugGoto.apply(new UTranslate(dx, dy)).draw(new UEllipse(3, 3));
ugGoto.draw(new ULine(dx, 0));
ugGoto.apply(new UTranslate(dx, 0)).draw(new ULine(0, dy));
ugGoto.draw(ULine.hline(dx));
ugGoto.apply(UTranslate.dx(dx)).draw(ULine.vline(dy));
// ugGoto.draw(new ULine(dx, dy));
}

View File

@ -45,7 +45,6 @@ import java.util.List;
import net.sourceforge.plantuml.Direction;
import net.sourceforge.plantuml.cucadiagram.LinkStyle;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorAndStyle;
import net.sourceforge.plantuml.ugraphic.MinMax;
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
@ -55,6 +54,7 @@ import net.sourceforge.plantuml.ugraphic.ULine;
import net.sourceforge.plantuml.ugraphic.UPolygon;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.comp.CompressionMode;
public class Worm implements Iterable<Point2D.Double> {
@ -67,13 +67,13 @@ public class Worm implements Iterable<Point2D.Double> {
private boolean ignoreForCompression;
public final void setIgnoreForCompression(boolean ignoreForCompression) {
this.ignoreForCompression = ignoreForCompression;
public final void setIgnoreForCompression() {
this.ignoreForCompression = true;
}
public void drawInternalOneColor(UPolygon startDecoration, UGraphic ug, HtmlColorAndStyle color, double stroke,
Direction emphasizeDirection, UPolygon endDecoration) {
final HtmlColor color2 = color.getColor();
final HColor color2 = color.getColor();
if (color2 == null) {
throw new IllegalArgumentException();
}

View File

@ -135,19 +135,19 @@ public class WormMutation {
private static UTranslate translation(int type, double delta) {
switch (type) {
case 1:
return new UTranslate(0, -delta);
return UTranslate.dy(-delta);
case 2:
return new UTranslate(delta, -delta);
case 3:
return new UTranslate(delta, 0);
return UTranslate.dx(delta);
case 4:
return new UTranslate(delta, delta);
case 5:
return new UTranslate(0, delta);
return UTranslate.dy(delta);
case 6:
return new UTranslate(-delta, delta);
case 7:
return new UTranslate(-delta, 0);
return UTranslate.dx(-delta);
case 8:
return new UTranslate(-delta, -delta);
}
@ -182,7 +182,7 @@ public class WormMutation {
for (UTranslate tr : translations) {
result.append(tr.getDx());
}
return new UTranslate(result.getExtreme() * (size - 1), 0);
return UTranslate.dx(result.getExtreme() * (size - 1));
}
public boolean isDxNegative() {

View File

@ -38,11 +38,11 @@ package net.sourceforge.plantuml.activitydiagram3.ftile;
import java.util.ArrayList;
import java.util.List;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.ugraphic.MinMax;
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
import net.sourceforge.plantuml.ugraphic.UChangeColor;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public class Zad {
@ -55,7 +55,7 @@ public class Zad {
}
public void drawDebug(UGraphic ug) {
ug = ug.apply(new UChangeBackColor(HtmlColorUtils.BLUE)).apply(new UChangeColor(HtmlColorUtils.RED_LIGHT));
ug = ug.apply(new UChangeBackColor(HColorUtils.BLUE)).apply(new UChangeColor(HColorUtils.RED_LIGHT));
for (MinMax minMax : rectangles) {
System.err.println("minmax=" + minMax);
minMax.drawGrey(ug);

View File

@ -37,7 +37,6 @@ package net.sourceforge.plantuml.activitydiagram3.ftile;
import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.ColorMapper;
import net.sourceforge.plantuml.ugraphic.MinMax;
import net.sourceforge.plantuml.ugraphic.UChange;
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
@ -49,6 +48,7 @@ import net.sourceforge.plantuml.ugraphic.URectangle;
import net.sourceforge.plantuml.ugraphic.UShape;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.ColorMapper;
public class ZadBuilder implements UGraphic {

View File

@ -51,13 +51,13 @@ import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.svek.image.Opale;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FloatingNote extends AbstractTextBlock implements Stencil, TextBlock {
@ -67,8 +67,8 @@ public class FloatingNote extends AbstractTextBlock implements Stencil, TextBloc
final Rose rose = new Rose();
final HtmlColor noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground);
final HtmlColor borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder);
final HColor noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground);
final HColor borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder);
final FontConfiguration fc = new FontConfiguration(skinParam, FontParam.NOTE, null);

View File

@ -43,9 +43,9 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileFactoryDelegatorCreateGroup extends FtileFactoryDelegator {
@ -56,9 +56,9 @@ public class FtileFactoryDelegatorCreateGroup extends FtileFactoryDelegator {
}
@Override
public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note,
HtmlColor borderColor, USymbol type, double roundCorner) {
final HtmlColor arrowColor = rose.getHtmlColor(skinParam(), ColorParam.arrow);
public Ftile createGroup(Ftile list, Display name, HColor backColor, HColor titleColor, PositionedNote note,
HColor borderColor, USymbol type, double roundCorner) {
final HColor arrowColor = rose.getHtmlColor(skinParam(), ColorParam.arrow);
Ftile result = new FtileGroup(list, name, null, arrowColor, backColor, titleColor, skinParam(), borderColor,
type, roundCorner);
if (note != null) {

View File

@ -50,12 +50,12 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond.ConditionalBuilder;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.svek.ConditionEndStyle;
import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileFactoryDelegatorIf extends FtileFactoryDelegator {
@ -74,8 +74,8 @@ public class FtileFactoryDelegatorIf extends FtileFactoryDelegator {
final ConditionEndStyle conditionEndStyle = skinParam().getConditionEndStyle();
final Branch branch0 = thens.get(0);
final HtmlColor borderColor;
final HtmlColor backColor;
final HColor borderColor;
final HColor backColor;
final Rainbow arrowColor;
final FontConfiguration fcTest;
final FontParam testParam = conditionStyle == ConditionStyle.INSIDE ? FontParam.ACTIVITY_DIAMOND
@ -113,7 +113,7 @@ public class FtileFactoryDelegatorIf extends FtileFactoryDelegator {
conditionEndStyle, thens.get(0), elseBranch, skinParam(), getStringBounder(), fcArrow, fcTest, url);
}
private HtmlColor fontColor(FontParam param) {
private HColor fontColor(FontParam param) {
return skinParam().getFontHtmlColor(null, param);
}

View File

@ -57,7 +57,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.WeldingPoint;
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors;
@ -66,6 +65,7 @@ import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileFactoryDelegatorRepeat extends FtileFactoryDelegator {
@ -80,8 +80,8 @@ public class FtileFactoryDelegatorRepeat extends FtileFactoryDelegator {
final ConditionStyle conditionStyle = skinParam().getConditionStyle();
final HtmlColor borderColor;
final HtmlColor diamondColor;
final HColor borderColor;
final HColor diamondColor;
final Rainbow arrowColor;
final FontConfiguration fcDiamond;
final FontConfiguration fcArrow;

View File

@ -55,10 +55,10 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondInsi
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator {
@ -113,8 +113,8 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator {
}
private Ftile getDiamond1(Swimlane swimlane, Branch branch0, Display test) {
final HtmlColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
final HtmlColor backColor = branch0.getColor() == null ? getRose().getHtmlColor(skinParam(),
final HColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
final HColor backColor = branch0.getColor() == null ? getRose().getHtmlColor(skinParam(),
ColorParam.activityDiamondBackground) : branch0.getColor();
final FontConfiguration fcDiamond = new FontConfiguration(skinParam(), FontParam.ACTIVITY_DIAMOND, null);
@ -126,14 +126,14 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator {
}
private Ftile getDiamond2(Swimlane swimlane, Branch branch0) {
final HtmlColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
final HtmlColor backColor = branch0.getColor() == null ? getRose().getHtmlColor(skinParam(),
final HColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
final HColor backColor = branch0.getColor() == null ? getRose().getHtmlColor(skinParam(),
ColorParam.activityDiamondBackground) : branch0.getColor();
return new FtileDiamondInside(branch0.skinParam(), backColor, borderColor, swimlane, TextBlockUtils.empty(0, 0));
}
private HtmlColor fontColor(FontParam param) {
private HColor fontColor(FontParam param) {
return skinParam().getFontHtmlColor(null, param);
}

View File

@ -56,13 +56,13 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.activitydiagram3.ftile.WeldingPoint;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileFactoryDelegatorWhile extends FtileFactoryDelegator {
@ -72,10 +72,10 @@ public class FtileFactoryDelegatorWhile extends FtileFactoryDelegator {
@Override
public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out,
LinkRendering afterEndwhile, HtmlColor color, Instruction specialOut) {
LinkRendering afterEndwhile, HColor color, Instruction specialOut) {
final HtmlColor borderColor;
final HtmlColor backColor;
final HColor borderColor;
final HColor backColor;
final Rainbow arrowColor;
final FontConfiguration fontArrow;
final FontConfiguration fcTest;

View File

@ -87,7 +87,7 @@ class FtileForkInner extends AbstractFtile {
double xpos = 0;
for (Ftile ftile : forks) {
ug.apply(new UTranslate(xpos, 0)).draw(ftile);
ug.apply(UTranslate.dx(xpos)).draw(ftile);
final Dimension2D dim = ftile.calculateDimension(stringBounder);
xpos += dim.getWidth();
}
@ -112,7 +112,7 @@ class FtileForkInner extends AbstractFtile {
double xpos = 0;
for (Ftile ftile : forks) {
if (ftile == searched) {
return new UTranslate(xpos, 0);
return UTranslate.dx(xpos);
}
final Dimension2D dim = ftile.calculateDimension(stringBounder);
xpos += dim.getWidth();

View File

@ -87,7 +87,7 @@ class FtileForkInnerOverlapped extends AbstractFtile {
final double xpos = 0;
for (Ftile ftile : forks) {
ug.apply(new UTranslate(xpos, 0)).draw(ftile);
ug.apply(UTranslate.dx(xpos)).draw(ftile);
// final Dimension2D dim = ftile.calculateDimension(stringBounder);
// xpos += dim.getWidth();
}
@ -113,7 +113,7 @@ class FtileForkInnerOverlapped extends AbstractFtile {
final double xpos = 0;
for (Ftile ftile : forks) {
if (ftile == searched) {
return new UTranslate(xpos, 0);
return UTranslate.dx(xpos);
}
// final Dimension2D dim = ftile.calculateDimension(stringBounder);
// xpos += dim.getWidth();

View File

@ -53,8 +53,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.SymbolContext;
import net.sourceforge.plantuml.graphic.TextBlock;
@ -72,6 +70,8 @@ import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
import net.sourceforge.plantuml.utils.MathUtils;
public class FtileGroup extends AbstractFtile {
@ -80,8 +80,8 @@ public class FtileGroup extends AbstractFtile {
private final Ftile inner;
private final TextBlock name;
private final TextBlock headerNote;
private final HtmlColor borderColor;
private final HtmlColor backColor;
private final HColor borderColor;
private final HColor backColor;
private final double shadowing;
private final UStroke stroke;
private final USymbol type;
@ -91,14 +91,14 @@ public class FtileGroup extends AbstractFtile {
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.partition);
}
public FtileGroup(Ftile inner, Display title, Display displayNote, HtmlColor arrowColor, HtmlColor backColor,
HtmlColor titleColor, ISkinParam skinParam, HtmlColor borderColor, USymbol type, double roundCorner) {
public FtileGroup(Ftile inner, Display title, Display displayNote, HColor arrowColor, HColor backColor,
HColor titleColor, ISkinParam skinParam, HColor borderColor, USymbol type, double roundCorner) {
super(inner.skinParam());
this.roundCorner = roundCorner;
this.type = type;
this.backColor = backColor == null ? HtmlColorUtils.WHITE : backColor;
this.backColor = backColor == null ? HColorUtils.WHITE : backColor;
this.inner = FtileUtils.addHorizontalMargin(inner, 10);
this.borderColor = borderColor == null ? HtmlColorUtils.BLACK : borderColor;
this.borderColor = borderColor == null ? HColorUtils.BLACK : borderColor;
final FontConfiguration fc;
if (SkinParam.USE_STYLES()) {
@ -107,7 +107,7 @@ public class FtileGroup extends AbstractFtile {
this.shadowing = style.value(PName.Shadowing).asDouble();
} else {
final UFont font = skinParam.getFont(null, false, FontParam.PARTITION);
final HtmlColor fontColor = skinParam.getFontHtmlColor(null, FontParam.PARTITION);
final HColor fontColor = skinParam.getFontHtmlColor(null, FontParam.PARTITION);
fc = new FontConfiguration(font, fontColor, skinParam.getHyperlinkColor(),
skinParam.useUnderlineForHyperlink(), skinParam.getTabSize());
this.shadowing = skinParam().shadowing(null) ? 3 : 0;

View File

@ -68,13 +68,13 @@ import net.sourceforge.plantuml.creole.SheetBlock2;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
class FtileIfAndStop extends AbstractFtile {
@ -111,7 +111,7 @@ class FtileIfAndStop extends AbstractFtile {
return getSwimlaneIn();
}
static Ftile create(Swimlane swimlane, HtmlColor borderColor, HtmlColor backColor, Rainbow arrowColor,
static Ftile create(Swimlane swimlane, HColor borderColor, HColor backColor, Rainbow arrowColor,
FtileFactory ftileFactory, ConditionStyle conditionStyle, Branch nonStop, ISkinParam skinParam,
StringBounder stringBounder, Display labelTest) {

View File

@ -67,13 +67,13 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondInsi
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
class FtileIfLongHorizontal extends AbstractFtile {
@ -141,7 +141,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
return getSwimlaneIn();
}
static Ftile create(Swimlane swimlane, HtmlColor borderColor, HtmlColor backColor, Rainbow arrowColor,
static Ftile create(Swimlane swimlane, HColor borderColor, HColor backColor, Rainbow arrowColor,
FtileFactory ftileFactory, ConditionStyle conditionStyle, List<Branch> thens, Branch branch2,
FontConfiguration fcArrow, LinkRendering topInlinkRendering, LinkRendering afterEndwhile,
FontConfiguration fcTest) {
@ -164,7 +164,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
final TextBlock tbTest = branch.getLabelTest().create(fcTest,
ftileFactory.skinParam().getDefaultTextAlignment(HorizontalAlignment.LEFT),
ftileFactory.skinParam());
final HtmlColor diamondColor = branch.getColor() == null ? backColor : branch.getColor();
final HColor diamondColor = branch.getColor() == null ? backColor : branch.getColor();
FtileDiamondInside2 diamond = new FtileDiamondInside2(branch.skinParam(), diamondColor, borderColor,
swimlane, tbTest);

View File

@ -63,13 +63,13 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond;
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondInside3;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
class FtileIfLongVertical extends AbstractFtile {
@ -127,7 +127,7 @@ class FtileIfLongVertical extends AbstractFtile {
return getSwimlaneIn();
}
static Ftile create(Swimlane swimlane, HtmlColor borderColor, HtmlColor backColor, Rainbow arrowColor,
static Ftile create(Swimlane swimlane, HColor borderColor, HColor backColor, Rainbow arrowColor,
FtileFactory ftileFactory, ConditionStyle conditionStyle, List<Branch> thens, Branch branch2,
FontConfiguration fc, LinkRendering topInlinkRendering, LinkRendering afterEndwhile) {
final List<Ftile> tiles = new ArrayList<Ftile>();

View File

@ -58,7 +58,6 @@ import net.sourceforge.plantuml.creole.Stencil;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.skin.rose.Rose;
@ -70,6 +69,7 @@ import net.sourceforge.plantuml.style.Styleable;
import net.sourceforge.plantuml.svek.image.Opale;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileNoteAlone extends AbstractFtile implements Stencil, Styleable {
@ -107,8 +107,8 @@ public class FtileNoteAlone extends AbstractFtile implements Stencil, Styleable
this.withOutPoint = withOutPoint;
final Rose rose = new Rose();
final HtmlColor noteBackgroundColor;
final HtmlColor borderColor;
final HColor noteBackgroundColor;
final HColor borderColor;
final double shadowing;
if (SkinParam.USE_STYLES()) {
final Style style = getDefaultStyleDefinition().getMergedStyle(skinParam.getCurrentStyleBuilder());

View File

@ -66,7 +66,6 @@ import net.sourceforge.plantuml.creole.CreoleMode;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
@ -75,6 +74,7 @@ import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UPolygon;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
class FtileRepeat extends AbstractFtile {
@ -111,8 +111,8 @@ class FtileRepeat extends AbstractFtile {
}
public static Ftile create(LinkRendering backRepeatLinkRendering, Swimlane swimlane, Swimlane swimlaneOut,
Ftile entry, Ftile repeat, Display test, Display yes, Display out, HtmlColor borderColor,
HtmlColor diamondColor, Rainbow arrowColor, Rainbow endRepeatLinkColor, ConditionStyle conditionStyle,
Ftile entry, Ftile repeat, Display test, Display yes, Display out, HColor borderColor,
HColor diamondColor, Rainbow arrowColor, Rainbow endRepeatLinkColor, ConditionStyle conditionStyle,
ISkinSimple spriteContainer, FontConfiguration fcDiamond, FontConfiguration fcArrow, Ftile backward,
boolean noOut) {
@ -579,7 +579,7 @@ class FtileRepeat extends AbstractFtile {
private UTranslate getTranslateDiamond1(StringBounder stringBounder) {
final Dimension2D dimDiamond1 = diamond1.calculateDimension(stringBounder);
final double left = getLeft(stringBounder);
return new UTranslate(left - dimDiamond1.getWidth() / 2, 0);
return UTranslate.dx(left - dimDiamond1.getWidth() / 2);
}
private UTranslate getTranslateBackward(StringBounder stringBounder) {

View File

@ -111,7 +111,7 @@ class FtileSplit1 extends AbstractFtile {
public UTranslate getTranslateFor(Ftile searched, StringBounder stringBounder) {
final Dimension2D dim = searched.calculateDimension(stringBounder);
final double xpos = calculateDimension(stringBounder).getWidth() - dim.getWidth();
return new UTranslate(xpos / 2, 0);
return UTranslate.dx(xpos / 2);
}
}

View File

@ -56,13 +56,13 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondInsi
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
class FtileSwitch extends AbstractFtile {
@ -95,7 +95,7 @@ class FtileSwitch extends AbstractFtile {
return getSwimlaneIn();
}
static Ftile create(Swimlane swimlane, HtmlColor borderColor, HtmlColor backColor, Rainbow arrowColor,
static Ftile create(Swimlane swimlane, HColor borderColor, HColor backColor, Rainbow arrowColor,
FtileFactory ftileFactory, ConditionStyle conditionStyle, List<Branch> thens, FontConfiguration fcArrow,
LinkRendering topInlinkRendering, LinkRendering afterEndwhile, FontConfiguration fcTest) {
if (afterEndwhile == null) {
@ -114,7 +114,7 @@ class FtileSwitch extends AbstractFtile {
final TextBlock tbTest = branch.getLabelTest().create(fcTest,
ftileFactory.skinParam().getDefaultTextAlignment(HorizontalAlignment.LEFT),
ftileFactory.skinParam());
final HtmlColor diamondColor = branch.getColor() == null ? backColor : branch.getColor();
final HColor diamondColor = branch.getColor() == null ? backColor : branch.getColor();
FtileDiamondInside2 diamond = new FtileDiamondInside2(branch.skinParam(), diamondColor, borderColor,
swimlane, tbTest);

View File

@ -66,7 +66,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondInsi
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
@ -77,6 +76,7 @@ import net.sourceforge.plantuml.ugraphic.UChangeColor;
import net.sourceforge.plantuml.ugraphic.UEmpty;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
class FtileWhile extends AbstractFtile {
@ -113,8 +113,8 @@ class FtileWhile extends AbstractFtile {
this.specialOut = specialOut;
}
public static Ftile create(Swimlane swimlane, Ftile whileBlock, Display test, HtmlColor borderColor,
HtmlColor backColor, Rainbow arrowColor, Display yes, Display out2, Rainbow endInlinkColor,
public static Ftile create(Swimlane swimlane, Ftile whileBlock, Display test, HColor borderColor,
HColor backColor, Rainbow arrowColor, Display yes, Display out2, Rainbow endInlinkColor,
LinkRendering afterEndwhile, FontConfiguration fontArrow, FtileFactory ftileFactory,
ConditionStyle conditionStyle, FontConfiguration fcTest, Instruction specialOut) {

View File

@ -62,7 +62,6 @@ import net.sourceforge.plantuml.creole.SheetBlock2;
import net.sourceforge.plantuml.creole.Stencil;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.sequencediagram.NotePosition;
@ -77,6 +76,7 @@ import net.sourceforge.plantuml.svek.image.Opale;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileWithNoteOpale extends AbstractFtile implements Stencil, Styleable {
@ -138,8 +138,8 @@ public class FtileWithNoteOpale extends AbstractFtile implements Stencil, Stylea
final Rose rose = new Rose();
final HtmlColor noteBackgroundColor;
final HtmlColor borderColor;
final HColor noteBackgroundColor;
final HColor borderColor;
final FontConfiguration fc;
final double shadowing;
@ -189,7 +189,7 @@ public class FtileWithNoteOpale extends AbstractFtile implements Stencil, Stylea
final double yForNote = (dimTotal.getHeight() - dimNote.getHeight()) / 2;
if (notePosition == NotePosition.LEFT) {
return new UTranslate(0, yForNote);
return UTranslate.dy(yForNote);
}
final double dx = dimTotal.getWidth() - dimNote.getWidth();
return new UTranslate(dx, yForNote);

View File

@ -58,7 +58,6 @@ import net.sourceforge.plantuml.creole.SheetBlock2;
import net.sourceforge.plantuml.creole.Stencil;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils;
@ -72,6 +71,7 @@ import net.sourceforge.plantuml.svek.image.Opale;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.utils.MathUtils;
public class FtileWithNotes extends AbstractFtile {
@ -110,8 +110,8 @@ public class FtileWithNotes extends AbstractFtile {
if (note.getColors() != null) {
skinParam2 = note.getColors().mute(skinParam2);
}
final HtmlColor noteBackgroundColor;
final HtmlColor borderColor;
final HColor noteBackgroundColor;
final HColor borderColor;
final FontConfiguration fc;
final double shadowing;

View File

@ -123,7 +123,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
final List<Connection> conns = new ArrayList<Connection>();
double x = 0;
for (Ftile tmp : getList()) {
final UTranslate translate0 = new UTranslate(0, barHeight);
final UTranslate translate0 = UTranslate.dy(barHeight);
final Dimension2D dim = tmp.calculateDimension(getStringBounder());
final Rainbow def;
if (SkinParam.USE_STYLES()) {
@ -154,7 +154,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
}
public void drawU(UGraphic ug) {
ug = ug.apply(new UTranslate(x, 0));
ug = ug.apply(UTranslate.dx(x));
final FtileGeometry geo = getFtile2().calculateDimension(getStringBounder());
final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown());
if (Display.isNull(label) == false) {
@ -166,7 +166,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
}
public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) {
ug = ug.apply(new UTranslate(x, 0));
ug = ug.apply(UTranslate.dx(x));
final FtileGeometry geo = getFtile2().calculateDimension(getStringBounder());
final Point2D p1 = new Point2D.Double(geo.getLeft(), 0);
final Point2D p2 = new Point2D.Double(geo.getLeft(), geo.getInY());
@ -182,7 +182,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
snake.addPoint(mp1a.getX(), middle);
snake.addPoint(mp2b.getX(), middle);
snake.addPoint(mp2b);
snake.setIgnoreForCompression(true);
snake.setIgnoreForCompression();
ug.draw(snake);
}
}
@ -206,7 +206,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
}
public void drawU(UGraphic ug) {
ug = ug.apply(new UTranslate(x, 0));
ug = ug.apply(UTranslate.dx(x));
final FtileGeometry geo = getFtile1().calculateDimension(getStringBounder());
if (geo.hasPointOut() == false) {
return;
@ -223,7 +223,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
}
public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) {
ug = ug.apply(new UTranslate(x, 0));
ug = ug.apply(UTranslate.dx(x));
final FtileGeometry geo = getFtile1().calculateDimension(getStringBounder());
if (geo.hasPointOut() == false) {
return;
@ -242,7 +242,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
snake.addPoint(mp1a.getX(), middle);
snake.addPoint(mp2b.getX(), middle);
snake.addPoint(mp2b);
snake.setIgnoreForCompression(true);
snake.setIgnoreForCompression();
ug.draw(snake);
}

View File

@ -55,13 +55,13 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Snake;
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileBlackBlock;
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UPolygon;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder {
@ -73,7 +73,7 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder {
protected Ftile doStep1() {
Ftile result = getMiddle();
final List<Connection> conns = new ArrayList<Connection>();
final HtmlColor colorBar = getRose().getHtmlColor(skinParam(), ColorParam.activityBar);
final HColor colorBar = getRose().getHtmlColor(skinParam(), ColorParam.activityBar);
final Ftile black = new FtileBlackBlock(skinParam(), colorBar, getList().get(0).getSwimlaneIn());
double x = 0;
@ -100,8 +100,8 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder {
@Override
protected Ftile doStep2(Ftile result) {
final HtmlColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
final HtmlColor backColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground);
final HColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
final HColor backColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground);
final Ftile out = new FtileDiamond(skinParam(), backColor, borderColor, swimlaneOutForStep2());
result = new FtileAssemblySimple(result, out);
final List<Connection> conns = new ArrayList<Connection>();
@ -198,7 +198,7 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder {
}
public void drawU(UGraphic ug) {
ug = ug.apply(new UTranslate(x, 0));
ug = ug.apply(UTranslate.dx(x));
final FtileGeometry geo = getFtile2().calculateDimension(getStringBounder());
final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown());
if (Display.isNull(label) == false) {
@ -210,7 +210,7 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder {
}
public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) {
ug = ug.apply(new UTranslate(x, 0));
ug = ug.apply(UTranslate.dx(x));
final FtileGeometry geo = getFtile2().calculateDimension(getStringBounder());
final Point2D p1 = new Point2D.Double(geo.getLeft(), 0);
final Point2D p2 = new Point2D.Double(geo.getLeft(), geo.getInY());

View File

@ -55,7 +55,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Snake;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileThinSplit;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.style.SName;
@ -63,6 +62,7 @@ import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
@ -123,7 +123,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
return new FtileAssemblySimple(thin, result);
}
private HtmlColor getThin1Color(final Rainbow thinColor) {
private HColor getThin1Color(final Rainbow thinColor) {
for (Ftile tmp : getList()) {
final Rainbow rainbow;
final LinkRendering inLinkRendering = tmp.getInLinkRendering();
@ -174,7 +174,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
double first = 0;
double last = 0;
for (Ftile tmp : getList()) {
final UTranslate translate0 = new UTranslate(0, 1.5);
final UTranslate translate0 = UTranslate.dy(1.5);
final FtileGeometry dim = tmp.calculateDimension(getStringBounder());
if (dim.hasPointOut()) {
if (first == 0) {
@ -220,7 +220,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
}
public void drawU(UGraphic ug) {
ug = ug.apply(new UTranslate(x, 0));
ug = ug.apply(UTranslate.dx(x));
final FtileGeometry geo = getFtile2().calculateDimension(getStringBounder());
final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown());
if (Display.isNull(label) == false) {
@ -232,7 +232,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
}
public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) {
ug = ug.apply(new UTranslate(x, 0));
ug = ug.apply(UTranslate.dx(x));
final FtileGeometry geo = getFtile2().calculateDimension(getStringBounder());
final Point2D p1 = new Point2D.Double(geo.getLeft(), 0);
final Point2D p2 = new Point2D.Double(geo.getLeft(), geo.getInY());
@ -271,7 +271,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
}
public void drawU(UGraphic ug) {
ug = ug.apply(new UTranslate(x, 0));
ug = ug.apply(UTranslate.dx(x));
final FtileGeometry geo = getFtile1().calculateDimension(getStringBounder());
if (geo.hasPointOut() == false) {
return;
@ -288,7 +288,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
}
public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) {
ug = ug.apply(new UTranslate(x, 0));
ug = ug.apply(UTranslate.dx(x));
final FtileGeometry geo = getFtile1().calculateDimension(getStringBounder());
if (geo.hasPointOut() == false) {
return;

View File

@ -40,7 +40,6 @@ import java.util.Set;
import net.sourceforge.plantuml.activitydiagram3.ftile.Connection;
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.graphic.UGraphicDelegator;
import net.sourceforge.plantuml.ugraphic.UChange;
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
@ -48,6 +47,7 @@ import net.sourceforge.plantuml.ugraphic.UChangeColor;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.ULine;
import net.sourceforge.plantuml.ugraphic.UShape;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public class UGraphicInterceptorOneSwimlane extends UGraphicDelegator {
@ -88,8 +88,8 @@ public class UGraphicInterceptorOneSwimlane extends UGraphicDelegator {
}
private void drawGoto() {
final UGraphic ugGoto = getUg().apply(new UChangeColor(HtmlColorUtils.GREEN)).apply(
new UChangeBackColor(HtmlColorUtils.GREEN));
final UGraphic ugGoto = getUg().apply(new UChangeColor(HColorUtils.GREEN)).apply(
new UChangeBackColor(HColorUtils.GREEN));
ugGoto.draw(new ULine(100, 100));
}

View File

@ -62,7 +62,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleStop;
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorateIn;
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorateOut;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.Colors;
@ -73,6 +72,7 @@ import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.StyleBuilder;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class VCompactFactory implements FtileFactory {
@ -98,7 +98,7 @@ public class VCompactFactory implements FtileFactory {
}
public Ftile start(Swimlane swimlane) {
final HtmlColor color;
final HColor color;
Style style = null;
if (SkinParam.USE_STYLES()) {
style = getDefaultStyleDefinitionCircle().getMergedStyle(skinParam.getCurrentStyleBuilder());
@ -110,7 +110,7 @@ public class VCompactFactory implements FtileFactory {
}
public Ftile stop(Swimlane swimlane) {
final HtmlColor color;
final HColor color;
Style style = null;
if (SkinParam.USE_STYLES()) {
style = getDefaultStyleDefinitionCircle().getMergedStyle(skinParam.getCurrentStyleBuilder());
@ -121,7 +121,7 @@ public class VCompactFactory implements FtileFactory {
return new FtileCircleStop(skinParam(), color, swimlane, style);
}
public Ftile spot(Swimlane swimlane, String spot, HtmlColor color) {
public Ftile spot(Swimlane swimlane, String spot, HColor color) {
// final HtmlColor color = rose.getHtmlColor(skinParam,
// ColorParam.activityBackground);
final UFont font = skinParam.getFont(null, false, FontParam.ACTIVITY);
@ -129,7 +129,7 @@ public class VCompactFactory implements FtileFactory {
}
public Ftile end(Swimlane swimlane) {
final HtmlColor color;
final HColor color;
Style style = null;
if (SkinParam.USE_STYLES()) {
style = getDefaultStyleDefinitionCircle().getMergedStyle(skinParam.getCurrentStyleBuilder());
@ -169,7 +169,7 @@ public class VCompactFactory implements FtileFactory {
}
public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out,
LinkRendering afterEndwhile, HtmlColor color, Instruction specialOut) {
LinkRendering afterEndwhile, HColor color, Instruction specialOut) {
return whileBlock;
}
@ -196,8 +196,8 @@ public class VCompactFactory implements FtileFactory {
return new FtileForkInner(all);
}
public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note,
HtmlColor borderColor, USymbol type, double roundCorner) {
public Ftile createGroup(Ftile list, Display name, HColor backColor, HColor titleColor, PositionedNote note,
HColor borderColor, USymbol type, double roundCorner) {
return list;
}

View File

@ -61,7 +61,6 @@ import net.sourceforge.plantuml.creole.SheetBlock2;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
@ -71,12 +70,13 @@ import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.svek.ConditionEndStyle;
import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class ConditionalBuilder {
private final Swimlane swimlane;
private final HtmlColor borderColor;
private final HtmlColor backColor;
private final HColor borderColor;
private final HColor backColor;
private final Rainbow arrowColor;
private final FtileFactory ftileFactory;
private final ConditionStyle conditionStyle;
@ -100,7 +100,7 @@ public class ConditionalBuilder {
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
}
public ConditionalBuilder(Swimlane swimlane, HtmlColor borderColor, HtmlColor backColor, Rainbow arrowColor,
public ConditionalBuilder(Swimlane swimlane, HColor borderColor, HColor backColor, Rainbow arrowColor,
FtileFactory ftileFactory, ConditionStyle conditionStyle, ConditionEndStyle conditionEndStyle,
Branch branch1, Branch branch2, ISkinParam skinParam, StringBounder stringBounder,
FontConfiguration fontArrow, FontConfiguration fontTest, Url url) {
@ -137,7 +137,7 @@ public class ConditionalBuilder {
}
static public Ftile create(Swimlane swimlane, HtmlColor borderColor, HtmlColor backColor, Rainbow arrowColor,
static public Ftile create(Swimlane swimlane, HColor borderColor, HColor backColor, Rainbow arrowColor,
FtileFactory ftileFactory, ConditionStyle conditionStyle, ConditionEndStyle conditionEndStyle,
Branch branch1, Branch branch2, ISkinParam skinParam, StringBounder stringBounder,
FontConfiguration fcArrow, FontConfiguration fcTest, Url url) {

View File

@ -116,14 +116,14 @@ public class FtileIfWithDiamonds extends FtileIfNude {
protected UTranslate getTranslate1(StringBounder stringBounder) {
final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder);
return super.getTranslate1(stringBounder).compose(
new UTranslate(0, dimDiamond1.getHeight() + getYdelta1a(stringBounder)));
UTranslate.dy(dimDiamond1.getHeight() + getYdelta1a(stringBounder)));
}
@Override
protected UTranslate getTranslate2(StringBounder stringBounder) {
final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder);
return super.getTranslate2(stringBounder).compose(
new UTranslate(0, dimDiamond1.getHeight() + getYdelta1a(stringBounder)));
UTranslate.dy(dimDiamond1.getHeight() + getYdelta1a(stringBounder)));
}
protected UTranslate getTranslateDiamond1(StringBounder stringBounder) {

View File

@ -100,7 +100,7 @@ public class FtileSwitchNude extends FtileDimensionMemoize {
for (Ftile candidate : tiles) {
final FtileGeometry dim1 = candidate.calculateDimension(stringBounder);
if (candidate == tile) {
return new UTranslate(x1, 0);
return UTranslate.dx(x1);
}
x1 += dim1.getWidth() + xSeparation;
}

View File

@ -155,14 +155,14 @@ public class FtileSwitchWithDiamonds extends FtileSwitchNude {
final double suppx = (w13 - w9) / (tiles.size() - 1);
for (int i = 0; i < tiles.size() - 1; i++) {
if (tile == tiles.get(i)) {
return main.compose(new UTranslate(dx, 0));
return main.compose(UTranslate.dx(dx));
}
dx += tiles.get(i).calculateDimension(stringBounder).getWidth() + suppx;
}
if (tile == tiles.get(tiles.size() - 1)) {
final double dx9 = tiles.get(0).calculateDimension(stringBounder).getWidth() + w13 + SUPP15 + SUPP15;
return main.compose(new UTranslate(dx9, 0));
return main.compose(UTranslate.dx(dx9));
}
throw new IllegalArgumentException();
@ -173,7 +173,7 @@ public class FtileSwitchWithDiamonds extends FtileSwitchNude {
protected UTranslate getTranslateMain(StringBounder stringBounder) {
final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder);
final double dy1 = dimDiamond1.getHeight() + getYdelta1a(stringBounder);
return new UTranslate(0, dy1);
return UTranslate.dy(dy1);
}
protected UTranslate getTranslateDiamond1(StringBounder stringBounder) {

View File

@ -43,7 +43,6 @@ import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils;
@ -52,6 +51,7 @@ import net.sourceforge.plantuml.ugraphic.UChangeColor;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.URectangle;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileBlackBlock extends AbstractFtile {
@ -60,10 +60,10 @@ public class FtileBlackBlock extends AbstractFtile {
private double width;
private double height;
private TextBlock label = TextBlockUtils.empty(0, 0);
private final HtmlColor colorBar;
private final HColor colorBar;
private final Swimlane swimlane;
public FtileBlackBlock(ISkinParam skinParam, HtmlColor colorBar, Swimlane swimlane) {
public FtileBlackBlock(ISkinParam skinParam, HColor colorBar, Swimlane swimlane) {
super(skinParam);
this.colorBar = colorBar;
this.swimlane = swimlane;
@ -91,8 +91,7 @@ public class FtileBlackBlock extends AbstractFtile {
}
public void drawU(UGraphic ug) {
final URectangle rect = new URectangle(width, height, 5, 5);
rect.setIgnoreForCompression(true);
final URectangle rect = new URectangle(width, height).rounded(5).ignoreForCompression();
if (skinParam().shadowing(null)) {
rect.setDeltaShadow(3);
}

View File

@ -63,7 +63,6 @@ import net.sourceforge.plantuml.creole.Stencil;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
@ -80,6 +79,7 @@ import net.sourceforge.plantuml.ugraphic.UChangeColor;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileBox extends AbstractFtile {
@ -98,8 +98,8 @@ public class FtileBox extends AbstractFtile {
private final Swimlane swimlane;
private final BoxStyle boxStyle;
private final HtmlColor borderColor;
private final HtmlColor backColor;
private final HColor borderColor;
private final HColor backColor;
private final Style style;
static public StyleSignature getDefaultStyleDefinitionActivity() {

View File

@ -45,8 +45,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.Style;
@ -57,12 +55,14 @@ import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.ULine;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public class FtileCircleEnd extends AbstractFtile {
private static final int SIZE = 20;
private final HtmlColor backColor;
private final HColor backColor;
private final Swimlane swimlane;
private double shadowing;
@ -71,7 +71,7 @@ public class FtileCircleEnd extends AbstractFtile {
return Collections.emptyList();
}
public FtileCircleEnd(ISkinParam skinParam, HtmlColor backColor, Swimlane swimlane, Style style) {
public FtileCircleEnd(ISkinParam skinParam, HColor backColor, Swimlane swimlane, Style style) {
super(skinParam);
this.backColor = backColor;
this.swimlane = swimlane;
@ -109,7 +109,7 @@ public class FtileCircleEnd extends AbstractFtile {
circle.setDeltaShadow(shadowing);
ug = ug.apply(new UChangeColor(backColor));
final double thickness = 2.5;
ug.apply(new UChangeBackColor(HtmlColorUtils.WHITE)).apply(new UStroke(1.5))
ug.apply(new UChangeBackColor(HColorUtils.WHITE)).apply(new UStroke(1.5))
.apply(new UTranslate(xTheoricalPosition, yTheoricalPosition)).draw(circle);
final double size2 = (SIZE - thickness) / Math.sqrt(2);

View File

@ -48,7 +48,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.UCenteredCharacter;
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
@ -57,6 +56,7 @@ import net.sourceforge.plantuml.ugraphic.UEllipse;
import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileCircleSpot extends AbstractFtile {
@ -65,9 +65,9 @@ public class FtileCircleSpot extends AbstractFtile {
private final Swimlane swimlane;
private final String spot;
private final FontConfiguration fc;
private final HtmlColor backColor;
private final HColor backColor;
public FtileCircleSpot(ISkinParam skinParam, Swimlane swimlane, String spot, UFont font, HtmlColor backColor) {
public FtileCircleSpot(ISkinParam skinParam, Swimlane swimlane, String spot, UFont font, HColor backColor) {
super(skinParam);
this.spot = spot;
this.swimlane = swimlane;
@ -97,8 +97,8 @@ public class FtileCircleSpot extends AbstractFtile {
public void drawU(UGraphic ug) {
final HtmlColor borderColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBorder);
final HtmlColor backColor = this.backColor == null ? SkinParamUtils.getColor(skinParam(), null,
final HColor borderColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBorder);
final HColor backColor = this.backColor == null ? SkinParamUtils.getColor(skinParam(), null,
ColorParam.activityBackground) : this.backColor;
final UEllipse circle = new UEllipse(SIZE, SIZE);

View File

@ -45,7 +45,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.Style;
@ -53,16 +52,17 @@ import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
import net.sourceforge.plantuml.ugraphic.UChangeColor;
import net.sourceforge.plantuml.ugraphic.UEllipse;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileCircleStart extends AbstractFtile {
private static final int SIZE = 20;
private final HtmlColor backColor;
private final HColor backColor;
private final Swimlane swimlane;
private double shadowing;
public FtileCircleStart(ISkinParam skinParam, HtmlColor backColor, Swimlane swimlane, Style style) {
public FtileCircleStart(ISkinParam skinParam, HColor backColor, Swimlane swimlane, Style style) {
super(skinParam);
this.backColor = backColor;
this.swimlane = swimlane;

Some files were not shown because too many files have changed in this diff Show More