use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testCcNone.
@Theory
public void testCcNone(final Tuple<String, String> cmd) {
parser(cmd.a + "{cc-}" + cmd.b);
final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
assertEquals(ArrowStyle.ROUND_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 testNoneRightSquareBracket.
@Theory
public void testNoneRightSquareBracket(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_SQUARE_BRACKET, line.getArrowStyle(1));
}
use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.
the class TestParsingArrow method testParamArrowsizeDim.
@Theory
public void testParamArrowsizeDim(final Tuple<String, String> cmd) {
parser(cmd.a + "[arrows=<->, arrowsize=2cm]" + cmd.b);
final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
assertEquals(2d * IShape.PPC, line.getArrowSizeDim(), 0.0001);
assertEquals(0d, line.getArrowSizeNum(), 0.0001);
}
use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.
the class TestSVGArrowable method testArrowRBracketParamsArr1.
@Theory
public void testArrowRBracketParamsArr1(@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(0));
}
use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.
the class TestSVGArrowable method testArrowBracketParamsArr2.
@Theory
public void testArrowBracketParamsArr2(@ArrowableData(withParamVariants = true) final IArrowableSingleShape sh, final ArrowStyle arr1, final ArrowStyle arr2) {
assumeTrue(arr2.isSquareBracket());
assumeFalse(sh instanceof IAxes);
sh.setArrowStyle(arr1, 0);
sh.setArrowStyle(arr2, -1);
final IArrowableSingleShape s2 = produceOutputShapeFrom(sh);
CompareShapeMatcher.INST.assertEqualsArrowBracket(sh.getArrowAt(-1), s2.getArrowAt(-1));
}
Aggregations