use of net.sf.latexdraw.model.api.shape.Rectangle in project latexdraw by arnobl.
the class TestPSTGeneralFeatures method testPssetlinewidth.
@Test
void testPssetlinewidth() {
parser("\\psset{linewidth=2cm}\\psframe(10,10)");
final Rectangle rec = getShapeAt(0);
assertEquals(2d * Shape.PPC, rec.getThickness(), 0.0001);
}
use of net.sf.latexdraw.model.api.shape.Rectangle in project latexdraw by arnobl.
the class TestPlot method testCopyFromOther.
@Test
public void testCopyFromOther() {
final Rectangle rec = ShapeFactory.INST.createRectangle();
rec.setFillingCol(DviPsColors.BLUE);
shape.copy(rec);
assertEquals(DviPsColors.BLUE, shape.getFillingCol());
}
use of net.sf.latexdraw.model.api.shape.Rectangle in project latexdraw by arnobl.
the class TestParsingPSRotate method testPSRotation10Angle.
@Test
public void testPSRotation10Angle() {
parser("\\psrotate(1,1){10}{\\psframe(2,2)}\\psframe(2,2)");
assertEquals(2, parsedShapes.size());
final Rectangle rec = getShapeAt(0);
assertEquals(-10d, Math.toDegrees(rec.getRotationAngle()), 0.001);
assertEquals(parsedShapes.get(1).getGravityCentre(), rec.getGravityCentre());
}
use of net.sf.latexdraw.model.api.shape.Rectangle in project latexdraw by arnobl.
the class TestParsingPSRotate method testPSRotationNegAngle.
@Test
public void testPSRotationNegAngle() {
parser("\\psrotate(1,2){-110.2}{\\psframe(2,4)}\\psframe(2,4)");
assertEquals(2, parsedShapes.size());
final Rectangle rec = getShapeAt(0);
assertEquals(110.2, Math.toDegrees(rec.getRotationAngle()), 0.001);
assertEquals(parsedShapes.get(1).getGravityCentre(), rec.getGravityCentre());
}
Aggregations