use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testParamArrows.
@Theory
public void testParamArrows(final Tuple<String, String> cmd) {
parser(cmd.a + "[arrows=<->]" + cmd.b);
final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
assertEquals(ArrowStyle.LEFT_ARROW, line.getArrowStyle(0));
assertEquals(ArrowStyle.RIGHT_ARROW, line.getArrowStyle(1));
}
use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testNoneRightRoundBracket.
@Theory
public void testNoneRightRoundBracket(final Tuple<String, String> cmd) {
parser(cmd.a + "{-(}" + cmd.b);
final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
assertEquals(ArrowStyle.NONE, line.getArrowStyle(0));
assertEquals(ArrowStyle.LEFT_ROUND_BRACKET, line.getArrowStyle(1));
}
use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testParamArrowsRLBracker.
@Theory
public void testParamArrowsRLBracker(final Tuple<String, String> cmd) {
parser(cmd.a + "[arrows=(-]" + cmd.b);
final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
assertEquals(ArrowStyle.LEFT_ROUND_BRACKET, 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 TestSVGArrowable method testArrowRBracketParamsArr2.
@Theory
public void testArrowRBracketParamsArr2(@ArrowableData(withParamVariants = true) final IArrowableSingleShape sh, final ArrowStyle arr1, final ArrowStyle arr2) {
assumeTrue(arr1.isRoundBracket());
assumeFalse(sh instanceof IAxes);
sh.setArrowStyle(arr1, 0);
sh.setArrowStyle(arr2, -1);
final IArrowableSingleShape s2 = produceOutputShapeFrom(sh);
CompareShapeMatcher.INST.assertEqualsArrowRBracket(sh.getArrowAt(0), s2.getArrowAt(-1));
}
use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.
the class TestSVGArrowable method testArrowArrowParamsArr2.
@Theory
public void testArrowArrowParamsArr2(@ArrowableData(withParamVariants = true) final IArrowableSingleShape sh, final ArrowStyle arr1, final ArrowStyle arr2) {
assumeTrue(arr2.isArrow());
assumeFalse(sh instanceof IAxes);
sh.setArrowStyle(arr1, 0);
sh.setArrowStyle(arr2, -1);
final IArrowableSingleShape s2 = produceOutputShapeFrom(sh);
CompareShapeMatcher.INST.assertEqualsArrowArrow(sh.getArrowAt(-1), s2.getArrowAt(-1));
}
Aggregations