use of net.sf.latexdraw.model.api.shape.Text in project latexdraw by arnobl.
the class TestParsingPsframebox method testParsepscirclebox.
@Test
public void testParsepscirclebox() {
parser("\\pscirclebox[doubleline=true]{\\psframe(0,1)}");
assertEquals(1, parsedShapes.size());
final Text text = getShapeAt(0);
assertEquals("\\pscirclebox[doubleline=true]{\\psframe(0,1)}", text.getText());
}
use of net.sf.latexdraw.model.api.shape.Text in project latexdraw by arnobl.
the class TestParsingPsframebox method testParsepsovalboxstar.
@Test
public void testParsepsovalboxstar() {
parser("\\psovalbox*[doubleline=true]{\\psframe(0,1)}");
assertEquals(1, parsedShapes.size());
final Text text = getShapeAt(0);
assertEquals("\\psovalbox*[doubleline=true]{\\psframe(0,1)}", text.getText());
}
use of net.sf.latexdraw.model.api.shape.Text in project latexdraw by arnobl.
the class TestParsingRPut method testRefPointl.
@Test
void testRefPointl() {
parser("\\rput[l](10,20){coucou}");
final Text txt = getShapeAt(0);
assertEquals(TextPosition.LEFT, txt.getTextPosition());
assertEquals(10d * Shape.PPC, txt.getPosition().getX(), 0.001);
assertEquals(-20d * Shape.PPC, txt.getPosition().getY(), 0.001);
}
use of net.sf.latexdraw.model.api.shape.Text in project latexdraw by arnobl.
the class TestParsingRPut method testRPutCoordRotationWText.
@Test
void testRPutCoordRotationWText() {
parser("\\rput{W}(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 testRefPointr.
@Test
void testRefPointr() {
parser("\\rput[r](10,20){coucou}");
final Text txt = getShapeAt(0);
assertEquals(TextPosition.RIGHT, txt.getTextPosition());
assertEquals(10d * Shape.PPC, txt.getPosition().getX(), 0.001);
assertEquals(-20d * Shape.PPC, txt.getPosition().getY(), 0.001);
}
Aggregations