use of net.sf.latexdraw.model.api.shape.ArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testNoneLeftSquareBracket.
@ParameterizedTest
@MethodSource("cmds")
public void testNoneLeftSquareBracket(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.RIGHT_SQUARE_BRACKET, line.getArrowStyle(1));
}
use of net.sf.latexdraw.model.api.shape.ArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testTbarNone.
@ParameterizedTest
@MethodSource("cmds")
public void testTbarNone(final Tuple<String, String> cmd) {
parser(cmd.a + "{|-}" + cmd.b);
final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
assertEquals(ArrowStyle.BAR_IN, 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 testNoneCircleEnd.
@ParameterizedTest
@MethodSource("cmds")
public void testNoneCircleEnd(final Tuple<String, String> cmd) {
parser(cmd.a + "{-o}" + cmd.b);
final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
assertEquals(ArrowStyle.NONE, line.getArrowStyle(0));
assertEquals(ArrowStyle.CIRCLE_END, line.getArrowStyle(1));
}
use of net.sf.latexdraw.model.api.shape.ArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testParamArrowsizeDimNum.
@ParameterizedTest
@MethodSource("cmds")
public void testParamArrowsizeDimNum(final Tuple<String, String> cmd) {
parser(cmd.a + "[arrows=<->, arrowsize=1.5cm 3]" + cmd.b);
final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
assertEquals(1.5 * Shape.PPC, line.getArrowSizeDim(), 0.0001);
assertEquals(3d, line.getArrowSizeNum(), 0.0001);
}
use of net.sf.latexdraw.model.api.shape.ArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testCircleEndNone.
@ParameterizedTest
@MethodSource("cmds")
public void testCircleEndNone(final Tuple<String, String> cmd) {
parser(cmd.a + "{o-}" + cmd.b);
final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
assertEquals(ArrowStyle.CIRCLE_END, line.getArrowStyle(0));
assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
}
Aggregations