use of net.sf.latexdraw.model.api.shape.Dot in project latexdraw by arnobl.
the class TestParsingPSdot method testDotsizeNoNumWithWhitespace.
@ParameterizedTest
@MethodSource(value = "cmds")
public void testDotsizeNoNumWithWhitespace(final String cmd) {
parser(cmd + "[dotsize=15 mm](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 testFloatSigns.
@ParameterizedTest
@MethodSource(value = "cmds")
public void testFloatSigns(final String cmd) {
parser(cmd + "(+++35.5,--50.5)");
final Dot dot = getShapeAt(0);
assertEquals(35.5 * Shape.PPC, dot.getPtAt(0).getX(), 0.0001);
assertEquals(-50.5 * 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 testStarLineColourIsFillingColour.
@ParameterizedTest
@MethodSource(value = "cmds")
public void testStarLineColourIsFillingColour(final String cmd) {
parser(cmd + "*[" + "linecolor=green, dotstyle=o](1,1)");
final Dot dot = getShapeAt(0);
assertEquals(DviPsColors.GREEN, dot.getFillingCol());
assertEquals(DviPsColors.GREEN, dot.getLineColour());
}
use of net.sf.latexdraw.model.api.shape.Dot in project latexdraw by arnobl.
the class TestParsingPSdot method testPssetunit.
@ParameterizedTest
@MethodSource(value = "cmds")
public void testPssetunit(final String cmd) {
parser("\\psset{unit=2}" + cmd + "(1,1)");
final Dot dot = getShapeAt(0);
assertEquals(2d * 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 testDotsizeNoUnit.
@ParameterizedTest
@MethodSource(value = "cmds")
public void testDotsizeNoUnit(final String cmd) {
parser(cmd + "[dotsize=1.5 2](1,1)");
final Dot dot = getShapeAt(0);
assertEquals(1.5 * Shape.PPC + 2d * PSTricksConstants.DEFAULT_LINE_WIDTH * Shape.PPC, dot.getDiametre(), 0.001);
}
Aggregations