use of net.sf.latexdraw.model.api.shape.Text in project latexdraw by arnobl.
the class TestParsingRPut method testRputPosition.
@Test
void testRputPosition() {
parser("\\rput(1,2){coucou}");
assertEquals(1, parsedShapes.size());
final Text text = getShapeAt(0);
assertEquals("coucou", text.getText());
assertEquals(1d * Shape.PPC, text.getPosition().getX(), 0.001);
assertEquals(-2d * Shape.PPC, text.getPosition().getY(), 0.001);
}
use of net.sf.latexdraw.model.api.shape.Text in project latexdraw by arnobl.
the class TestParsingRPut method testRPutCoordRotationLText.
@Test
void testRPutCoordRotationLText() {
parser("\\rput{L}(1,2){coucou}");
final Text txt = getShapeAt(0);
assertEquals("coucou", txt.getText());
assertEquals(Shape.PPC, txt.getPosition().getX(), 0.001);
assertEquals(-2d * Shape.PPC, txt.getPosition().getY(), 0.001);
assertEquals(Math.toRadians(-90d), txt.getRotationAngle(), 0.001);
}
use of net.sf.latexdraw.model.api.shape.Text in project latexdraw by arnobl.
the class TestParsingRPut method testRefPointCombotbr.
@Test
void testRefPointCombotbr() {
parser("\\rput[t](0,0){\\rput[br](2,2){coucou}}");
final Text txt = getShapeAt(0);
assertEquals(TextPosition.BOT_RIGHT, txt.getTextPosition());
}
use of net.sf.latexdraw.model.api.shape.Text in project latexdraw by arnobl.
the class TestParsingRPut method testRPutCoordRotationRText.
@Test
void testRPutCoordRotationRText() {
parser("\\rput{R}(1,2){coucou}");
final Text txt = getShapeAt(0);
assertEquals("coucou", txt.getText());
assertEquals(Shape.PPC, txt.getPosition().getX(), 0.001);
assertEquals(-2d * Shape.PPC, txt.getPosition().getY(), 0.001);
assertEquals(Math.toRadians(-270d), txt.getRotationAngle(), 0.001);
}
use of net.sf.latexdraw.model.api.shape.Text in project latexdraw by arnobl.
the class TestParsingPsframebox method testParsepsdblframebox.
@Test
public void testParsepsdblframebox() {
parser("\\psdblframebox{\\psframe(0,1)}");
assertEquals(1, parsedShapes.size());
final Text text = getShapeAt(0);
assertEquals("\\psdblframebox{\\psframe(0,1)}", text.getText());
}
Aggregations