use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class PolymorphArrowableTest method testArrowBracketParamsArr2.
@ParameterizedTest
@MethodSource("arrowsParamsDiv")
default void testArrowBracketParamsArr2(final ArrowableSingleShape sh, final ArrowStyle arr) {
assumeTrue(arr.isSquareBracket());
assumeFalse(sh instanceof Axes);
sh.setArrowStyle(arr, 1);
final ArrowableSingleShape s2 = produceOutputShapeFrom(sh);
CompareShapeMatcher.INST.assertEqualsArrowBracket(sh.getArrowAt(1), s2.getArrowAt(1));
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class PolymorphArrowableTest method testArrowBarParamsArr2.
@ParameterizedTest
@MethodSource("arrowsParamsDiv")
default void testArrowBarParamsArr2(final ArrowableSingleShape sh, final ArrowStyle arr) {
assumeTrue(arr.isBar());
assumeFalse(sh instanceof Axes);
sh.setArrowStyle(ArrowStyle.ROUND_END, 0);
sh.setArrowStyle(arr, 1);
final ArrowableSingleShape s2 = produceOutputShapeFrom(sh);
CompareShapeMatcher.INST.assertEqualsArrowBar(sh.getArrowAt(1), s2.getArrowAt(1));
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class PolymorphArrowableTest method testArrowRBracketParamsArr2.
@ParameterizedTest
@MethodSource("arrowsParamsDiv")
default void testArrowRBracketParamsArr2(final ArrowableSingleShape sh, final ArrowStyle arr) {
assumeTrue(arr.isRoundBracket());
assumeFalse(sh instanceof Axes);
sh.setArrowStyle(arr, 0);
final ArrowableSingleShape s2 = produceOutputShapeFrom(sh);
CompareShapeMatcher.INST.assertEqualsArrowRBracket(sh.getArrowAt(0), s2.getArrowAt(1));
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class TestAxes method testDuplicate.
@Test
public void testDuplicate() {
shape.setIncrementX(24);
shape.setIncrementY(28);
shape.setAxesStyle(AxesStyle.FRAME);
shape.setTicksStyle(TicksStyle.BOTTOM);
shape.setDistLabelsX(12);
shape.setDistLabelsY(112);
shape.setShowOrigin(false);
shape.setTicksDisplayed(PlottingStyle.NONE);
shape.setTicksSize(34);
final Axes s2 = shape.duplicate();
assertNotNull(s2);
assertEqualsDouble(s2.getIncrementX(), shape.getIncrementX());
assertEqualsDouble(s2.getIncrementY(), shape.getIncrementY());
assertEquals(s2.getAxesStyle(), shape.getAxesStyle());
assertEqualsDouble(s2.getTicksSize(), shape.getTicksSize());
assertEquals(s2.getTicksDisplayed(), shape.getTicksDisplayed());
assertEquals(s2.getTicksStyle(), shape.getTicksStyle());
assertEqualsDouble(s2.getDistLabelsX(), shape.getDistLabelsX());
assertEqualsDouble(s2.getDistLabelsY(), shape.getDistLabelsY());
assertEquals(s2.isShowOrigin(), shape.isShowOrigin());
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class TestAxes method testConstructor3NotOKNAN0.
@Test
public void testConstructor3NotOKNAN0() {
final Axes axes = ShapeFactory.INST.createAxes(ShapeFactory.INST.createPoint(Double.NaN, 0));
assertNotNull(axes.getPtAt(0));
assertEqualsDouble(0d, axes.getPtAt(0).getX());
assertEqualsDouble(0d, axes.getPtAt(0).getY());
}
Aggregations