use of net.sf.latexdraw.models.interfaces.shape.IText in project latexdraw by arnobl.
the class TestParsingRPut method testRefPointCombotbr.
@Test
public void testRefPointCombotbr() {
parser("\\rput[t](0,0){\\rput[br](2,2){coucou}}");
final IText txt = getShapeAt(0);
assertEquals(TextPosition.BOT_RIGHT, txt.getTextPosition());
}
use of net.sf.latexdraw.models.interfaces.shape.IText in project latexdraw by arnobl.
the class TestParsingRPut method testRefPointr.
@Test
public void testRefPointr() {
parser("\\rput[r](10,20){coucou}");
final IText txt = getShapeAt(0);
assertEquals(TextPosition.RIGHT, txt.getTextPosition());
assertEquals(10d * IShape.PPC, txt.getPosition().getX(), 0.001);
assertEquals(-20d * IShape.PPC, txt.getPosition().getY(), 0.001);
}
use of net.sf.latexdraw.models.interfaces.shape.IText in project latexdraw by arnobl.
the class TestPSTGeneralFeatures method testUnknownCommand.
@Test
public void testUnknownCommand() {
listener = new PSTLatexdrawListener();
parser("\\fuhfisduf");
IText txt = getShapeAt(0);
assertEquals("\\fuhfisduf", txt.getText());
}
use of net.sf.latexdraw.models.interfaces.shape.IText in project latexdraw by arnobl.
the class TestParsingRPut method testDoubleRputRotationMustNotRotateOtherShapes.
@Test
public void testDoubleRputRotationMustNotRotateOtherShapes() {
parser("\\rput{10}(0,0){\\rput{80}(0,0){coucou}}\\psframe(10,10)");
final IText txt = getShapeAt(0);
final IRectangle rec = getShapeAt(1);
assertEquals(Math.toRadians(-90), txt.getRotationAngle(), 0.001);
assertEquals(0d, rec.getRotationAngle(), 0.001);
}
use of net.sf.latexdraw.models.interfaces.shape.IText in project latexdraw by arnobl.
the class TestParsingRPut method testRefPointb.
@Test
public void testRefPointb() {
parser("\\rput[b](10,20){coucou}");
final IText txt = getShapeAt(0);
assertEquals(TextPosition.BOT, txt.getTextPosition());
assertEquals(10d * IShape.PPC, txt.getPosition().getX(), 0.001);
assertEquals(-20d * IShape.PPC, txt.getPosition().getY(), 0.001);
}
Aggregations