use of net.sf.latexdraw.model.api.shape.Dot in project latexdraw by arnobl.
the class TestParsingPSdot method testCoordinatesMm.
@ParameterizedTest
@MethodSource(value = "cmds")
public void testCoordinatesMm(final String cmd) {
parser(cmd + "(350mm,200mm)");
final Dot dot = getShapeAt(0);
assertEquals(35d * Shape.PPC, dot.getPtAt(0).getX(), 0.0001);
assertEquals(-20d * Shape.PPC, dot.getPtAt(0).getY(), 0.0001);
}
use of net.sf.latexdraw.model.api.shape.Dot in project latexdraw by arnobl.
the class TestParsingPSdot method testPssetunitxunit.
@ParameterizedTest
@MethodSource(value = "cmds")
public void testPssetunitxunit(final String cmd) {
parser("\\psset{unit=2,xunit=3}" + cmd + "(1,1)");
final Dot dot = getShapeAt(0);
assertEquals(2d * 3d * Shape.PPC, dot.getX(), 0.000001);
assertEquals(-2d * Shape.PPC, dot.getY(), 0.000001);
}
use of net.sf.latexdraw.model.api.shape.Dot in project latexdraw by arnobl.
the class TestParsingPSdot method testParse1Coordinates.
@ParameterizedTest
@MethodSource(value = "cmds")
public void testParse1Coordinates(final String cmd) {
parser(cmd + "(5,10)");
final Dot dot = getShapeAt(0);
assertEquals(5d * Shape.PPC, dot.getPtAt(0).getX(), 0.0001);
assertEquals(-10d * Shape.PPC, dot.getPtAt(0).getY(), 0.0001);
}
use of net.sf.latexdraw.model.api.shape.Dot in project latexdraw by arnobl.
the class TestParsingPSdot method testDotsizeNoNum.
@ParameterizedTest
@MethodSource(value = "cmds")
public void testDotsizeNoNum(final String cmd) {
parser(cmd + "[dotsize=1.5](1,1)");
final Dot dot = getShapeAt(0);
assertEquals(1.5 * Shape.PPC, dot.getDiametre(), 0.001);
}
use of net.sf.latexdraw.model.api.shape.Dot in project latexdraw by arnobl.
the class TestParsingPSdot method testPssetunityunit.
@ParameterizedTest
@MethodSource(value = "cmds")
public void testPssetunityunit(final String cmd) {
parser("\\psset{unit=2,yunit=3}" + cmd + "(1,1)");
final Dot dot = getShapeAt(0);
assertEquals(2d * Shape.PPC, dot.getX(), 0.000001);
assertEquals(-2d * 3d * Shape.PPC, dot.getY(), 0.000001);
}
Aggregations