use of net.sf.latexdraw.model.api.shape.Point in project latexdraw by arnobl.
the class TestGroup method testGetAxesDistLabelsOk.
@Test
public void testGetAxesDistLabelsOk() {
final Point pt = ShapeFactory.INST.createPoint(10d, 11d);
init4getAxes().setDistLabels(pt);
assertEquals(pt, shape.getDistLabels());
}
use of net.sf.latexdraw.model.api.shape.Point in project latexdraw by arnobl.
the class TestLine method testGetIntersectionSegment.
@Test
public void testGetIntersectionSegment() {
final Line line2 = ShapeFactory.INST.createLine(0, 0, 1, 0);
line.setLine(1, 1, 0, -1);
line.updateAandB();
final Point pt = line.getIntersectionSegment(line2);
assertNotNull(pt);
assertEqualsDouble(0.5, pt.getX());
assertEqualsDouble(0d, pt.getY());
}
use of net.sf.latexdraw.model.api.shape.Point in project latexdraw by arnobl.
the class TestLine method testGetIntersectionVert.
@Test
public void testGetIntersectionVert() {
final Line line2 = ShapeFactory.INST.createLine(0, 0, 1, 0);
line.setLine(0, -10, 0, 10);
line.updateAandB();
final Point pt = line.getIntersection(line2);
assertNotNull(pt);
assertEqualsDouble(0d, pt.getX());
assertEqualsDouble(0d, pt.getY());
}
use of net.sf.latexdraw.model.api.shape.Point in project latexdraw by arnobl.
the class TestLine method testGetIntersectionSegmentVert.
@Test
public void testGetIntersectionSegmentVert() {
line.setLine(0, -10, 0, 10);
line.updateAandB();
final Point 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.model.api.shape.Point in project latexdraw by arnobl.
the class TestLine method testGetIntersectionHoriz.
@Test
public void testGetIntersectionHoriz() {
final Line line2 = ShapeFactory.INST.createLine(0, 0, 1, 0);
line.setLine(0, -10, 0, 10);
line.updateAandB();
final Point pt = line2.getIntersection(line);
assertNotNull(pt);
assertEqualsDouble(0d, pt.getX());
assertEqualsDouble(0d, pt.getY());
}
Aggregations