use of net.sf.latexdraw.model.api.shape.Polyline in project latexdraw by arnobl.
the class TestParsingPsline method testCoordinatesMm.
@Test
public void testCoordinatesMm() {
parser("\\psline(350mm,200mm)(10mm, 30.3mm)");
final Polyline line = (Polyline) parsedShapes.get(0);
assertEquals(2, line.getNbPoints());
assertEquals(35d * Shape.PPC, line.getPtAt(0).getX(), 0.0001);
assertEquals(-20d * Shape.PPC, line.getPtAt(0).getY(), 0.0001);
assertEquals(1d * Shape.PPC, line.getPtAt(1).getX(), 0.0001);
assertEquals(-3.03 * Shape.PPC, line.getPtAt(1).getY(), 0.0001);
}
Aggregations