use of net.sf.latexdraw.models.interfaces.shape.ICircle in project latexdraw by arnobl.
the class TestParsingQdisk method testLineStylePlain.
@Test
public void testLineStylePlain() {
parser("\\psset{linestyle=dotted}\\qdisk(35pt,20pt){10pt}");
ICircle cir = getShapeAt(0);
assertEquals(LineStyle.SOLID, cir.getLineStyle());
}
use of net.sf.latexdraw.models.interfaces.shape.ICircle in project latexdraw by arnobl.
the class TestParsingQdisk method testBorderMustBeInto.
@Test
public void testBorderMustBeInto() {
parser("\\psset{dimen=middle}\\qdisk(35pt,20pt){10pt}");
ICircle cir = getShapeAt(0);
assertEquals(BorderPos.INTO, cir.getBordersPosition());
}
use of net.sf.latexdraw.models.interfaces.shape.ICircle in project latexdraw by arnobl.
the class TestParsingQdisk method testMustBeFilled.
@Test
public void testMustBeFilled() {
parser("\\qdisk(35pt,20pt){10pt}");
ICircle cir = getShapeAt(0);
assertEquals(FillingStyle.PLAIN, cir.getFillingStyle());
}
use of net.sf.latexdraw.models.interfaces.shape.ICircle in project latexdraw by arnobl.
the class TestParsingPscircle method testParse2CoordinatesFloat2.
@Test
public void testParse2CoordinatesFloat2() {
parser("\\pscircle(35.5,50.5){1.25}");
ICircle cir = getShapeAt(0);
assertEquals(35.5 * IShape.PPC - 1.25 * IShape.PPC, cir.getPosition().getX(), 0.001);
assertEquals((50.5 * IShape.PPC - 1.25 * IShape.PPC) * -1d, cir.getPosition().getY(), 0.001);
assertEquals(1.25 * IShape.PPC * 2d, cir.getWidth(), 0.0000001);
assertEquals(1.25 * IShape.PPC * 2d, cir.getHeight(), 0.0000001);
}
use of net.sf.latexdraw.models.interfaces.shape.ICircle in project latexdraw by arnobl.
the class TestParsingPscircle method testCoordinatesMissing.
@Test
public void testCoordinatesMissing() {
parser("\\pscircle(,){1}");
ICircle cir = getShapeAt(0);
assertEquals(IShape.PPC - 1d * IShape.PPC, cir.getPosition().getX(), 0.0000001);
assertEquals((IShape.PPC - 1d * IShape.PPC) * -1d, cir.getPosition().getY(), 0.0000001);
assertEquals(1d * IShape.PPC * 2d, cir.getWidth(), 0.0000001);
assertEquals(1d * IShape.PPC * 2d, cir.getHeight(), 0.0000001);
}
Aggregations