use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class TestParsingPsaxes method testParamDx.
@ParameterizedTest
@ValueSource(doubles = { 2d, 3.5 })
public void testParamDx(final double dx) {
parser("\\psaxes[Dx=" + dx + "](0,0)(0,0)(2,2)");
final Axes axes = getShapeAt(0);
assertEquals(dx, axes.getIncrementX(), 0.00001);
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class TestParsingPsaxes method testOy.
@ParameterizedTest
@ValueSource(doubles = { 2d, 3.5 })
public void testOy(final double oy) {
parser("\\psaxes[Oy=" + oy + "](0,0)(0,0)(2,2)");
final Axes axes = getShapeAt(0);
assertEquals(oy, axes.getOriginY(), 0.00001);
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class TestGroup method testSetAxesdistLabels.
@Test
public void testSetAxesdistLabels() {
init4setAxes();
final Point pt = ShapeFactory.INST.createPoint(13d, 14d);
shape.setDistLabels(pt);
shape.getShapes().stream().filter(sh -> sh instanceof Axes).map(sh -> (Axes) sh).forEach(sh -> assertEquals(pt, sh.getDistLabels()));
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class TestGroup method init4setFill.
private void init4setFill() {
final Axes sh2 = ShapeFactory.INST.createAxes(ShapeFactory.INST.createPoint());
final Shape sh1 = ShapeFactory.INST.createRectangle();
final Shape sh1b = ShapeFactory.INST.createRectangle();
shape.getShapes().add(sh2);
shape.getShapes().add(sh1);
shape.getShapes().add(sh1b);
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class TestGroup method init4getAxes.
private Axes init4getAxes() {
final Shape sh1 = ShapeFactory.INST.createRectangle();
final Axes sh2 = ShapeFactory.INST.createAxes(ShapeFactory.INST.createPoint());
final Axes sh3 = ShapeFactory.INST.createAxes(ShapeFactory.INST.createPoint());
shape.getShapes().add(sh1);
shape.getShapes().add(sh2);
shape.getShapes().add(sh3);
return sh2;
}
Aggregations