use of net.sf.latexdraw.model.api.shape.Circle in project latexdraw by arnobl.
the class TestParsingQdisk method testLineStylePlain.
@Test
public void testLineStylePlain() {
parser("\\psset{linestyle=dotted}\\qdisk(35pt,20pt){10pt}");
final Circle cir = getShapeAt(0);
assertEquals(LineStyle.SOLID, cir.getLineStyle());
}
use of net.sf.latexdraw.model.api.shape.Circle in project latexdraw by arnobl.
the class TestParsingQdisk method testCoordinatesCm.
@Test
public void testCoordinatesCm() {
parser("\\qdisk(35cm,20cm){.5cm}");
final Circle cir = getShapeAt(0);
assertEquals(35d * Shape.PPC - 0.5 * Shape.PPC, cir.getPosition().getX(), 0.001);
assertEquals((20d * Shape.PPC - 0.5 * Shape.PPC) * -1d, cir.getPosition().getY(), 0.001);
assertEquals(0.5 * Shape.PPC * 2d, cir.getWidth(), 0.0000001);
assertEquals(0.5 * Shape.PPC * 2d, cir.getHeight(), 0.0000001);
}
use of net.sf.latexdraw.model.api.shape.Circle in project latexdraw by arnobl.
the class TestParsingQdisk method testLineColourIsFillColour.
@Test
public void testLineColourIsFillColour() {
parser("\\psset{linecolor=green}\\qdisk(35pt,20pt){10pt}");
final Circle cir = getShapeAt(0);
assertEquals(DviPsColors.GREEN, cir.getFillingCol());
assertEquals(DviPsColors.GREEN, cir.getLineColour());
}
use of net.sf.latexdraw.model.api.shape.Circle in project latexdraw by arnobl.
the class TestParsingQdisk method testMustBeFilled.
@Test
public void testMustBeFilled() {
parser("\\qdisk(35pt,20pt){10pt}");
final Circle cir = getShapeAt(0);
assertEquals(FillingStyle.PLAIN, cir.getFillingStyle());
}
use of net.sf.latexdraw.model.api.shape.Circle in project latexdraw by arnobl.
the class TestParsingPscircle method testCoordinatesRadius.
@Test
public void testCoordinatesRadius() {
parser("\\pscircle(35,20){10}");
final Circle cir = getShapeAt(0);
assertEquals(35d * Shape.PPC - 10d * Shape.PPC, cir.getPosition().getX(), 0.001);
assertEquals((20d * Shape.PPC - 10d * Shape.PPC) * -1d, cir.getPosition().getY(), 0.001);
assertEquals(10d * Shape.PPC * 2d, cir.getWidth(), 0.0000001);
assertEquals(10d * Shape.PPC * 2d, cir.getHeight(), 0.0000001);
}
Aggregations