use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class TestParsingPsaxes method testParse3Coord2.
@Test
public void testParse3Coord2() {
parser("\\psaxes(0,0)(1,2)(3,4)");
final Axes axes = getShapeAt(0);
assertEquals(0d, axes.getOriginX(), 0.0001);
assertEquals(0d, axes.getOriginY(), 0.0001);
assertEquals(1d, axes.getGridStartX(), 0.0001);
assertEquals(2d, axes.getGridStartY(), 0.0001);
assertEquals(3d, axes.getGridEndX(), 0.0001);
assertEquals(4d, axes.getGridEndY(), 0.0001);
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class TestParsingPsaxes method testLabelsStyle.
@ParameterizedTest
@EnumSource(value = PlottingStyle.class)
public void testLabelsStyle(final PlottingStyle style) {
parser("\\psaxes[labels=" + style.getPSTToken() + "](0,0)(0,0)(2,2)");
final Axes axes = getShapeAt(0);
assertEquals(style, axes.getLabelsDisplayed());
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class TestParsingPsaxes method testParse3Coord.
@Test
public void testParse3Coord() {
parser("\\psaxes(0,0)(0,0)(3,4)");
final Axes axes = getShapeAt(0);
assertEquals(0d, axes.getOriginX(), 0.0001);
assertEquals(0d, axes.getOriginY(), 0.0001);
assertEquals(0d, axes.getGridStartX(), 0.0001);
assertEquals(0d, axes.getGridStartY(), 0.0001);
assertEquals(3d, axes.getGridEndX(), 0.0001);
assertEquals(4d, axes.getGridEndY(), 0.0001);
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class PolymorphArrowableTest method testArrowCircleDiskParamsArr2.
@ParameterizedTest
@MethodSource("arrowsParamsDiv")
default void testArrowCircleDiskParamsArr2(final ArrowableSingleShape sh, final ArrowStyle arr) {
assumeTrue(arr.isCircleDisk());
assumeFalse(sh instanceof Axes);
sh.setArrowStyle(arr, 0);
final ArrowableSingleShape s2 = produceOutputShapeFrom(sh);
CompareShapeMatcher.INST.assertEqualsArrowCircleDisk(sh.getArrowAt(1), s2.getArrowAt(1));
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class PolymorphArrowableTest method testArrowBracketParamsArr1.
@ParameterizedTest
@MethodSource("arrowsParamsDiv")
default void testArrowBracketParamsArr1(final ArrowableSingleShape sh, final ArrowStyle arr) {
assumeTrue(arr.isSquareBracket());
assumeFalse(sh instanceof Axes);
sh.setArrowStyle(arr, 0);
sh.setArrowStyle(ArrowStyle.LEFT_ARROW, 1);
final ArrowableSingleShape s2 = produceOutputShapeFrom(sh);
CompareShapeMatcher.INST.assertEqualsArrowBracket(sh.getArrowAt(0), s2.getArrowAt(0));
}
Aggregations