1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-12-22 10:59:01 +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> <groupId>net.sourceforge.plantuml</groupId>
<artifactId>plantuml</artifactId> <artifactId>plantuml</artifactId>
<version>1.2020.3-SNAPSHOT</version> <version>1.2020.4-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>PlantUML</name> <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.cucadiagram.DisplaySection;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; 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.InnerStrategy;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.SymbolContext; 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.MinMax;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public class AnnotatedWorker { public class AnnotatedWorker {
@ -97,7 +97,7 @@ public class AnnotatedWorker {
final double y1 = 10; final double y1 = 10;
final double y2 = 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); .withShadow(getSkinParam().shadowing(null) ? 3 : 0);
final MinMax originalMinMax = TextBlockUtils.getMinMax(original, stringBounder); final MinMax originalMinMax = TextBlockUtils.getMinMax(original, stringBounder);
final TextBlock title = mainFrame.create(new FontConfiguration(getSkinParam(), FontParam.CAPTION, null), final TextBlock title = mainFrame.create(new FontConfiguration(getSkinParam(), FontParam.CAPTION, null),
@ -112,7 +112,7 @@ public class AnnotatedWorker {
return new TextBlockBackcolored() { return new TextBlockBackcolored() {
public void drawU(UGraphic ug) { 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.apply(new UTranslate(x1, y1 + dimTitle.getHeight())));
// original.drawU(ug); // original.drawU(ug);
} }
@ -131,7 +131,7 @@ public class AnnotatedWorker {
return original.calculateDimension(stringBounder); return original.calculateDimension(stringBounder);
} }
public HtmlColor getBackcolor() { public HColor getBackcolor() {
return symbolContext.getBackColor(); return symbolContext.getBackColor();
} }
}; };

View File

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

View File

@ -75,7 +75,7 @@ public final class BlockUmlBuilder implements DefinitionsContainer {
} finally { } finally {
if (includer != null) { if (includer != null) {
includer.close(); includer.close();
usedFiles = includer.getFilesUsed(); // usedFiles = includer.getFilesUsedTOBEREMOVED();
} }
readerInit.close(); readerInit.close();
} }
@ -120,7 +120,9 @@ public final class BlockUmlBuilder implements DefinitionsContainer {
if (paused) { if (paused) {
current2.add(s); 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; current2 = null;
reader.setPaused(false); reader.setPaused(false);
} }

View File

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

View File

@ -45,7 +45,7 @@ import java.util.List;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
import net.sourceforge.plantuml.core.Diagram; 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.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;

View File

@ -41,8 +41,8 @@ import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils;
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.UAntiAliasing; import net.sourceforge.plantuml.ugraphic.UAntiAliasing;
import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.g2d.UGraphicG2d; import net.sourceforge.plantuml.ugraphic.g2d.UGraphicG2d;
public class EmptyImageBuilder { 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.Stereotype;
import net.sourceforge.plantuml.cucadiagram.dot.DotSplines; import net.sourceforge.plantuml.cucadiagram.dot.DotSplines;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.SkinParameter; import net.sourceforge.plantuml.graphic.SkinParameter;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.skin.ActorStyle; 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.svek.PackageStyle;
import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public interface ISkinParam extends ISkinSimple { public interface ISkinParam extends ISkinSimple {
public static final int SWIMLANE_WIDTH_SAME = -1; public static final int SWIMLANE_WIDTH_SAME = -1;
public HtmlColor getHyperlinkColor(); public HColor getHyperlinkColor();
public boolean useUnderlineForHyperlink(); 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 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); public UStroke getThickness(LineParam param, Stereotype stereotype);
@ -156,7 +156,7 @@ public interface ISkinParam extends ISkinSimple {
public UmlDiagramType getUmlDiagramType(); public UmlDiagramType getUmlDiagramType();
public HtmlColor getHoverPathColor(); public HColor getHoverPathColor();
public TikzFontDistortion getTikzFontDistortion(); public TikzFontDistortion getTikzFontDistortion();

View File

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

View File

@ -35,15 +35,15 @@
*/ */
package net.sourceforge.plantuml; package net.sourceforge.plantuml;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public interface LineConfigurable { public interface LineConfigurable {
public Colors getColors(ISkinParam skinParam); 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, archimateBorder,
componentBorder, componentBorder,
cardBorder, cardBorder,
queueBorder,
agentBorder, agentBorder,
domainBorder, designedDomainBorder, machineBorder, requirementBorder; domainBorder, designedDomainBorder, machineBorder, requirementBorder;
// sequenceBoxBorder(0.1); // 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.Diagram;
import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.CucaDiagram;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.html.CucaDiagramHtmlMaker; import net.sourceforge.plantuml.html.CucaDiagramHtmlMaker;
import net.sourceforge.plantuml.png.PngSplitter; import net.sourceforge.plantuml.png.PngSplitter;
import net.sourceforge.plantuml.project.GanttDiagram; import net.sourceforge.plantuml.project.GanttDiagram;
import net.sourceforge.plantuml.sequencediagram.SequenceDiagram; import net.sourceforge.plantuml.sequencediagram.SequenceDiagram;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public class PSystemUtils { public class PSystemUtils {
@ -300,7 +300,7 @@ public class PSystemUtils {
List<File> result = Arrays.asList(suggestedFile.getFile(0)); List<File> result = Arrays.asList(suggestedFile.getFile(0));
if (fileFormat.getFileFormat() == FileFormat.PNG) { 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(), result = new PngSplitter(suggestedFile, system.getHorizontalPages(), system.getVerticalPages(),
system.getMetadata(), system.getDpi(fileFormat), fileFormat.isWithMetadata(), splitParam) system.getMetadata(), system.getDpi(fileFormat), fileFormat.isWithMetadata(), splitParam)
.getFiles(); .getFiles();

View File

@ -291,8 +291,8 @@ public class Run {
} }
final String name = getSpriteName(fileName); final String name = getSpriteName(fileName);
final String s = compressed ? SpriteUtils.encodeCompressed(im, name, level) : SpriteUtils.encode(im, name, final String s = compressed ? SpriteUtils.encodeCompressed(im, name, level)
level); : SpriteUtils.encode(im, name, level);
System.out.println(s); System.out.println(s);
} }
@ -326,8 +326,8 @@ public class Run {
public static void printFonts() { public static void printFonts() {
final Font fonts[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(); final Font fonts[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
for (Font f : fonts) { for (Font f : fonts) {
System.out.println("f=" + f + "/" + f.getPSName() + "/" + f.getName() + "/" + f.getFontName() + "/" System.out.println(
+ f.getFamily()); "f=" + f + "/" + f.getPSName() + "/" + f.getName() + "/" + f.getFontName() + "/" + f.getFamily());
} }
final String name[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); final String name[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
for (String n : name) { for (String n : name) {
@ -458,8 +458,8 @@ public class Run {
ProgressBar.incTotal(nb); ProgressBar.incTotal(nb);
} }
private static void manageFileInternal(File f, Option option, ErrorStatus error) throws IOException, private static void manageFileInternal(File f, Option option, ErrorStatus error)
InterruptedException { throws IOException, InterruptedException {
Log.info("Working on " + f.getAbsolutePath()); Log.info("Working on " + f.getAbsolutePath());
if (OptionFlags.getInstance().isExtractFromMetadata()) { if (OptionFlags.getInstance().isExtractFromMetadata()) {
System.out.println("------------------------"); System.out.println("------------------------");
@ -540,9 +540,19 @@ public class Run {
final File file = suggested.getFile(0); final File file = suggested.getFile(0);
Log.info("Export preprocessing source to " + file.getAbsolutePath()); Log.info("Export preprocessing source to " + file.getAbsolutePath());
final PrintWriter pw = charset == null ? new PrintWriter(file) : new PrintWriter(file, charset); 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) { 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); 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.Matcher2;
import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.MyPattern;
import net.sourceforge.plantuml.command.regex.Pattern2; 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.LinkStyle;
import net.sourceforge.plantuml.cucadiagram.Rankdir; import net.sourceforge.plantuml.cucadiagram.Rankdir;
import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.cucadiagram.dot.DotSplines; import net.sourceforge.plantuml.cucadiagram.dot.DotSplines;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; 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.SkinParameter;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.skin.ActorStyle; 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.ConditionEndStyle;
import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.svek.PackageStyle; 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.UFont;
import net.sourceforge.plantuml.ugraphic.UStroke; 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 { public class SkinParam implements ISkinParam {
@ -255,18 +255,18 @@ public class SkinParam implements ISkinParam {
return s.replaceAll(src, target); return s.replaceAll(src, target);
} }
public HtmlColor getHyperlinkColor() { public HColor getHyperlinkColor() {
final HtmlColor result = getHtmlColor(ColorParam.hyperlink, null, false); final HColor result = getHtmlColor(ColorParam.hyperlink, null, false);
if (result == null) { if (result == null) {
return HtmlColorUtils.BLUE; return HColorUtils.BLUE;
} }
return result; return result;
} }
public HtmlColor getBackgroundColor() { public HColor getBackgroundColor() {
final HtmlColor result = getHtmlColor(ColorParam.background, null, false); final HColor result = getHtmlColor(ColorParam.background, null, false);
if (result == null) { if (result == null) {
return HtmlColorUtils.WHITE; return HColorUtils.WHITE;
} }
return result; return result;
} }
@ -296,7 +296,7 @@ public class SkinParam implements ISkinParam {
return sb.toString(); return sb.toString();
} }
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) { public HColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
if (stereotype != null) { if (stereotype != null) {
checkStereotype(stereotype); checkStereotype(stereotype);
for (String s : stereotype.getMultipleLabels()) { for (String s : stereotype.getMultipleLabels()) {
@ -310,9 +310,16 @@ public class SkinParam implements ISkinParam {
if (value == null) { if (value == null) {
return null; return null;
} }
final boolean acceptTransparent = param == ColorParam.background if (param == ColorParam.background && value.equalsIgnoreCase("transparent")) {
|| param == ColorParam.sequenceGroupBodyBackground || param == ColorParam.sequenceBoxBackground; return null;
return getIHtmlColorSet().getColorIfValid(value, acceptTransparent); }
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) { public char getCircledCharacter(Stereotype stereotype) {
@ -352,7 +359,8 @@ public class SkinParam implements ISkinParam {
} }
private void checkStereotype(Stereotype stereotype) { private void checkStereotype(Stereotype stereotype) {
// if (stereotype.startsWith("<<") == false || stereotype.endsWith(">>") == false) { // if (stereotype.startsWith("<<") == false || stereotype.endsWith(">>") ==
// false) {
// throw new IllegalArgumentException(); // throw new IllegalArgumentException();
// } // }
} }
@ -399,7 +407,7 @@ public class SkinParam implements ISkinParam {
return param[0].getDefaultFamily(); return param[0].getDefaultFamily();
} }
public HtmlColor getFontHtmlColor(Stereotype stereotype, FontParam... param) { public HColor getFontHtmlColor(Stereotype stereotype, FontParam... param) {
String value = null; String value = null;
if (stereotype != null) { if (stereotype != null) {
checkStereotype(stereotype); checkStereotype(stereotype);
@ -684,6 +692,9 @@ public class SkinParam implements ISkinParam {
if (value == null) { if (value == null) {
return new ColorMapperIdentity(); return new ColorMapperIdentity();
} }
if ("dark".equalsIgnoreCase(value)) {
return new ColorMapperLightnessInverse();
}
final ColorOrder order = ColorOrder.fromString(value); final ColorOrder order = ColorOrder.fromString(value);
if (order == null) { if (order == null) {
return new ColorMapperIdentity(); return new ColorMapperIdentity();
@ -876,14 +887,14 @@ public class SkinParam implements ISkinParam {
if (stereotype != null) { if (stereotype != null) {
checkStereotype(stereotype); checkStereotype(stereotype);
final String styleValue = getValue(param.name() + "style" final String styleValue = getValue(
+ stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR)); param.name() + "style" + stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR));
if (styleValue != null) { if (styleValue != null) {
style = LinkStyle.fromString2(styleValue); style = LinkStyle.fromString2(styleValue);
} }
final String value2 = getValue(param.name() + "thickness" final String value2 = getValue(
+ stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR)); param.name() + "thickness" + stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR));
if (value2 != null && value2.matches("[\\d.]+")) { if (value2 != null && value2.matches("[\\d.]+")) {
if (style == null) { if (style == null) {
style = LinkStyle.NORMAL(); style = LinkStyle.NORMAL();
@ -1000,9 +1011,9 @@ public class SkinParam implements ISkinParam {
return false; return false;
} }
private final IHtmlColorSet htmlColorSet = new HtmlColorSetSimple(); private final HColorSet htmlColorSet = HColorSet.instance();
public IHtmlColorSet getIHtmlColorSet() { public HColorSet getIHtmlColorSet() {
return htmlColorSet; return htmlColorSet;
} }
@ -1116,12 +1127,12 @@ public class SkinParam implements ISkinParam {
return type; return type;
} }
public HtmlColor getHoverPathColor() { public HColor getHoverPathColor() {
final String value = getValue("pathhovercolor"); final String value = getValue("pathhovercolor");
if (value == null) { if (value == null) {
return null; return null;
} }
return getIHtmlColorSet().getColorIfValid(value, false); return getIHtmlColorSet().getColorIfValid(value, null);
} }
public double getPadding() { public double getPadding() {
@ -1199,8 +1210,8 @@ public class SkinParam implements ISkinParam {
if (padding == 0 && margin == 0 && borderColor == null && backgroundColor == null) { if (padding == 0 && margin == 0 && borderColor == null && backgroundColor == null) {
return Padder.NONE; return Padder.NONE;
} }
final HtmlColor border = getIHtmlColorSet().getColorIfValid(borderColor); final HColor border = getIHtmlColorSet().getColorIfValid(borderColor);
final HtmlColor background = getIHtmlColorSet().getColorIfValid(backgroundColor); final HColor background = getIHtmlColorSet().getColorIfValid(backgroundColor);
final double roundCorner = getRoundCorner(CornerParam.DEFAULT, null); final double roundCorner = getRoundCorner(CornerParam.DEFAULT, null);
return Padder.NONE.withMargin(margin).withPadding(padding).withBackgroundColor(background) return Padder.NONE.withMargin(margin).withPadding(padding).withBackgroundColor(background)
.withBorderColor(border).withRoundCorner(roundCorner); .withBorderColor(border).withRoundCorner(roundCorner);

View File

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

View File

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

View File

@ -36,9 +36,9 @@
package net.sourceforge.plantuml; package net.sourceforge.plantuml;
import net.sourceforge.plantuml.cucadiagram.Stereotype; 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.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class SkinParamColors extends SkinParamDelegator { public class SkinParamColors extends SkinParamDelegator {
@ -67,8 +67,8 @@ public class SkinParamColors extends SkinParamDelegator {
} }
@Override @Override
public HtmlColor getFontHtmlColor(Stereotype stereotype, FontParam... param) { public HColor getFontHtmlColor(Stereotype stereotype, FontParam... param) {
final HtmlColor value = colors.getColor(ColorType.TEXT); final HColor value = colors.getColor(ColorType.TEXT);
if (value == null) { if (value == null) {
return super.getFontHtmlColor(stereotype, param); return super.getFontHtmlColor(stereotype, param);
} }
@ -76,12 +76,12 @@ public class SkinParamColors extends SkinParamDelegator {
} }
@Override @Override
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) { public HColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
final ColorType type = param.getColorType(); final ColorType type = param.getColorType();
if (type == null) { if (type == null) {
return super.getHtmlColor(param, stereotype, clickable); return super.getHtmlColor(param, stereotype, clickable);
} }
final HtmlColor value = colors.getColor(type); final HColor value = colors.getColor(type);
if (value != null) { if (value != null) {
return value; 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.Stereotype;
import net.sourceforge.plantuml.cucadiagram.dot.DotSplines; import net.sourceforge.plantuml.cucadiagram.dot.DotSplines;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; 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.SkinParameter;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.skin.ActorStyle; 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.ConditionEndStyle;
import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.svek.PackageStyle; import net.sourceforge.plantuml.svek.PackageStyle;
import net.sourceforge.plantuml.ugraphic.ColorMapper;
import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.ugraphic.UStroke; 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 { public class SkinParamDelegator implements ISkinParam {
@ -67,11 +67,11 @@ public class SkinParamDelegator implements ISkinParam {
this.skinParam = skinParam; this.skinParam = skinParam;
} }
public HtmlColor getHyperlinkColor() { public HColor getHyperlinkColor() {
return skinParam.getHyperlinkColor(); return skinParam.getHyperlinkColor();
} }
public HtmlColor getBackgroundColor() { public HColor getBackgroundColor() {
return skinParam.getBackgroundColor(); return skinParam.getBackgroundColor();
} }
@ -83,11 +83,11 @@ public class SkinParamDelegator implements ISkinParam {
return skinParam.getFont(stereotype, false, fontParam); 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); 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); return skinParam.getHtmlColor(param, stereotype, clickable);
} }
@ -204,7 +204,7 @@ public class SkinParamDelegator implements ISkinParam {
return skinParam.useOctagonForActivity(stereotype); return skinParam.useOctagonForActivity(stereotype);
} }
public IHtmlColorSet getIHtmlColorSet() { public HColorSet getIHtmlColorSet() {
return skinParam.getIHtmlColorSet(); return skinParam.getIHtmlColorSet();
} }
@ -276,7 +276,7 @@ public class SkinParamDelegator implements ISkinParam {
return skinParam.getUmlDiagramType(); return skinParam.getUmlDiagramType();
} }
public HtmlColor getHoverPathColor() { public HColor getHoverPathColor() {
return skinParam.getHoverPathColor(); return skinParam.getHoverPathColor();
} }

View File

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

View File

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

View File

@ -36,9 +36,9 @@
package net.sourceforge.plantuml; package net.sourceforge.plantuml;
import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class SkinParamUtils { public class SkinParamUtils {
@ -48,11 +48,11 @@ public class SkinParamUtils {
return skinParam.getFont(stereo, false, fontParam); 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); 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); 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.graphic.GraphicStrings;
import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.preproc.Defines;
import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.svek.TextBlockBackcolored;
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.ImageBuilder; import net.sourceforge.plantuml.ugraphic.ImageBuilder;
import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity;
public class SourceStringReader { public class SourceStringReader {

View File

@ -37,20 +37,20 @@ package net.sourceforge.plantuml;
import java.awt.Color; import java.awt.Color;
import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.graphic.HtmlColorSimple; import net.sourceforge.plantuml.ugraphic.color.HColorSimple;
public class SplitParam { public class SplitParam {
private final HtmlColor borderColor; private final HColor borderColor;
private final HtmlColor externalColor; private final HColor externalColor;
private final int externalMargin; private final int externalMargin;
public SplitParam() { public SplitParam() {
this(null, null, 0); 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) { if (borderColor != null && externalMargin == 0) {
externalMargin = 1; externalMargin = 1;
} }
@ -71,14 +71,14 @@ public class SplitParam {
if (borderColor == null) { if (borderColor == null) {
return null; return null;
} }
return ((HtmlColorSimple) borderColor).getColor999(); return ((HColorSimple) borderColor).getColor999();
} }
public Color getExternalColor() { public Color getExternalColor() {
if (externalColor == null) { if (externalColor == null) {
return 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 java.util.Map;
import net.sourceforge.plantuml.creole.CommandCreoleMonospaced; import net.sourceforge.plantuml.creole.command.CommandCreoleMonospaced;
import net.sourceforge.plantuml.graphic.HtmlColorSetSimple;
import net.sourceforge.plantuml.graphic.IHtmlColorSet;
import net.sourceforge.plantuml.sprite.Sprite; import net.sourceforge.plantuml.sprite.Sprite;
import net.sourceforge.plantuml.sprite.SpriteImage; import net.sourceforge.plantuml.sprite.SpriteImage;
import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.color.ColorMapper;
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.color.HColorSet;
public class SpriteContainerEmpty implements SpriteContainer, ISkinSimple { public class SpriteContainerEmpty implements SpriteContainer, ISkinSimple {
@ -71,8 +70,8 @@ public class SpriteContainerEmpty implements SpriteContainer, ISkinSimple {
return 8; return 8;
} }
public IHtmlColorSet getIHtmlColorSet() { public HColorSet getIHtmlColorSet() {
return new HtmlColorSetSimple(); return HColorSet.instance();
} }
public int getDpi() { 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.MyPattern;
import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.command.regex.Pattern2;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.ugraphic.color.ColorMapper;
import net.sourceforge.plantuml.graphic.HtmlColorTransparent; import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.color.HColorBackground;
// Do not move // Do not move
public class StringUtils { public class StringUtils {
@ -371,7 +371,9 @@ public class StringUtils {
public static List<String> splitComma(String s) { public static List<String> splitComma(String s) {
s = trin(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(); // throw new IllegalArgumentException();
// } // }
final List<String> result = new ArrayList<String>(); final List<String> result = new ArrayList<String>();
@ -390,12 +392,12 @@ public class StringUtils {
return getAsHtml(color.getRGB()); return getAsHtml(color.getRGB());
} }
public static String getAsSvg(ColorMapper mapper, HtmlColor color) { public static String getAsSvg(ColorMapper mapper, HColor color) {
if (color == null) { if (color == null) {
return "none"; return "none";
} }
if (color instanceof HtmlColorTransparent) { if (color instanceof HColorBackground) {
return "#FFFFFF"; return ((HColorBackground) color).getSvg(mapper);
} }
return getAsHtml(mapper.getMappedColor(color)); return getAsHtml(mapper.getMappedColor(color));
} }

View File

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

View File

@ -70,8 +70,6 @@ import net.sourceforge.plantuml.flashcode.FlashCodeUtils;
import net.sourceforge.plantuml.fun.IconLoader; import net.sourceforge.plantuml.fun.IconLoader;
import net.sourceforge.plantuml.graphic.GraphicPosition; import net.sourceforge.plantuml.graphic.GraphicPosition;
import net.sourceforge.plantuml.graphic.GraphicStrings; 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.graphic.UDrawable;
import net.sourceforge.plantuml.mjpeg.MJPEGGenerator; import net.sourceforge.plantuml.mjpeg.MJPEGGenerator;
import net.sourceforge.plantuml.pdf.PdfConverter; 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.EmptySvgException;
import net.sourceforge.plantuml.svek.GraphvizCrash; import net.sourceforge.plantuml.svek.GraphvizCrash;
import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.svek.TextBlockBackcolored;
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.ImageBuilder; import net.sourceforge.plantuml.ugraphic.ImageBuilder;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UImage;
import net.sourceforge.plantuml.ugraphic.UTranslate; 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; import net.sourceforge.plantuml.version.Version;
public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annotated, WithSprite { 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) final protected ImageData exportDiagramNow(OutputStream os, int index, FileFormatOption fileFormatOption, long seed)
throws IOException { throws IOException {
final HtmlColor hover = getSkinParam().getHoverPathColor(); final HColor hover = getSkinParam().getHoverPathColor();
if (fileFormatOption.getSvgLinkTarget() == null || fileFormatOption.getSvgLinkTarget().equals("_top")) { if (fileFormatOption.getSvgLinkTarget() == null || fileFormatOption.getSvgLinkTarget().equals("_top")) {
fileFormatOption = fileFormatOption.withSvgLinkTarget(getSkinParam().getSvgLinkTarget()); fileFormatOption = fileFormatOption.withSvgLinkTarget(getSkinParam().getSvgLinkTarget());
} }
@ -227,7 +227,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot
strings.addAll(CommandExecutionResult.getStackTrace(exception)); 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); metadata, null, 0, 0, null, false);
final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils(); final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
@ -246,7 +246,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot
public void drawU(UGraphic ug) { public void drawU(UGraphic ug) {
graphicStrings.drawU(ug); graphicStrings.drawU(ug);
final double height = graphicStrings.calculateDimension(ug.getStringBounder()).getHeight(); 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)); 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.DiagramDescription;
import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockRecentred; 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.NotePosition;
import net.sourceforge.plantuml.sequencediagram.NoteType; import net.sourceforge.plantuml.sequencediagram.NoteType;
import net.sourceforge.plantuml.ugraphic.ImageBuilder; 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.CompressionMode;
import net.sourceforge.plantuml.ugraphic.comp.TextBlockCompressedOnXorY; 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) { if (swimlaneStrategy == null) {
swimlaneStrategy = SwimlaneStrategy.SWIMLANE_ALLOWED; 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()); final InstructionSpot ins = new InstructionSpot(spot, color, nextLinkRenderer(), swinlanes.getCurrentSwimlane());
current().add(ins); current().add(ins);
setNextLinkRendererInternal(LinkRendering.none()); setNextLinkRendererInternal(LinkRendering.none());
@ -295,7 +295,7 @@ public class ActivityDiagram3 extends UmlDiagram {
return CommandExecutionResult.error("Cannot find split"); return CommandExecutionResult.error("Cannot find split");
} }
public void startSwitch(Display test, HtmlColor color) { public void startSwitch(Display test, HColor color) {
manageSwimlaneStrategy(); manageSwimlaneStrategy();
final InstructionSwitch instructionSwitch = new InstructionSwitch(swinlanes.getCurrentSwimlane(), current(), final InstructionSwitch instructionSwitch = new InstructionSwitch(swinlanes.getCurrentSwimlane(), current(),
test, nextLinkRenderer(), color, getSkinParam()); test, nextLinkRenderer(), color, getSkinParam());
@ -327,7 +327,7 @@ public class ActivityDiagram3 extends UmlDiagram {
return CommandExecutionResult.error("Cannot find switch"); 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(); manageSwimlaneStrategy();
final InstructionIf instructionIf = new InstructionIf(swinlanes.getCurrentSwimlane(), current(), test, final InstructionIf instructionIf = new InstructionIf(swinlanes.getCurrentSwimlane(), current(), test,
whenThen, nextLinkRenderer(), color, getSkinParam(), url); whenThen, nextLinkRenderer(), color, getSkinParam(), url);
@ -336,7 +336,7 @@ public class ActivityDiagram3 extends UmlDiagram {
setCurrent(instructionIf); 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) { if (current() instanceof InstructionIf) {
final boolean ok = ((InstructionIf) current()).elseIf(inlabel, test, whenThen, nextLinkRenderer(), color); final boolean ok = ((InstructionIf) current()).elseIf(inlabel, test, whenThen, nextLinkRenderer(), color);
if (ok == false) { if (ok == false) {
@ -371,7 +371,7 @@ public class ActivityDiagram3 extends UmlDiagram {
return CommandExecutionResult.error("Cannot find if"); 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(); manageSwimlaneStrategy();
final InstructionRepeat instructionRepeat = new InstructionRepeat(swinlanes.getCurrentSwimlane(), current(), final InstructionRepeat instructionRepeat = new InstructionRepeat(swinlanes.getCurrentSwimlane(), current(),
nextLinkRenderer(), color, label, boxStyleIn, colors); 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(); manageSwimlaneStrategy();
final InstructionWhile instructionWhile = new InstructionWhile(swinlanes.getCurrentSwimlane(), current(), test, final InstructionWhile instructionWhile = new InstructionWhile(swinlanes.getCurrentSwimlane(), current(), test,
nextLinkRenderer(), yes, color, getSkinParam()); nextLinkRenderer(), yes, color, getSkinParam());
@ -435,7 +435,7 @@ public class ActivityDiagram3 extends UmlDiagram {
return CommandExecutionResult.ok(); 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) { USymbol type, double roundCorner) {
manageSwimlaneStrategy(); manageSwimlaneStrategy();
final InstructionGroup instructionGroup = new InstructionGroup(current(), name, backColor, titleColor, 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.Swimlane;
import net.sourceforge.plantuml.activitydiagram3.ftile.WeldingPoint; import net.sourceforge.plantuml.activitydiagram3.ftile.WeldingPoint;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.sequencediagram.NotePosition; 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.Style;
import net.sourceforge.plantuml.style.StyleBuilder; import net.sourceforge.plantuml.style.StyleBuilder;
import net.sourceforge.plantuml.style.StyleSignature; import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class Branch { public class Branch {
@ -61,7 +61,7 @@ public class Branch {
private final Display labelTest; private final Display labelTest;
private final Display labelPositive; private final Display labelPositive;
private final Display inlabel; private final Display inlabel;
private final HtmlColor color; private final HColor color;
private LinkRendering inlinkRendering = LinkRendering.none(); private LinkRendering inlinkRendering = LinkRendering.none();
private Ftile ftile; private Ftile ftile;
@ -79,7 +79,7 @@ public class Branch {
} }
public Branch(StyleBuilder styleBuilder, Swimlane swimlane, Display labelPositive, Display labelTest, public Branch(StyleBuilder styleBuilder, Swimlane swimlane, Display labelPositive, Display labelTest,
HtmlColor color, Display inlabel) { HColor color, Display inlabel) {
if (labelPositive == null) { if (labelPositive == null) {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
} }
@ -162,7 +162,7 @@ public class Branch {
return ftile.skinParam(); return ftile.skinParam();
} }
public final HtmlColor getColor() { public final HColor getColor() {
return color; 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.Swimlane;
import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileWithNotes; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileWithNotes;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NotePosition;
import net.sourceforge.plantuml.sequencediagram.NoteType; import net.sourceforge.plantuml.sequencediagram.NoteType;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class InstructionGroup implements Instruction, InstructionCollection { public class InstructionGroup implements Instruction, InstructionCollection {
private final InstructionList list; private final InstructionList list;
private final Instruction parent; private final Instruction parent;
private final HtmlColor backColor; private final HColor backColor;
private final HtmlColor borderColor; private final HColor borderColor;
private final HtmlColor titleColor; private final HColor titleColor;
private final LinkRendering linkRendering; private final LinkRendering linkRendering;
private final USymbol type; private final USymbol type;
@ -67,8 +67,8 @@ public class InstructionGroup implements Instruction, InstructionCollection {
return list.containsBreak(); return list.containsBreak();
} }
public InstructionGroup(Instruction parent, Display test, HtmlColor backColor, HtmlColor titleColor, public InstructionGroup(Instruction parent, Display test, HColor backColor, HColor titleColor,
Swimlane swimlane, HtmlColor borderColor, LinkRendering linkRendering, USymbol type, double roundCorner) { Swimlane swimlane, HColor borderColor, LinkRendering linkRendering, USymbol type, double roundCorner) {
this.list = new InstructionList(swimlane); this.list = new InstructionList(swimlane);
this.type = type; this.type = type;
this.linkRendering = linkRendering; 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.WeldingPoint;
import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileWithNoteOpale; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileWithNoteOpale;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NotePosition;
import net.sourceforge.plantuml.sequencediagram.NoteType; import net.sourceforge.plantuml.sequencediagram.NoteType;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class InstructionIf extends WithNote implements Instruction, InstructionCollection { 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, 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.url = url;
this.parent = parent; this.parent = parent;
this.skinParam = skinParam; 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, public boolean elseIf(Display inlabel, Display test, Display whenThen, LinkRendering nextLinkRenderer,
HtmlColor color) { HColor color) {
if (elseBranch != null) { if (elseBranch != null) {
return false; 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.FtileKilled;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NotePosition;
import net.sourceforge.plantuml.sequencediagram.NoteType; import net.sourceforge.plantuml.sequencediagram.NoteType;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class InstructionRepeat implements Instruction { public class InstructionRepeat implements Instruction {
@ -73,7 +73,7 @@ public class InstructionRepeat implements Instruction {
return repeatList.containsBreak(); 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) { Display startLabel, BoxStyle boxStyleIn, Colors colors) {
this.boxStyleIn = boxStyleIn; this.boxStyleIn = boxStyleIn;
this.startLabel = startLabel; 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.FtileFactory;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileKilled; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileKilled;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; 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 { public class InstructionSpot extends MonoSwimable implements Instruction {
private boolean killed = false; private boolean killed = false;
private final LinkRendering inlinkRendering; private final LinkRendering inlinkRendering;
private final String spot; private final String spot;
private final HtmlColor color; private final HColor color;
public boolean containsBreak() { public boolean containsBreak() {
return false; return false;
} }
public InstructionSpot(String spot, HtmlColor color, LinkRendering inlinkRendering, Swimlane swimlane) { public InstructionSpot(String spot, HColor color, LinkRendering inlinkRendering, Swimlane swimlane) {
super(swimlane); super(swimlane);
this.spot = spot; this.spot = spot;
this.inlinkRendering = inlinkRendering; 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.FtileFactory;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.cucadiagram.Display; 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 { 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, public InstructionSwitch(Swimlane swimlane, Instruction parent, Display labelTest, LinkRendering inlinkRendering,
HtmlColor color, ISkinParam skinParam) { HColor color, ISkinParam skinParam) {
this.topInlinkRendering = inlinkRendering; this.topInlinkRendering = inlinkRendering;
this.parent = parent; this.parent = parent;
this.skinParam = skinParam; 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.Swimlane;
import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileWithNoteOpale; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileWithNoteOpale;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NotePosition;
import net.sourceforge.plantuml.sequencediagram.NoteType; import net.sourceforge.plantuml.sequencediagram.NoteType;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class InstructionWhile extends WithNote implements Instruction, InstructionCollection { public class InstructionWhile extends WithNote implements Instruction, InstructionCollection {
private final InstructionList repeatList = new InstructionList(); private final InstructionList repeatList = new InstructionList();
private final Instruction parent; private final Instruction parent;
private final LinkRendering nextLinkRenderer; private final LinkRendering nextLinkRenderer;
private final HtmlColor color; private final HColor color;
private boolean killed = false; private boolean killed = false;
private final Display test; 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, 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) { if (test == null) {
throw new IllegalArgumentException(); 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.RegexConcat;
import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandCircleSpot3 extends SingleLineCommand2<ActivityDiagram3> { public class CommandCircleSpot3 extends SingleLineCommand2<ActivityDiagram3> {
@ -62,7 +62,7 @@ public class CommandCircleSpot3 extends SingleLineCommand2<ActivityDiagram3> {
@Override @Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) { 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); diagram.addSpot(arg.get("SPOT", 0), color);
return CommandExecutionResult.ok(); 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.RegexOptional;
import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandElseIf2 extends SingleLineCommand2<ActivityDiagram3> { public class CommandElseIf2 extends SingleLineCommand2<ActivityDiagram3> {
@ -80,7 +80,7 @@ public class CommandElseIf2 extends SingleLineCommand2<ActivityDiagram3> {
@Override @Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) { 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); String test = arg.get("TEST", 0);
if (test.length() == 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.RegexOptional;
import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandIf2 extends SingleLineCommand2<ActivityDiagram3> { public class CommandIf2 extends SingleLineCommand2<ActivityDiagram3> {
@ -79,7 +79,7 @@ public class CommandIf2 extends SingleLineCommand2<ActivityDiagram3> {
@Override @Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) { 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); String test = arg.get("TEST", 0);
if (test.length() == 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.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandIf4 extends SingleLineCommand2<ActivityDiagram3> { public class CommandIf4 extends SingleLineCommand2<ActivityDiagram3> {
@ -76,7 +76,7 @@ public class CommandIf4 extends SingleLineCommand2<ActivityDiagram3> {
@Override @Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) { 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); String test = arg.get("TEST", 0);
if (test.length() == 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.RegexConcat;
import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandLink3 extends SingleLineCommand2<ActivityDiagram3> { public class CommandLink3 extends SingleLineCommand2<ActivityDiagram3> {
@ -63,7 +63,7 @@ public class CommandLink3 extends SingleLineCommand2<ActivityDiagram3> {
@Override @Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) { 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) { if (color != null) {
diagram.setColorNextArrow(Rainbow.fromColor(color)); 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.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.Stereotype; 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.USymbol;
import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.graphic.color.ColorType; 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.SName;
import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.StyleSignature; 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> { public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
@ -129,20 +129,20 @@ public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
final String stereo = arg.get("STEREO", 0); final String stereo = arg.get("STEREO", 0);
final Stereotype stereotype = stereo == null ? null : new Stereotype(stereo); 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); stereotype, false);
HtmlColor backColor; HColor backColor;
if (backColorInSkinparam == null) { if (backColorInSkinparam == null) {
backColor = colors.getColor(ColorType.BACK); backColor = colors.getColor(ColorType.BACK);
} else { } else {
backColor = backColorInSkinparam; backColor = backColorInSkinparam;
} }
HtmlColor titleColor = colors.getColor(ColorType.HEADER); HColor titleColor = colors.getColor(ColorType.HEADER);
// Warning : titleColor unused in FTileGroupW // 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) { if (borderColor == null) {
borderColor = HtmlColorUtils.BLACK; borderColor = HColorUtils.BLACK;
} }
double roundCorner = symbol.getSkinParameter().getRoundCorner(diagram.getSkinParam(), stereotype); double roundCorner = symbol.getSkinParameter().getRoundCorner(diagram.getSkinParam(), stereotype);
@ -155,7 +155,7 @@ public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
backColor = stylePartition.value(PName.BackGroundColor).asColor( backColor = stylePartition.value(PName.BackGroundColor).asColor(
diagram.getSkinParam().getIHtmlColorSet()); 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(); 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.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.Stereotype; 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.ColorParser;
import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandRepeat3 extends SingleLineCommand2<ActivityDiagram3> { public class CommandRepeat3 extends SingleLineCommand2<ActivityDiagram3> {
@ -77,7 +77,7 @@ public class CommandRepeat3 extends SingleLineCommand2<ActivityDiagram3> {
@Override @Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) { 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 Display label = Display.getWithNewlines(arg.get("LABEL", 0));
final BoxStyle boxStyle; final BoxStyle boxStyle;
final String styleString = arg.get("STYLE", 0); 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.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandSwimlane extends SingleLineCommand2<ActivityDiagram3> { public class CommandSwimlane extends SingleLineCommand2<ActivityDiagram3> {
@ -65,7 +65,7 @@ public class CommandSwimlane extends SingleLineCommand2<ActivityDiagram3> {
@Override @Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) { 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 String name = arg.get("SWIMLANE", 0);
final Display label = Display.getWithNewlines(arg.get("LABEL", 0)); final Display label = Display.getWithNewlines(arg.get("LABEL", 0));
return diagram.swimlane(name, color, label); 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.RegexOptional;
import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandSwimlane2 extends SingleLineCommand2<ActivityDiagram3> { public class CommandSwimlane2 extends SingleLineCommand2<ActivityDiagram3> {
@ -73,7 +73,7 @@ public class CommandSwimlane2 extends SingleLineCommand2<ActivityDiagram3> {
@Override @Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) { 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 String name = arg.get("SWIMLANE", 0);
final Display label = Display.getWithNewlines(arg.get("LABEL", 0)); final Display label = Display.getWithNewlines(arg.get("LABEL", 0));
return diagram.swimlane(name, color, label); 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.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandSwitch extends SingleLineCommand2<ActivityDiagram3> { public class CommandSwitch extends SingleLineCommand2<ActivityDiagram3> {
@ -67,7 +67,7 @@ public class CommandSwitch extends SingleLineCommand2<ActivityDiagram3> {
@Override @Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) { 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); String test = arg.get("TEST", 0);
if (test.length() == 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.RegexOptional;
import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class CommandWhile3 extends SingleLineCommand2<ActivityDiagram3> { public class CommandWhile3 extends SingleLineCommand2<ActivityDiagram3> {
@ -73,7 +73,7 @@ public class CommandWhile3 extends SingleLineCommand2<ActivityDiagram3> {
@Override @Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, LineLocation location, RegexResult arg) { 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); diagram.doWhile(Display.getWithNewlines(arg.get("TEST", 0)), Display.getWithNewlines(arg.get("YES", 0)), color);
return CommandExecutionResult.ok(); return CommandExecutionResult.ok();

View File

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

View File

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

View File

@ -40,10 +40,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import net.sourceforge.plantuml.Url; 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.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.ColorMapper;
import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.MinMax;
import net.sourceforge.plantuml.ugraphic.UChange; import net.sourceforge.plantuml.ugraphic.UChange;
import net.sourceforge.plantuml.ugraphic.UChangeBackColor; 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.UShape;
import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate; 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 { public class CollisionDetector implements UGraphic {
@ -88,7 +88,7 @@ public class CollisionDetector implements UGraphic {
minmax.drawGrey(ug); minmax.drawGrey(ug);
} }
} }
final HtmlColor color = HtmlColorUtils.BLACK; final HColor color = HColorUtils.BLACK;
ug = ug.apply(new UChangeColor(color)).apply(new UStroke(5)); ug = ug.apply(new UChangeColor(color)).apply(new UStroke(5));
for (Snake snake : snakes) { for (Snake snake : snakes) {
for (Line2D line : snake.getHorizontalLines()) { 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.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.TextBlockUtils;
import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class EntityImageLegend { public class EntityImageLegend {
@ -55,8 +55,8 @@ public class EntityImageLegend {
final TextBlock textBlock = note.create(new FontConfiguration(skinParam, FontParam.LEGEND, null), final TextBlock textBlock = note.create(new FontConfiguration(skinParam, FontParam.LEGEND, null),
HorizontalAlignment.LEFT, skinParam); HorizontalAlignment.LEFT, skinParam);
final Rose rose = new Rose(); final Rose rose = new Rose();
final HtmlColor legendBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.legendBackground); final HColor legendBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.legendBackground);
final HtmlColor legendColor = rose.getHtmlColor(skinParam, ColorParam.legendBorder); final HColor legendColor = rose.getHtmlColor(skinParam, ColorParam.legendBorder);
final UStroke stroke = skinParam.getThickness(LineParam.legendBorder, null); final UStroke stroke = skinParam.getThickness(LineParam.legendBorder, null);
final int cornersize = 10; final int cornersize = 10;

View File

@ -133,7 +133,7 @@ public class FtileAssemblySimple extends AbstractTextBlock implements Ftile {
private UTranslate getTranslated1(StringBounder stringBounder) { private UTranslate getTranslated1(StringBounder stringBounder) {
final double left = calculateDimension(stringBounder).getLeft(); 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) { 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.LinkRendering;
import net.sourceforge.plantuml.activitydiagram3.PositionedNote; import net.sourceforge.plantuml.activitydiagram3.PositionedNote;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public interface FtileFactory { public interface FtileFactory {
@ -63,7 +63,7 @@ public interface FtileFactory {
public Ftile end(Swimlane swimlane); 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); public Ftile activity(Display label, Swimlane swimlane, BoxStyle style, Colors colors);
@ -82,7 +82,7 @@ public interface FtileFactory {
Ftile backward, boolean noOut); Ftile backward, boolean noOut);
public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out, 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, public Ftile createIf(Swimlane swimlane, List<Branch> thens, Branch elseBranch, LinkRendering afterEndwhile,
LinkRendering topInlinkRendering, Url url); 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 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, public Ftile createGroup(Ftile list, Display name, HColor backColor, HColor titleColor, PositionedNote note,
HtmlColor borderColor, USymbol type, double roundCorner); 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.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; 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.SName;
import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.StyleSignature; import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileFactoryDelegator implements FtileFactory { public class FtileFactoryDelegator implements FtileFactory {
@ -145,7 +145,7 @@ public class FtileFactoryDelegator implements FtileFactory {
return factory.stop(swimlane); 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); 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, 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); 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); return factory.createParallel(all, style, label, in, out);
} }
public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note, public Ftile createGroup(Ftile list, Display name, HColor backColor, HColor titleColor, PositionedNote note,
HtmlColor borderColor, USymbol type, double roundCorner) { HColor borderColor, USymbol type, double roundCorner) {
return factory.createGroup(list, name, backColor, titleColor, note, borderColor, type, 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) { if (dim.getHeight() > fixedHeight) {
throw new IllegalStateException(); throw new IllegalStateException();
} }
return new UTranslate(0, (fixedHeight - dim.getHeight()) / 2); return UTranslate.dy((fixedHeight - dim.getHeight()) / 2);
} }
public void drawU(UGraphic ug) { public void drawU(UGraphic ug) {

View File

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

View File

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

View File

@ -87,7 +87,7 @@ public class FtileMinWidth extends FtileDecorate {
private UTranslate getUTranslateInternal(final StringBounder stringBounder) { private UTranslate getUTranslateInternal(final StringBounder stringBounder) {
final Dimension2D dimTile = getFtileDelegated().calculateDimension(stringBounder); final Dimension2D dimTile = getFtileDelegated().calculateDimension(stringBounder);
final Dimension2D dimTotal = getDimensionInternal(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; return change;
} }

View File

@ -68,8 +68,8 @@ public class Snake implements UShape {
private Direction emphasizeDirection; private Direction emphasizeDirection;
private final HorizontalAlignment horizontalAlignment; private final HorizontalAlignment horizontalAlignment;
public final void setIgnoreForCompression(boolean ignoreForCompression) { public final void setIgnoreForCompression() {
this.worm.setIgnoreForCompression(ignoreForCompression); this.worm.setIgnoreForCompression();
} }
public Snake transformX(CompressionTransform compressionTransform) { 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.ISkinParam;
import net.sourceforge.plantuml.SpecificBackcolorable; import net.sourceforge.plantuml.SpecificBackcolorable;
import net.sourceforge.plantuml.cucadiagram.Display; 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.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.MinMax;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class Swimlane implements SpecificBackcolorable { public class Swimlane implements SpecificBackcolorable {
@ -88,7 +88,7 @@ public class Swimlane implements SpecificBackcolorable {
return colors; return colors;
} }
public void setSpecificColorTOBEREMOVED(ColorType type, HtmlColor color) { public void setSpecificColorTOBEREMOVED(ColorType type, HColor color) {
if (color != null) { if (color != null) {
this.colors = colors.add(type, color); 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.activitydiagram3.ftile.vcompact.VCompactFactory;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils; 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.URectangle;
import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UShape;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.comp.SlotSet; import net.sourceforge.plantuml.ugraphic.comp.SlotSet;
import net.sourceforge.plantuml.utils.MathUtils; import net.sourceforge.plantuml.utils.MathUtils;
@ -126,7 +126,7 @@ public class SwimlanesA extends AbstractTextBlock implements TextBlock, Styleabl
return factory; return factory;
} }
public void swimlane(String name, HtmlColor color, Display label) { public void swimlane(String name, HColor color, Display label) {
currentSwimlane = getOrCreate(name); currentSwimlane = getOrCreate(name);
if (color != null) { if (color != null) {
currentSwimlane.setSpecificColorTOBEREMOVED(ColorType.BACK, color); currentSwimlane.setSpecificColorTOBEREMOVED(ColorType.BACK, color);
@ -203,7 +203,7 @@ public class SwimlanesA extends AbstractTextBlock implements TextBlock, Styleabl
drawWhenSwimlanes(ug, full); 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)), slot.drawDebugX(ug.apply(new UChangeColor(col)).apply(new UChangeBackColor(col)),
full.calculateDimension(ug.getStringBounder()).getHeight()); full.calculateDimension(ug.getStringBounder()).getHeight());
@ -218,13 +218,12 @@ public class SwimlanesA extends AbstractTextBlock implements TextBlock, Styleabl
double x2 = 0; double x2 = 0;
for (Swimlane swimlane : swimlanes) { 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) { if (back != null) {
final UGraphic background = ug.apply(new UChangeBackColor(back)).apply(new UChangeColor(back)) 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() final URectangle rectangle = new URectangle(swimlane.getActualWidth(), dimensionFull.getHeight()
+ titleHeightTranslate.getDy()); + titleHeightTranslate.getDy()).ignoreForCompression();
rectangle.setIgnoreForCompression(true);
background.draw(rectangle); background.draw(rectangle);
} }
@ -270,8 +269,8 @@ public class SwimlanesA extends AbstractTextBlock implements TextBlock, Styleabl
for (Swimlane swimlane : swimlanes) { for (Swimlane swimlane : swimlanes) {
final double swimlaneActualWidth = swimlaneActualWidth(ug.getStringBounder(), swimlaneWidth, swimlane); final double swimlaneActualWidth = swimlaneActualWidth(ug.getStringBounder(), swimlaneWidth, swimlane);
final UTranslate translate = new UTranslate(x1 - swimlane.getMinMax().getMinX() + separationMargin final UTranslate translate = UTranslate.dx(x1 - swimlane.getMinMax().getMinX() + separationMargin
+ (swimlaneActualWidth - rawDrawingWidth(swimlane)) / 2.0, 0); + (swimlaneActualWidth - rawDrawingWidth(swimlane)) / 2.0);
swimlane.setTranslateAndWidth(translate, swimlaneActualWidth); swimlane.setTranslateAndWidth(translate, swimlaneActualWidth);
x1 += swimlaneActualWidth; x1 += swimlaneActualWidth;

View File

@ -43,7 +43,6 @@ import net.sourceforge.plantuml.Pragma;
import net.sourceforge.plantuml.SkinParam; import net.sourceforge.plantuml.SkinParam;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.style.PName; 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.UGraphic;
import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.URectangle;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.utils.MathUtils; import net.sourceforge.plantuml.utils.MathUtils;
public class SwimlanesB extends SwimlanesA { public class SwimlanesB extends SwimlanesA {
@ -67,21 +67,20 @@ public class SwimlanesB extends SwimlanesA {
final StringBounder stringBounder = ug.getStringBounder(); 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()) { if (SkinParam.USE_STYLES()) {
color = getStyle().value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet()); color = getStyle().value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet());
} }
if (color != null) { if (color != null) {
final double titleHeight = getTitlesHeight(stringBounder); final double titleHeight = getTitlesHeight(stringBounder);
final URectangle back = new URectangle(getTitlesWidth(stringBounder), titleHeight); final URectangle back = new URectangle(getTitlesWidth(stringBounder), titleHeight).ignoreForCompression();
back.setIgnoreForCompression(true);
ug.apply(new UChangeBackColor(color)).apply(new UChangeColor(color)).draw(back); ug.apply(new UChangeBackColor(color)).apply(new UChangeColor(color)).draw(back);
} }
for (Swimlane swimlane : swimlanes) { for (Swimlane swimlane : swimlanes) {
final TextBlock swTitle = getTitle(swimlane); final TextBlock swTitle = getTitle(swimlane);
final double titleWidth = swTitle.calculateDimension(stringBounder).getWidth(); final double titleWidth = swTitle.calculateDimension(stringBounder).getWidth();
final double posTitle = x2 + (swimlane.getActualWidth() - titleWidth) / 2; 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(); x2 += swimlane.getActualWidth();
} }
} }
@ -132,7 +131,7 @@ public class SwimlanesB extends SwimlanesA {
@Override @Override
protected UTranslate getTitleHeightTranslate(final StringBounder stringBounder) { protected UTranslate getTitleHeightTranslate(final StringBounder stringBounder) {
double titlesHeight = getTitlesHeight(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) { 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.LineParam;
import net.sourceforge.plantuml.Pragma; import net.sourceforge.plantuml.Pragma;
import net.sourceforge.plantuml.SkinParam; import net.sourceforge.plantuml.SkinParam;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.skin.rose.Rose; 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.ULine;
import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class SwimlanesC extends SwimlanesB { public class SwimlanesC extends SwimlanesB {
@ -70,17 +70,17 @@ public class SwimlanesC extends SwimlanesB {
final UTranslate titleHeightTranslate = getTitleHeightTranslate(stringBounder); final UTranslate titleHeightTranslate = getTitleHeightTranslate(stringBounder);
for (Swimlane swimlane : swimlanes) { 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(); 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) { 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) { if (color == null) {
color = ColorParam.swimlaneBorder.getDefaultValue(); color = ColorParam.swimlaneBorder.getDefaultValue();
} }
@ -89,7 +89,7 @@ public class SwimlanesC extends SwimlanesB {
color = getStyle().value(PName.LineColor).asColor(skinParam.getIHtmlColorSet()); color = getStyle().value(PName.LineColor).asColor(skinParam.getIHtmlColorSet());
thickness = getStyle().getStroke(); 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.awt.geom.Point2D;
import java.util.Map; import java.util.Map;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.graphic.UDrawable;
import net.sourceforge.plantuml.graphic.UGraphicDelegator; import net.sourceforge.plantuml.graphic.UGraphicDelegator;
import net.sourceforge.plantuml.svek.UGraphicForSnake; 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.ULine;
import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UShape;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public class UGraphicInterceptorUDrawable2 extends UGraphicDelegator { public class UGraphicInterceptorUDrawable2 extends UGraphicDelegator {
@ -89,8 +89,8 @@ public class UGraphicInterceptorUDrawable2 extends UGraphicDelegator {
private void drawGoto(FtileGoto ftile) { private void drawGoto(FtileGoto ftile) {
final FtileGeometry geom = ftile.calculateDimension(getStringBounder()); final FtileGeometry geom = ftile.calculateDimension(getStringBounder());
final Point2D pt = geom.getPointIn(); final Point2D pt = geom.getPointIn();
UGraphic ugGoto = getUg().apply(new UChangeColor(HtmlColorUtils.GREEN)).apply( UGraphic ugGoto = getUg().apply(new UChangeColor(HColorUtils.GREEN)).apply(
new UChangeBackColor(HtmlColorUtils.GREEN)); new UChangeBackColor(HColorUtils.GREEN));
ugGoto = ugGoto.apply(new UTranslate(pt)); ugGoto = ugGoto.apply(new UTranslate(pt));
final UTranslate posNow = getPosition(); final UTranslate posNow = getPosition();
final UTranslate dest = positions.get(ftile.getName()); final UTranslate dest = positions.get(ftile.getName());
@ -98,8 +98,8 @@ public class UGraphicInterceptorUDrawable2 extends UGraphicDelegator {
final double dy = dest.getDy() - posNow.getDy(); final double dy = dest.getDy() - posNow.getDy();
ugGoto.draw(new UEllipse(3, 3)); ugGoto.draw(new UEllipse(3, 3));
ugGoto.apply(new UTranslate(dx, dy)).draw(new UEllipse(3, 3)); ugGoto.apply(new UTranslate(dx, dy)).draw(new UEllipse(3, 3));
ugGoto.draw(new ULine(dx, 0)); ugGoto.draw(ULine.hline(dx));
ugGoto.apply(new UTranslate(dx, 0)).draw(new ULine(0, dy)); ugGoto.apply(UTranslate.dx(dx)).draw(ULine.vline(dy));
// ugGoto.draw(new ULine(dx, 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.Direction;
import net.sourceforge.plantuml.cucadiagram.LinkStyle; import net.sourceforge.plantuml.cucadiagram.LinkStyle;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorAndStyle; import net.sourceforge.plantuml.graphic.HtmlColorAndStyle;
import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.MinMax;
import net.sourceforge.plantuml.ugraphic.UChangeBackColor; 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.UPolygon;
import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.comp.CompressionMode; import net.sourceforge.plantuml.ugraphic.comp.CompressionMode;
public class Worm implements Iterable<Point2D.Double> { public class Worm implements Iterable<Point2D.Double> {
@ -67,13 +67,13 @@ public class Worm implements Iterable<Point2D.Double> {
private boolean ignoreForCompression; private boolean ignoreForCompression;
public final void setIgnoreForCompression(boolean ignoreForCompression) { public final void setIgnoreForCompression() {
this.ignoreForCompression = ignoreForCompression; this.ignoreForCompression = true;
} }
public void drawInternalOneColor(UPolygon startDecoration, UGraphic ug, HtmlColorAndStyle color, double stroke, public void drawInternalOneColor(UPolygon startDecoration, UGraphic ug, HtmlColorAndStyle color, double stroke,
Direction emphasizeDirection, UPolygon endDecoration) { Direction emphasizeDirection, UPolygon endDecoration) {
final HtmlColor color2 = color.getColor(); final HColor color2 = color.getColor();
if (color2 == null) { if (color2 == null) {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
} }

View File

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

View File

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

View File

@ -37,7 +37,6 @@ package net.sourceforge.plantuml.activitydiagram3.ftile;
import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.ColorMapper;
import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.MinMax;
import net.sourceforge.plantuml.ugraphic.UChange; import net.sourceforge.plantuml.ugraphic.UChange;
import net.sourceforge.plantuml.ugraphic.UChangeBackColor; 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.UShape;
import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.ColorMapper;
public class ZadBuilder implements UGraphic { 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.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.svek.image.Opale; import net.sourceforge.plantuml.svek.image.Opale;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FloatingNote extends AbstractTextBlock implements Stencil, TextBlock { 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 Rose rose = new Rose();
final HtmlColor noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground); final HColor noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground);
final HtmlColor borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder); final HColor borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder);
final FontConfiguration fc = new FontConfiguration(skinParam, FontParam.NOTE, null); 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.FtileFactory;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileFactoryDelegatorCreateGroup extends FtileFactoryDelegator { public class FtileFactoryDelegatorCreateGroup extends FtileFactoryDelegator {
@ -56,9 +56,9 @@ public class FtileFactoryDelegatorCreateGroup extends FtileFactoryDelegator {
} }
@Override @Override
public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note, public Ftile createGroup(Ftile list, Display name, HColor backColor, HColor titleColor, PositionedNote note,
HtmlColor borderColor, USymbol type, double roundCorner) { HColor borderColor, USymbol type, double roundCorner) {
final HtmlColor arrowColor = rose.getHtmlColor(skinParam(), ColorParam.arrow); final HColor arrowColor = rose.getHtmlColor(skinParam(), ColorParam.arrow);
Ftile result = new FtileGroup(list, name, null, arrowColor, backColor, titleColor, skinParam(), borderColor, Ftile result = new FtileGroup(list, name, null, arrowColor, backColor, titleColor, skinParam(), borderColor,
type, roundCorner); type, roundCorner);
if (note != null) { 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.Swimlane;
import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond.ConditionalBuilder; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond.ConditionalBuilder;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.svek.ConditionEndStyle; import net.sourceforge.plantuml.svek.ConditionEndStyle;
import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileFactoryDelegatorIf extends FtileFactoryDelegator { public class FtileFactoryDelegatorIf extends FtileFactoryDelegator {
@ -74,8 +74,8 @@ public class FtileFactoryDelegatorIf extends FtileFactoryDelegator {
final ConditionEndStyle conditionEndStyle = skinParam().getConditionEndStyle(); final ConditionEndStyle conditionEndStyle = skinParam().getConditionEndStyle();
final Branch branch0 = thens.get(0); final Branch branch0 = thens.get(0);
final HtmlColor borderColor; final HColor borderColor;
final HtmlColor backColor; final HColor backColor;
final Rainbow arrowColor; final Rainbow arrowColor;
final FontConfiguration fcTest; final FontConfiguration fcTest;
final FontParam testParam = conditionStyle == ConditionStyle.INSIDE ? FontParam.ACTIVITY_DIAMOND 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); 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); 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.activitydiagram3.ftile.vertical.FtileDiamond;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors; 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.svek.ConditionStyle;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileFactoryDelegatorRepeat extends FtileFactoryDelegator { public class FtileFactoryDelegatorRepeat extends FtileFactoryDelegator {
@ -80,8 +80,8 @@ public class FtileFactoryDelegatorRepeat extends FtileFactoryDelegator {
final ConditionStyle conditionStyle = skinParam().getConditionStyle(); final ConditionStyle conditionStyle = skinParam().getConditionStyle();
final HtmlColor borderColor; final HColor borderColor;
final HtmlColor diamondColor; final HColor diamondColor;
final Rainbow arrowColor; final Rainbow arrowColor;
final FontConfiguration fcDiamond; final FontConfiguration fcDiamond;
final FontConfiguration fcArrow; 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.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.TextBlockUtils;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator { public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator {
@ -113,8 +113,8 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator {
} }
private Ftile getDiamond1(Swimlane swimlane, Branch branch0, Display test) { private Ftile getDiamond1(Swimlane swimlane, Branch branch0, Display test) {
final HtmlColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder); final HColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
final HtmlColor backColor = branch0.getColor() == null ? getRose().getHtmlColor(skinParam(), final HColor backColor = branch0.getColor() == null ? getRose().getHtmlColor(skinParam(),
ColorParam.activityDiamondBackground) : branch0.getColor(); ColorParam.activityDiamondBackground) : branch0.getColor();
final FontConfiguration fcDiamond = new FontConfiguration(skinParam(), FontParam.ACTIVITY_DIAMOND, null); 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) { private Ftile getDiamond2(Swimlane swimlane, Branch branch0) {
final HtmlColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder); final HColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
final HtmlColor backColor = branch0.getColor() == null ? getRose().getHtmlColor(skinParam(), final HColor backColor = branch0.getColor() == null ? getRose().getHtmlColor(skinParam(),
ColorParam.activityDiamondBackground) : branch0.getColor(); ColorParam.activityDiamondBackground) : branch0.getColor();
return new FtileDiamondInside(branch0.skinParam(), backColor, borderColor, swimlane, TextBlockUtils.empty(0, 0)); 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); 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.activitydiagram3.ftile.WeldingPoint;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileFactoryDelegatorWhile extends FtileFactoryDelegator { public class FtileFactoryDelegatorWhile extends FtileFactoryDelegator {
@ -72,10 +72,10 @@ public class FtileFactoryDelegatorWhile extends FtileFactoryDelegator {
@Override @Override
public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out, 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 HColor borderColor;
final HtmlColor backColor; final HColor backColor;
final Rainbow arrowColor; final Rainbow arrowColor;
final FontConfiguration fontArrow; final FontConfiguration fontArrow;
final FontConfiguration fcTest; final FontConfiguration fcTest;

View File

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

View File

@ -87,7 +87,7 @@ class FtileForkInnerOverlapped extends AbstractFtile {
final double xpos = 0; final double xpos = 0;
for (Ftile ftile : forks) { 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); // final Dimension2D dim = ftile.calculateDimension(stringBounder);
// xpos += dim.getWidth(); // xpos += dim.getWidth();
} }
@ -113,7 +113,7 @@ class FtileForkInnerOverlapped extends AbstractFtile {
final double xpos = 0; final double xpos = 0;
for (Ftile ftile : forks) { for (Ftile ftile : forks) {
if (ftile == searched) { if (ftile == searched) {
return new UTranslate(xpos, 0); return UTranslate.dx(xpos);
} }
// final Dimension2D dim = ftile.calculateDimension(stringBounder); // final Dimension2D dim = ftile.calculateDimension(stringBounder);
// xpos += dim.getWidth(); // 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.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; 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.StringBounder;
import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.SymbolContext;
import net.sourceforge.plantuml.graphic.TextBlock; 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.UGraphic;
import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate; 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; import net.sourceforge.plantuml.utils.MathUtils;
public class FtileGroup extends AbstractFtile { public class FtileGroup extends AbstractFtile {
@ -80,8 +80,8 @@ public class FtileGroup extends AbstractFtile {
private final Ftile inner; private final Ftile inner;
private final TextBlock name; private final TextBlock name;
private final TextBlock headerNote; private final TextBlock headerNote;
private final HtmlColor borderColor; private final HColor borderColor;
private final HtmlColor backColor; private final HColor backColor;
private final double shadowing; private final double shadowing;
private final UStroke stroke; private final UStroke stroke;
private final USymbol type; private final USymbol type;
@ -91,14 +91,14 @@ public class FtileGroup extends AbstractFtile {
return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.partition); return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.partition);
} }
public FtileGroup(Ftile inner, Display title, Display displayNote, HtmlColor arrowColor, HtmlColor backColor, public FtileGroup(Ftile inner, Display title, Display displayNote, HColor arrowColor, HColor backColor,
HtmlColor titleColor, ISkinParam skinParam, HtmlColor borderColor, USymbol type, double roundCorner) { HColor titleColor, ISkinParam skinParam, HColor borderColor, USymbol type, double roundCorner) {
super(inner.skinParam()); super(inner.skinParam());
this.roundCorner = roundCorner; this.roundCorner = roundCorner;
this.type = type; this.type = type;
this.backColor = backColor == null ? HtmlColorUtils.WHITE : backColor; this.backColor = backColor == null ? HColorUtils.WHITE : backColor;
this.inner = FtileUtils.addHorizontalMargin(inner, 10); this.inner = FtileUtils.addHorizontalMargin(inner, 10);
this.borderColor = borderColor == null ? HtmlColorUtils.BLACK : borderColor; this.borderColor = borderColor == null ? HColorUtils.BLACK : borderColor;
final FontConfiguration fc; final FontConfiguration fc;
if (SkinParam.USE_STYLES()) { if (SkinParam.USE_STYLES()) {
@ -107,7 +107,7 @@ public class FtileGroup extends AbstractFtile {
this.shadowing = style.value(PName.Shadowing).asDouble(); this.shadowing = style.value(PName.Shadowing).asDouble();
} else { } else {
final UFont font = skinParam.getFont(null, false, FontParam.PARTITION); 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(), fc = new FontConfiguration(font, fontColor, skinParam.getHyperlinkColor(),
skinParam.useUnderlineForHyperlink(), skinParam.getTabSize()); skinParam.useUnderlineForHyperlink(), skinParam.getTabSize());
this.shadowing = skinParam().shadowing(null) ? 3 : 0; 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.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
class FtileIfAndStop extends AbstractFtile { class FtileIfAndStop extends AbstractFtile {
@ -111,7 +111,7 @@ class FtileIfAndStop extends AbstractFtile {
return getSwimlaneIn(); 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, FtileFactory ftileFactory, ConditionStyle conditionStyle, Branch nonStop, ISkinParam skinParam,
StringBounder stringBounder, Display labelTest) { 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.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
class FtileIfLongHorizontal extends AbstractFtile { class FtileIfLongHorizontal extends AbstractFtile {
@ -141,7 +141,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
return getSwimlaneIn(); 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, FtileFactory ftileFactory, ConditionStyle conditionStyle, List<Branch> thens, Branch branch2,
FontConfiguration fcArrow, LinkRendering topInlinkRendering, LinkRendering afterEndwhile, FontConfiguration fcArrow, LinkRendering topInlinkRendering, LinkRendering afterEndwhile,
FontConfiguration fcTest) { FontConfiguration fcTest) {
@ -164,7 +164,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
final TextBlock tbTest = branch.getLabelTest().create(fcTest, final TextBlock tbTest = branch.getLabelTest().create(fcTest,
ftileFactory.skinParam().getDefaultTextAlignment(HorizontalAlignment.LEFT), ftileFactory.skinParam().getDefaultTextAlignment(HorizontalAlignment.LEFT),
ftileFactory.skinParam()); 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, FtileDiamondInside2 diamond = new FtileDiamondInside2(branch.skinParam(), diamondColor, borderColor,
swimlane, tbTest); 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.activitydiagram3.ftile.vertical.FtileDiamondInside3;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
class FtileIfLongVertical extends AbstractFtile { class FtileIfLongVertical extends AbstractFtile {
@ -127,7 +127,7 @@ class FtileIfLongVertical extends AbstractFtile {
return getSwimlaneIn(); 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, FtileFactory ftileFactory, ConditionStyle conditionStyle, List<Branch> thens, Branch branch2,
FontConfiguration fc, LinkRendering topInlinkRendering, LinkRendering afterEndwhile) { FontConfiguration fc, LinkRendering topInlinkRendering, LinkRendering afterEndwhile) {
final List<Ftile> tiles = new ArrayList<Ftile>(); 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.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.skin.rose.Rose; 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.svek.image.Opale;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileNoteAlone extends AbstractFtile implements Stencil, Styleable { public class FtileNoteAlone extends AbstractFtile implements Stencil, Styleable {
@ -107,8 +107,8 @@ public class FtileNoteAlone extends AbstractFtile implements Stencil, Styleable
this.withOutPoint = withOutPoint; this.withOutPoint = withOutPoint;
final Rose rose = new Rose(); final Rose rose = new Rose();
final HtmlColor noteBackgroundColor; final HColor noteBackgroundColor;
final HtmlColor borderColor; final HColor borderColor;
final double shadowing; final double shadowing;
if (SkinParam.USE_STYLES()) { if (SkinParam.USE_STYLES()) {
final Style style = getDefaultStyleDefinition().getMergedStyle(skinParam.getCurrentStyleBuilder()); 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.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; 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.UGraphic;
import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UPolygon;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
class FtileRepeat extends AbstractFtile { class FtileRepeat extends AbstractFtile {
@ -111,8 +111,8 @@ class FtileRepeat extends AbstractFtile {
} }
public static Ftile create(LinkRendering backRepeatLinkRendering, Swimlane swimlane, Swimlane swimlaneOut, public static Ftile create(LinkRendering backRepeatLinkRendering, Swimlane swimlane, Swimlane swimlaneOut,
Ftile entry, Ftile repeat, Display test, Display yes, Display out, HtmlColor borderColor, Ftile entry, Ftile repeat, Display test, Display yes, Display out, HColor borderColor,
HtmlColor diamondColor, Rainbow arrowColor, Rainbow endRepeatLinkColor, ConditionStyle conditionStyle, HColor diamondColor, Rainbow arrowColor, Rainbow endRepeatLinkColor, ConditionStyle conditionStyle,
ISkinSimple spriteContainer, FontConfiguration fcDiamond, FontConfiguration fcArrow, Ftile backward, ISkinSimple spriteContainer, FontConfiguration fcDiamond, FontConfiguration fcArrow, Ftile backward,
boolean noOut) { boolean noOut) {
@ -579,7 +579,7 @@ class FtileRepeat extends AbstractFtile {
private UTranslate getTranslateDiamond1(StringBounder stringBounder) { private UTranslate getTranslateDiamond1(StringBounder stringBounder) {
final Dimension2D dimDiamond1 = diamond1.calculateDimension(stringBounder); final Dimension2D dimDiamond1 = diamond1.calculateDimension(stringBounder);
final double left = getLeft(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) { private UTranslate getTranslateBackward(StringBounder stringBounder) {

View File

@ -111,7 +111,7 @@ class FtileSplit1 extends AbstractFtile {
public UTranslate getTranslateFor(Ftile searched, StringBounder stringBounder) { public UTranslate getTranslateFor(Ftile searched, StringBounder stringBounder) {
final Dimension2D dim = searched.calculateDimension(stringBounder); final Dimension2D dim = searched.calculateDimension(stringBounder);
final double xpos = calculateDimension(stringBounder).getWidth() - dim.getWidth(); 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.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
class FtileSwitch extends AbstractFtile { class FtileSwitch extends AbstractFtile {
@ -95,7 +95,7 @@ class FtileSwitch extends AbstractFtile {
return getSwimlaneIn(); 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, FtileFactory ftileFactory, ConditionStyle conditionStyle, List<Branch> thens, FontConfiguration fcArrow,
LinkRendering topInlinkRendering, LinkRendering afterEndwhile, FontConfiguration fcTest) { LinkRendering topInlinkRendering, LinkRendering afterEndwhile, FontConfiguration fcTest) {
if (afterEndwhile == null) { if (afterEndwhile == null) {
@ -114,7 +114,7 @@ class FtileSwitch extends AbstractFtile {
final TextBlock tbTest = branch.getLabelTest().create(fcTest, final TextBlock tbTest = branch.getLabelTest().create(fcTest,
ftileFactory.skinParam().getDefaultTextAlignment(HorizontalAlignment.LEFT), ftileFactory.skinParam().getDefaultTextAlignment(HorizontalAlignment.LEFT),
ftileFactory.skinParam()); 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, FtileDiamondInside2 diamond = new FtileDiamondInside2(branch.skinParam(), diamondColor, borderColor,
swimlane, tbTest); 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.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; 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.UEmpty;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
class FtileWhile extends AbstractFtile { class FtileWhile extends AbstractFtile {
@ -113,8 +113,8 @@ class FtileWhile extends AbstractFtile {
this.specialOut = specialOut; this.specialOut = specialOut;
} }
public static Ftile create(Swimlane swimlane, Ftile whileBlock, Display test, HtmlColor borderColor, public static Ftile create(Swimlane swimlane, Ftile whileBlock, Display test, HColor borderColor,
HtmlColor backColor, Rainbow arrowColor, Display yes, Display out2, Rainbow endInlinkColor, HColor backColor, Rainbow arrowColor, Display yes, Display out2, Rainbow endInlinkColor,
LinkRendering afterEndwhile, FontConfiguration fontArrow, FtileFactory ftileFactory, LinkRendering afterEndwhile, FontConfiguration fontArrow, FtileFactory ftileFactory,
ConditionStyle conditionStyle, FontConfiguration fcTest, Instruction specialOut) { 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.creole.Stencil;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.sequencediagram.NotePosition; 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.UGraphic;
import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileWithNoteOpale extends AbstractFtile implements Stencil, Styleable { 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 Rose rose = new Rose();
final HtmlColor noteBackgroundColor; final HColor noteBackgroundColor;
final HtmlColor borderColor; final HColor borderColor;
final FontConfiguration fc; final FontConfiguration fc;
final double shadowing; final double shadowing;
@ -189,7 +189,7 @@ public class FtileWithNoteOpale extends AbstractFtile implements Stencil, Stylea
final double yForNote = (dimTotal.getHeight() - dimNote.getHeight()) / 2; final double yForNote = (dimTotal.getHeight() - dimNote.getHeight()) / 2;
if (notePosition == NotePosition.LEFT) { if (notePosition == NotePosition.LEFT) {
return new UTranslate(0, yForNote); return UTranslate.dy(yForNote);
} }
final double dx = dimTotal.getWidth() - dimNote.getWidth(); final double dx = dimTotal.getWidth() - dimNote.getWidth();
return new UTranslate(dx, yForNote); 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.creole.Stencil;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils; 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.UGraphic;
import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.utils.MathUtils; import net.sourceforge.plantuml.utils.MathUtils;
public class FtileWithNotes extends AbstractFtile { public class FtileWithNotes extends AbstractFtile {
@ -110,8 +110,8 @@ public class FtileWithNotes extends AbstractFtile {
if (note.getColors() != null) { if (note.getColors() != null) {
skinParam2 = note.getColors().mute(skinParam2); skinParam2 = note.getColors().mute(skinParam2);
} }
final HtmlColor noteBackgroundColor; final HColor noteBackgroundColor;
final HtmlColor borderColor; final HColor borderColor;
final FontConfiguration fc; final FontConfiguration fc;
final double shadowing; final double shadowing;

View File

@ -123,7 +123,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
final List<Connection> conns = new ArrayList<Connection>(); final List<Connection> conns = new ArrayList<Connection>();
double x = 0; double x = 0;
for (Ftile tmp : getList()) { for (Ftile tmp : getList()) {
final UTranslate translate0 = new UTranslate(0, barHeight); final UTranslate translate0 = UTranslate.dy(barHeight);
final Dimension2D dim = tmp.calculateDimension(getStringBounder()); final Dimension2D dim = tmp.calculateDimension(getStringBounder());
final Rainbow def; final Rainbow def;
if (SkinParam.USE_STYLES()) { if (SkinParam.USE_STYLES()) {
@ -154,7 +154,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
} }
public void drawU(UGraphic ug) { 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 FtileGeometry geo = getFtile2().calculateDimension(getStringBounder());
final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown());
if (Display.isNull(label) == false) { if (Display.isNull(label) == false) {
@ -166,7 +166,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
} }
public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { 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 FtileGeometry geo = getFtile2().calculateDimension(getStringBounder());
final Point2D p1 = new Point2D.Double(geo.getLeft(), 0); final Point2D p1 = new Point2D.Double(geo.getLeft(), 0);
final Point2D p2 = new Point2D.Double(geo.getLeft(), geo.getInY()); 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(mp1a.getX(), middle);
snake.addPoint(mp2b.getX(), middle); snake.addPoint(mp2b.getX(), middle);
snake.addPoint(mp2b); snake.addPoint(mp2b);
snake.setIgnoreForCompression(true); snake.setIgnoreForCompression();
ug.draw(snake); ug.draw(snake);
} }
} }
@ -206,7 +206,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
} }
public void drawU(UGraphic ug) { public void drawU(UGraphic ug) {
ug = ug.apply(new UTranslate(x, 0)); ug = ug.apply(UTranslate.dx(x));
final FtileGeometry geo = getFtile1().calculateDimension(getStringBounder()); final FtileGeometry geo = getFtile1().calculateDimension(getStringBounder());
if (geo.hasPointOut() == false) { if (geo.hasPointOut() == false) {
return; return;
@ -223,7 +223,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
} }
public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { 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()); final FtileGeometry geo = getFtile1().calculateDimension(getStringBounder());
if (geo.hasPointOut() == false) { if (geo.hasPointOut() == false) {
return; return;
@ -242,7 +242,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder {
snake.addPoint(mp1a.getX(), middle); snake.addPoint(mp1a.getX(), middle);
snake.addPoint(mp2b.getX(), middle); snake.addPoint(mp2b.getX(), middle);
snake.addPoint(mp2b); snake.addPoint(mp2b);
snake.setIgnoreForCompression(true); snake.setIgnoreForCompression();
ug.draw(snake); 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.FtileBlackBlock;
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UPolygon;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder { public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder {
@ -73,7 +73,7 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder {
protected Ftile doStep1() { protected Ftile doStep1() {
Ftile result = getMiddle(); Ftile result = getMiddle();
final List<Connection> conns = new ArrayList<Connection>(); 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()); final Ftile black = new FtileBlackBlock(skinParam(), colorBar, getList().get(0).getSwimlaneIn());
double x = 0; double x = 0;
@ -100,8 +100,8 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder {
@Override @Override
protected Ftile doStep2(Ftile result) { protected Ftile doStep2(Ftile result) {
final HtmlColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder); final HColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder);
final HtmlColor backColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground); final HColor backColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground);
final Ftile out = new FtileDiamond(skinParam(), backColor, borderColor, swimlaneOutForStep2()); final Ftile out = new FtileDiamond(skinParam(), backColor, borderColor, swimlaneOutForStep2());
result = new FtileAssemblySimple(result, out); result = new FtileAssemblySimple(result, out);
final List<Connection> conns = new ArrayList<Connection>(); final List<Connection> conns = new ArrayList<Connection>();
@ -198,7 +198,7 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder {
} }
public void drawU(UGraphic ug) { 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 FtileGeometry geo = getFtile2().calculateDimension(getStringBounder());
final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown());
if (Display.isNull(label) == false) { if (Display.isNull(label) == false) {
@ -210,7 +210,7 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder {
} }
public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { 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 FtileGeometry geo = getFtile2().calculateDimension(getStringBounder());
final Point2D p1 = new Point2D.Double(geo.getLeft(), 0); final Point2D p1 = new Point2D.Double(geo.getLeft(), 0);
final Point2D p2 = new Point2D.Double(geo.getLeft(), geo.getInY()); 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.Swimlane;
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileThinSplit; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileThinSplit;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.style.SName; 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.style.StyleSignature;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder { public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
@ -123,7 +123,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
return new FtileAssemblySimple(thin, result); return new FtileAssemblySimple(thin, result);
} }
private HtmlColor getThin1Color(final Rainbow thinColor) { private HColor getThin1Color(final Rainbow thinColor) {
for (Ftile tmp : getList()) { for (Ftile tmp : getList()) {
final Rainbow rainbow; final Rainbow rainbow;
final LinkRendering inLinkRendering = tmp.getInLinkRendering(); final LinkRendering inLinkRendering = tmp.getInLinkRendering();
@ -174,7 +174,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
double first = 0; double first = 0;
double last = 0; double last = 0;
for (Ftile tmp : getList()) { 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()); final FtileGeometry dim = tmp.calculateDimension(getStringBounder());
if (dim.hasPointOut()) { if (dim.hasPointOut()) {
if (first == 0) { if (first == 0) {
@ -220,7 +220,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
} }
public void drawU(UGraphic ug) { 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 FtileGeometry geo = getFtile2().calculateDimension(getStringBounder());
final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown());
if (Display.isNull(label) == false) { if (Display.isNull(label) == false) {
@ -232,7 +232,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
} }
public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { 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 FtileGeometry geo = getFtile2().calculateDimension(getStringBounder());
final Point2D p1 = new Point2D.Double(geo.getLeft(), 0); final Point2D p1 = new Point2D.Double(geo.getLeft(), 0);
final Point2D p2 = new Point2D.Double(geo.getLeft(), geo.getInY()); final Point2D p2 = new Point2D.Double(geo.getLeft(), geo.getInY());
@ -271,7 +271,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
} }
public void drawU(UGraphic ug) { public void drawU(UGraphic ug) {
ug = ug.apply(new UTranslate(x, 0)); ug = ug.apply(UTranslate.dx(x));
final FtileGeometry geo = getFtile1().calculateDimension(getStringBounder()); final FtileGeometry geo = getFtile1().calculateDimension(getStringBounder());
if (geo.hasPointOut() == false) { if (geo.hasPointOut() == false) {
return; return;
@ -288,7 +288,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder {
} }
public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { 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()); final FtileGeometry geo = getFtile1().calculateDimension(getStringBounder());
if (geo.hasPointOut() == false) { if (geo.hasPointOut() == false) {
return; return;

View File

@ -40,7 +40,6 @@ import java.util.Set;
import net.sourceforge.plantuml.activitydiagram3.ftile.Connection; import net.sourceforge.plantuml.activitydiagram3.ftile.Connection;
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.graphic.UGraphicDelegator; import net.sourceforge.plantuml.graphic.UGraphicDelegator;
import net.sourceforge.plantuml.ugraphic.UChange; import net.sourceforge.plantuml.ugraphic.UChange;
import net.sourceforge.plantuml.ugraphic.UChangeBackColor; 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.UGraphic;
import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.ULine;
import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UShape;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public class UGraphicInterceptorOneSwimlane extends UGraphicDelegator { public class UGraphicInterceptorOneSwimlane extends UGraphicDelegator {
@ -88,8 +88,8 @@ public class UGraphicInterceptorOneSwimlane extends UGraphicDelegator {
} }
private void drawGoto() { private void drawGoto() {
final UGraphic ugGoto = getUg().apply(new UChangeColor(HtmlColorUtils.GREEN)).apply( final UGraphic ugGoto = getUg().apply(new UChangeColor(HColorUtils.GREEN)).apply(
new UChangeBackColor(HtmlColorUtils.GREEN)); new UChangeBackColor(HColorUtils.GREEN));
ugGoto.draw(new ULine(100, 100)); 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.FtileDecorateIn;
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorateOut; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorateOut;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.Colors; 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.StyleBuilder;
import net.sourceforge.plantuml.style.StyleSignature; import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class VCompactFactory implements FtileFactory { public class VCompactFactory implements FtileFactory {
@ -98,7 +98,7 @@ public class VCompactFactory implements FtileFactory {
} }
public Ftile start(Swimlane swimlane) { public Ftile start(Swimlane swimlane) {
final HtmlColor color; final HColor color;
Style style = null; Style style = null;
if (SkinParam.USE_STYLES()) { if (SkinParam.USE_STYLES()) {
style = getDefaultStyleDefinitionCircle().getMergedStyle(skinParam.getCurrentStyleBuilder()); style = getDefaultStyleDefinitionCircle().getMergedStyle(skinParam.getCurrentStyleBuilder());
@ -110,7 +110,7 @@ public class VCompactFactory implements FtileFactory {
} }
public Ftile stop(Swimlane swimlane) { public Ftile stop(Swimlane swimlane) {
final HtmlColor color; final HColor color;
Style style = null; Style style = null;
if (SkinParam.USE_STYLES()) { if (SkinParam.USE_STYLES()) {
style = getDefaultStyleDefinitionCircle().getMergedStyle(skinParam.getCurrentStyleBuilder()); style = getDefaultStyleDefinitionCircle().getMergedStyle(skinParam.getCurrentStyleBuilder());
@ -121,7 +121,7 @@ public class VCompactFactory implements FtileFactory {
return new FtileCircleStop(skinParam(), color, swimlane, style); 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, // final HtmlColor color = rose.getHtmlColor(skinParam,
// ColorParam.activityBackground); // ColorParam.activityBackground);
final UFont font = skinParam.getFont(null, false, FontParam.ACTIVITY); final UFont font = skinParam.getFont(null, false, FontParam.ACTIVITY);
@ -129,7 +129,7 @@ public class VCompactFactory implements FtileFactory {
} }
public Ftile end(Swimlane swimlane) { public Ftile end(Swimlane swimlane) {
final HtmlColor color; final HColor color;
Style style = null; Style style = null;
if (SkinParam.USE_STYLES()) { if (SkinParam.USE_STYLES()) {
style = getDefaultStyleDefinitionCircle().getMergedStyle(skinParam.getCurrentStyleBuilder()); 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, 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; return whileBlock;
} }
@ -196,8 +196,8 @@ public class VCompactFactory implements FtileFactory {
return new FtileForkInner(all); return new FtileForkInner(all);
} }
public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note, public Ftile createGroup(Ftile list, Display name, HColor backColor, HColor titleColor, PositionedNote note,
HtmlColor borderColor, USymbol type, double roundCorner) { HColor borderColor, USymbol type, double roundCorner) {
return list; return list;
} }

View File

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

View File

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

View File

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

View File

@ -155,14 +155,14 @@ public class FtileSwitchWithDiamonds extends FtileSwitchNude {
final double suppx = (w13 - w9) / (tiles.size() - 1); final double suppx = (w13 - w9) / (tiles.size() - 1);
for (int i = 0; i < tiles.size() - 1; i++) { for (int i = 0; i < tiles.size() - 1; i++) {
if (tile == tiles.get(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; dx += tiles.get(i).calculateDimension(stringBounder).getWidth() + suppx;
} }
if (tile == tiles.get(tiles.size() - 1)) { if (tile == tiles.get(tiles.size() - 1)) {
final double dx9 = tiles.get(0).calculateDimension(stringBounder).getWidth() + w13 + SUPP15 + SUPP15; 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(); throw new IllegalArgumentException();
@ -173,7 +173,7 @@ public class FtileSwitchWithDiamonds extends FtileSwitchNude {
protected UTranslate getTranslateMain(StringBounder stringBounder) { protected UTranslate getTranslateMain(StringBounder stringBounder) {
final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder);
final double dy1 = dimDiamond1.getHeight() + getYdelta1a(stringBounder); final double dy1 = dimDiamond1.getHeight() + getYdelta1a(stringBounder);
return new UTranslate(0, dy1); return UTranslate.dy(dy1);
} }
protected UTranslate getTranslateDiamond1(StringBounder stringBounder) { 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.AbstractFtile;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils; 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.UGraphic;
import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.URectangle;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileBlackBlock extends AbstractFtile { public class FtileBlackBlock extends AbstractFtile {
@ -60,10 +60,10 @@ public class FtileBlackBlock extends AbstractFtile {
private double width; private double width;
private double height; private double height;
private TextBlock label = TextBlockUtils.empty(0, 0); private TextBlock label = TextBlockUtils.empty(0, 0);
private final HtmlColor colorBar; private final HColor colorBar;
private final Swimlane swimlane; private final Swimlane swimlane;
public FtileBlackBlock(ISkinParam skinParam, HtmlColor colorBar, Swimlane swimlane) { public FtileBlackBlock(ISkinParam skinParam, HColor colorBar, Swimlane swimlane) {
super(skinParam); super(skinParam);
this.colorBar = colorBar; this.colorBar = colorBar;
this.swimlane = swimlane; this.swimlane = swimlane;
@ -91,8 +91,7 @@ public class FtileBlackBlock extends AbstractFtile {
} }
public void drawU(UGraphic ug) { public void drawU(UGraphic ug) {
final URectangle rect = new URectangle(width, height, 5, 5); final URectangle rect = new URectangle(width, height).rounded(5).ignoreForCompression();
rect.setIgnoreForCompression(true);
if (skinParam().shadowing(null)) { if (skinParam().shadowing(null)) {
rect.setDeltaShadow(3); 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.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; 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.UGraphic;
import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileBox extends AbstractFtile { public class FtileBox extends AbstractFtile {
@ -98,8 +98,8 @@ public class FtileBox extends AbstractFtile {
private final Swimlane swimlane; private final Swimlane swimlane;
private final BoxStyle boxStyle; private final BoxStyle boxStyle;
private final HtmlColor borderColor; private final HColor borderColor;
private final HtmlColor backColor; private final HColor backColor;
private final Style style; private final Style style;
static public StyleSignature getDefaultStyleDefinitionActivity() { 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.Ftile;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; 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.graphic.StringBounder;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.Style; 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.ULine;
import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate; 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 { public class FtileCircleEnd extends AbstractFtile {
private static final int SIZE = 20; private static final int SIZE = 20;
private final HtmlColor backColor; private final HColor backColor;
private final Swimlane swimlane; private final Swimlane swimlane;
private double shadowing; private double shadowing;
@ -71,7 +71,7 @@ public class FtileCircleEnd extends AbstractFtile {
return Collections.emptyList(); 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); super(skinParam);
this.backColor = backColor; this.backColor = backColor;
this.swimlane = swimlane; this.swimlane = swimlane;
@ -109,7 +109,7 @@ public class FtileCircleEnd extends AbstractFtile {
circle.setDeltaShadow(shadowing); circle.setDeltaShadow(shadowing);
ug = ug.apply(new UChangeColor(backColor)); ug = ug.apply(new UChangeColor(backColor));
final double thickness = 2.5; 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); .apply(new UTranslate(xTheoricalPosition, yTheoricalPosition)).draw(circle);
final double size2 = (SIZE - thickness) / Math.sqrt(2); 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.FtileGeometry;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.UCenteredCharacter; import net.sourceforge.plantuml.ugraphic.UCenteredCharacter;
import net.sourceforge.plantuml.ugraphic.UChangeBackColor; 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.UFont;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileCircleSpot extends AbstractFtile { public class FtileCircleSpot extends AbstractFtile {
@ -65,9 +65,9 @@ public class FtileCircleSpot extends AbstractFtile {
private final Swimlane swimlane; private final Swimlane swimlane;
private final String spot; private final String spot;
private final FontConfiguration fc; 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); super(skinParam);
this.spot = spot; this.spot = spot;
this.swimlane = swimlane; this.swimlane = swimlane;
@ -97,8 +97,8 @@ public class FtileCircleSpot extends AbstractFtile {
public void drawU(UGraphic ug) { public void drawU(UGraphic ug) {
final HtmlColor borderColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBorder); final HColor borderColor = SkinParamUtils.getColor(skinParam(), null, ColorParam.activityBorder);
final HtmlColor backColor = this.backColor == null ? SkinParamUtils.getColor(skinParam(), null, final HColor backColor = this.backColor == null ? SkinParamUtils.getColor(skinParam(), null,
ColorParam.activityBackground) : this.backColor; ColorParam.activityBackground) : this.backColor;
final UEllipse circle = new UEllipse(SIZE, SIZE); 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.Ftile;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.Style; 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.UChangeColor;
import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UEllipse;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.color.HColor;
public class FtileCircleStart extends AbstractFtile { public class FtileCircleStart extends AbstractFtile {
private static final int SIZE = 20; private static final int SIZE = 20;
private final HtmlColor backColor; private final HColor backColor;
private final Swimlane swimlane; private final Swimlane swimlane;
private double shadowing; 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); super(skinParam);
this.backColor = backColor; this.backColor = backColor;
this.swimlane = swimlane; this.swimlane = swimlane;

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