use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testCircleInNone.
@Theory
public void testCircleInNone(final Tuple<String, String> cmd) {
parser(cmd.a + "{oo-}" + cmd.b);
final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
assertEquals(ArrowStyle.CIRCLE_IN, line.getArrowStyle(0));
assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
}
use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testArrowheadRightArrowheadLeft.
@Theory
public void testArrowheadRightArrowheadLeft(final Tuple<String, String> cmd) {
parser(cmd.a + "{>-<}" + cmd.b);
final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
assertEquals(ArrowStyle.RIGHT_ARROW, line.getArrowStyle(0));
assertEquals(ArrowStyle.LEFT_ARROW, line.getArrowStyle(1));
}
use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testDiskEndNone.
@Theory
public void testDiskEndNone(final Tuple<String, String> cmd) {
parser(cmd.a + "{*-}" + cmd.b);
final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
assertEquals(ArrowStyle.DISK_END, line.getArrowStyle(0));
assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
}
use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testParamArrowsizeDimNum.
@Theory
public void testParamArrowsizeDimNum(final Tuple<String, String> cmd) {
parser(cmd.a + "[arrows=<->, arrowsize=1.5cm 3]" + cmd.b);
final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
assertEquals(1.5 * IShape.PPC, line.getArrowSizeDim(), 0.0001);
assertEquals(3d, line.getArrowSizeNum(), 0.0001);
}
use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testSquareLeftBracketNone.
@Theory
public void testSquareLeftBracketNone(final Tuple<String, String> cmd) {
parser(cmd.a + "{]-}" + cmd.b);
final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
assertEquals(ArrowStyle.RIGHT_SQUARE_BRACKET, line.getArrowStyle(0));
assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
}
Aggregations