use of net.sf.latexdraw.models.interfaces.shape.IPoint in project latexdraw by arnobl.
the class TestIGroup method testSetAxesdistLabels.
@Test
public void testSetAxesdistLabels() {
init4setAxes();
IPoint pt = ShapeFactory.INST.createPoint(13d, 14d);
shape.setDistLabels(pt);
shape.getShapes().stream().filter(sh -> sh instanceof IAxes).map(sh -> (IAxes) sh).forEach(sh -> assertEquals(pt, sh.getDistLabels()));
}
use of net.sf.latexdraw.models.interfaces.shape.IPoint in project latexdraw by arnobl.
the class TestIGroup method testGetAxesIncrementOk.
@Test
public void testGetAxesIncrementOk() {
IPoint pt = ShapeFactory.INST.createPoint(10d, 11d);
init4getAxes().setIncrement(pt);
assertEquals(pt, shape.getIncrement());
}
use of net.sf.latexdraw.models.interfaces.shape.IPoint in project latexdraw by arnobl.
the class TestILine method testGetIntersectionSegmentVert.
@Test
public void testGetIntersectionSegmentVert() {
line.setLine(0, -10, 0, 10);
line.updateAandB();
IPoint pt = line.getIntersectionSegment(ShapeFactory.INST.createLine(0, 0, 1, 0));
assertNotNull(pt);
assertEqualsDouble(0d, pt.getX());
assertEqualsDouble(0d, pt.getY());
}
use of net.sf.latexdraw.models.interfaces.shape.IPoint in project latexdraw by arnobl.
the class TestILine method testGetIntersectionSegmentHoriz.
@Test
public void testGetIntersectionSegmentHoriz() {
line.setLine(0, -10, 0, 10);
line.updateAandB();
IPoint pt = ShapeFactory.INST.createLine(0, 0, 1, 0).getIntersectionSegment(line);
assertNotNull(pt);
assertEqualsDouble(0d, pt.getX());
assertEqualsDouble(0d, pt.getY());
}
use of net.sf.latexdraw.models.interfaces.shape.IPoint in project latexdraw by arnobl.
the class TestIPicture method testGetBottomLeftPoint.
@Test
public void testGetBottomLeftPoint() {
final IPoint pt = shape.getBottomLeftPoint();
assertEqualsDouble(shape.getPosition().getX(), pt.getX());
assertEqualsDouble(shape.getPosition().getY() + shape.getImage().getHeight(), pt.getY());
}
Aggregations