use of net.sf.latexdraw.model.api.shape.Dot in project latexdraw by arnobl.
the class TestParsingPSdot method testDotScale1num.
@ParameterizedTest
@MethodSource(value = "cmds")
public void testDotScale1num(final String cmd) {
parser(cmd + "(1,1)" + cmd + "[dotscale=2](1,1)");
final Dot dot1 = getShapeAt(0);
final Dot dot2 = getShapeAt(1);
assertEquals(dot1.getDiametre() * 2d, dot2.getDiametre(), 0.001);
}
use of net.sf.latexdraw.model.api.shape.Dot in project latexdraw by arnobl.
the class TestParsingPSdot method testNoDotStyle.
@Test
public void testNoDotStyle() {
parser("\\psdot");
final Dot dot = getShapeAt(0);
assertEquals(DotStyle.DOT, dot.getDotStyle());
}
use of net.sf.latexdraw.model.api.shape.Dot in project latexdraw by arnobl.
the class TestGroup method testGetDotStyleOK.
@Test
public void testGetDotStyleOK() {
final Dot d1 = ShapeFactory.INST.createDot(ShapeFactory.INST.createPoint());
final Dot d2 = ShapeFactory.INST.createDot(ShapeFactory.INST.createPoint());
d1.setDotStyle(DotStyle.BAR);
shape.getShapes().add(sh1);
shape.getShapes().add(d1);
shape.getShapes().add(d2);
assertEquals(DotStyle.BAR, shape.getDotStyle());
}
use of net.sf.latexdraw.model.api.shape.Dot in project latexdraw by arnobl.
the class TestGroup method testSetDotStyle.
@Test
public void testSetDotStyle() {
final Dot d1 = ShapeFactory.INST.createDot(ShapeFactory.INST.createPoint());
final Dot d2 = ShapeFactory.INST.createDot(ShapeFactory.INST.createPoint());
shape.getShapes().add(sh1);
shape.getShapes().add(d1);
shape.getShapes().add(d2);
shape.setDotStyle(DotStyle.DIAMOND);
assertEquals(DotStyle.DIAMOND, d1.getDotStyle());
assertEquals(DotStyle.DIAMOND, d2.getDotStyle());
}
use of net.sf.latexdraw.model.api.shape.Dot in project latexdraw by arnobl.
the class TestDot method testConstructor1.
@Test
public void testConstructor1() {
final Dot dot1 = ShapeFactory.INST.createDot(ShapeFactory.INST.createPoint());
assertTrue(dot1.getDiametre() > 0);
assertNotNull(dot1.getDotStyle());
assertNotNull(dot1.getPosition());
assertEqualsDouble(0., dot1.getPosition().getX());
assertEqualsDouble(0., dot1.getPosition().getY());
}
Aggregations