use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class TestGroup method testSetAxesIncrement.
@Test
public void testSetAxesIncrement() {
init4setAxes();
final Point pt = ShapeFactory.INST.createPoint(13d, 14d);
shape.setIncrement(pt);
shape.getShapes().stream().filter(sh -> sh instanceof Axes).map(sh -> (Axes) sh).forEach(sh -> assertEquals(pt, sh.getIncrement()));
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class TestGroup method init4setAxes.
private void init4setAxes() {
final Shape sh1 = ShapeFactory.INST.createRectangle();
final Axes sh2 = ShapeFactory.INST.createAxes(ShapeFactory.INST.createPoint());
final Shape sh1b = ShapeFactory.INST.createRectangle();
final Axes sh3 = ShapeFactory.INST.createAxes(ShapeFactory.INST.createPoint());
shape.getShapes().add(sh1);
shape.getShapes().add(sh2);
shape.getShapes().add(sh1b);
shape.getShapes().add(sh3);
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class TestAxes method testConstructor3NotOKINF0.
@Test
public void testConstructor3NotOKINF0() {
final Axes axes = ShapeFactory.INST.createAxes(ShapeFactory.INST.createPoint(Double.POSITIVE_INFINITY, 0));
assertNotNull(axes.getPtAt(0));
assertEqualsDouble(0d, axes.getPtAt(0).getX());
assertEqualsDouble(0d, axes.getPtAt(0).getY());
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class TestAxes method testConstructor3NotOK0NAN.
@Test
public void testConstructor3NotOK0NAN() {
final Axes axes = ShapeFactory.INST.createAxes(ShapeFactory.INST.createPoint(0, Double.NaN));
assertNotNull(axes.getPtAt(0));
assertEqualsDouble(0d, axes.getPtAt(0).getX());
assertEqualsDouble(0d, axes.getPtAt(0).getY());
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class TestAxes method testConstructor3OK.
@Test
public void testConstructor3OK() {
final Axes axes = ShapeFactory.INST.createAxes(ShapeFactory.INST.createPoint(10, -20));
assertNotNull(axes.getPtAt(0));
assertEqualsDouble(10d, axes.getPtAt(0).getX());
assertEqualsDouble(-20d, axes.getPtAt(0).getY());
}
Aggregations