use of net.sf.latexdraw.model.api.shape.ArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testNoneDiskIn.
@ParameterizedTest
@MethodSource("cmds")
public void testNoneDiskIn(final Tuple<String, String> cmd) {
parser(cmd.a + "{-**}" + cmd.b);
final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
assertEquals(ArrowStyle.NONE, line.getArrowStyle(0));
assertEquals(ArrowStyle.DISK_IN, line.getArrowStyle(1));
}
use of net.sf.latexdraw.model.api.shape.ArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testNonec.
@ParameterizedTest
@MethodSource("cmds")
public void testNonec(final Tuple<String, String> cmd) {
parser(cmd.a + "{-c}" + cmd.b);
final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
assertEquals(ArrowStyle.NONE, line.getArrowStyle(0));
assertEquals(ArrowStyle.ROUND_END, line.getArrowStyle(1));
}
use of net.sf.latexdraw.model.api.shape.ArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testParamArrowsBarEnd.
@ParameterizedTest
@MethodSource("cmds")
public void testParamArrowsBarEnd(final Tuple<String, String> cmd) {
parser(cmd.a + "[arrows=|*-]" + cmd.b);
final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
assertEquals(ArrowStyle.BAR_END, line.getArrowStyle(0));
assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
}
use of net.sf.latexdraw.model.api.shape.ArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testParamArrowlength.
@ParameterizedTest
@MethodSource("cmds")
public void testParamArrowlength(final Tuple<String, String> cmd) {
parser(cmd.a + "[arrows=<->, arrowlength=1.5]" + cmd.b);
final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
assertEquals(1.5, line.getArrowLength(), 0.0001);
}
use of net.sf.latexdraw.model.api.shape.ArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testParamArrowtbarDimNum.
@ParameterizedTest
@MethodSource("cmds")
public void testParamArrowtbarDimNum(final Tuple<String, String> cmd) {
parser(cmd.a + "[arrows=<->, tbarsize=1.5cm 3]" + cmd.b);
final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
assertEquals(1.5 * Shape.PPC, line.getTBarSizeDim(), 0.0001);
assertEquals(3d, line.getTBarSizeNum(), 0.0001);
}
Aggregations