mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-22 21:15:09 +00:00
Add minor correction and some test test
This commit is contained in:
parent
efab37d3ce
commit
c2eadfd3e4
@ -48,6 +48,7 @@ import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.Direction;
|
||||
import net.sourceforge.plantuml.FontParam;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.UseStyle;
|
||||
import net.sourceforge.plantuml.activitydiagram3.PositionedNote;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
|
||||
@ -143,6 +144,7 @@ public class FtileWithNoteOpale extends AbstractFtile implements Stencil, Stylea
|
||||
final FontConfiguration fc;
|
||||
|
||||
final double shadowing;
|
||||
final LineBreakStrategy wrapWidth;
|
||||
if (UseStyle.useBetaStyle()) {
|
||||
final Style style = getDefaultStyleDefinition().getMergedStyle(skinParam.getCurrentStyleBuilder())
|
||||
.eventuallyOverride(note.getColors());
|
||||
@ -150,18 +152,20 @@ public class FtileWithNoteOpale extends AbstractFtile implements Stencil, Stylea
|
||||
borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet());
|
||||
fc = style.getFontConfiguration(getIHtmlColorSet());
|
||||
shadowing = style.value(PName.Shadowing).asDouble();
|
||||
wrapWidth = style.wrapWidth();
|
||||
} else {
|
||||
noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground);
|
||||
borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder);
|
||||
fc = new FontConfiguration(skinParam, FontParam.NOTE, null);
|
||||
shadowing = skinParam.shadowing(null) ? 4 : 0;
|
||||
wrapWidth = skinParam.wrapWidth();
|
||||
}
|
||||
|
||||
final HorizontalAlignment align = skinParam.getHorizontalAlignment(AlignmentParam.noteTextAlignment, null,
|
||||
false);
|
||||
final Sheet sheet = Parser.build(fc, align, skinParam, CreoleMode.FULL).createSheet(note.getDisplay());
|
||||
final TextBlock text = new SheetBlock2(new SheetBlock1(sheet, skinParam.wrapWidth(), skinParam.getPadding()),
|
||||
this, new UStroke(1));
|
||||
final TextBlock text = new SheetBlock2(new SheetBlock1(sheet, wrapWidth, skinParam.getPadding()), this,
|
||||
new UStroke(1));
|
||||
opale = new Opale(shadowing, borderColor, noteBackgroundColor, text, withLink);
|
||||
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ public class Version {
|
||||
}
|
||||
|
||||
public static int beta() {
|
||||
final int beta = 0;
|
||||
final int beta = 1;
|
||||
return beta;
|
||||
}
|
||||
|
||||
|
26
test/nonreg/A0000.java
Normal file
26
test/nonreg/A0000.java
Normal file
@ -0,0 +1,26 @@
|
||||
package nonreg;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/*
|
||||
|
||||
@startuml
|
||||
Alice -> Bob : Hello
|
||||
@enduml
|
||||
|
||||
|
||||
*/
|
||||
class A0000 {
|
||||
|
||||
@Test
|
||||
void testSimple() throws IOException {
|
||||
final File source = new File("test/nonreg", getClass().getSimpleName() + ".java");
|
||||
assertTrue(source.exists());
|
||||
assertTrue(source.canRead());
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user