use of net.sf.latexdraw.model.api.shape.Circle in project latexdraw by arnobl.
the class TestParsingQdisk method testNoShadow.
@Test
public void testNoShadow() {
parser("\\psset{shadow=true}\\qdisk(35pt,20pt){10pt}");
final Circle cir = getShapeAt(0);
assertFalse(cir.hasShadow());
}
use of net.sf.latexdraw.model.api.shape.Circle in project latexdraw by arnobl.
the class TestParsingQdisk method testBorderMustBeInto.
@Test
public void testBorderMustBeInto() {
parser("\\psset{dimen=middle}\\qdisk(35pt,20pt){10pt}");
final Circle cir = getShapeAt(0);
assertEquals(BorderPos.INTO, cir.getBordersPosition());
}
use of net.sf.latexdraw.model.api.shape.Circle in project latexdraw by arnobl.
the class TestParsingQdisk method testNoDbleBord.
@Test
public void testNoDbleBord() {
parser("\\psset{doubleline=true}\\qdisk(35pt,20pt){10pt}");
final Circle cir = getShapeAt(0);
assertFalse(cir.hasDbleBord());
}
use of net.sf.latexdraw.model.api.shape.Circle in project latexdraw by arnobl.
the class TestParsingPscircle method testFloatSigns.
@Test
public void testFloatSigns() {
parser("\\pscircle(+++35.5,--50.5){--+12}");
final Circle cir = getShapeAt(0);
assertEquals(35.5 * Shape.PPC - 12d * Shape.PPC, cir.getPosition().getX(), 0.001);
assertEquals((50.5 * Shape.PPC - 12d * Shape.PPC) * -1d, cir.getPosition().getY(), 0.001);
assertEquals(12d * Shape.PPC * 2d, cir.getWidth(), 0.0000001);
assertEquals(12d * Shape.PPC * 2d, cir.getHeight(), 0.0000001);
}
use of net.sf.latexdraw.model.api.shape.Circle in project latexdraw by arnobl.
the class TestParsingPscircle method testCoordinatesMm.
@Test
public void testCoordinatesMm() {
parser("\\pscircle(350mm,200mm){10mm}");
final Circle cir = getShapeAt(0);
assertEquals(35d * Shape.PPC - 1d * Shape.PPC, cir.getPosition().getX(), 0.001);
assertEquals((20d * Shape.PPC - 1d * Shape.PPC) * -1d, cir.getPosition().getY(), 0.001);
assertEquals(1d * Shape.PPC * 2d, cir.getWidth(), 0.0000001);
assertEquals(1d * Shape.PPC * 2d, cir.getHeight(), 0.0000001);
}
Aggregations