use of net.sf.latexdraw.models.interfaces.shape.IText in project latexdraw by arnobl.
the class TestParsingRPut method testRPutCoordRotationNText.
@Test
public void testRPutCoordRotationNText() {
parser("\\rput{N}(1,2){coucou}");
final IText txt = getShapeAt(0);
assertEquals("coucou", txt.getText());
assertEquals(IShape.PPC, txt.getPosition().getX(), 0.001);
assertEquals(-2d * IShape.PPC, txt.getPosition().getY(), 0.001);
assertEquals(0d, txt.getRotationAngle(), 0.001);
}
use of net.sf.latexdraw.models.interfaces.shape.IText in project latexdraw by arnobl.
the class TestIText method testCopy.
@Test
public void testCopy() {
final IText s2 = ShapeFactory.INST.createText();
shape.setText("foo");
shape.setTextPosition(TextPosition.BOT_RIGHT);
s2.copy(shape);
assertEquals(shape.getText(), s2.getText());
assertEquals(shape.getTextPosition(), s2.getTextPosition());
}
use of net.sf.latexdraw.models.interfaces.shape.IText in project latexdraw by arnobl.
the class TestIText method testConstructorsOK4.
@Test
public void testConstructorsOK4() {
IText txt = ShapeFactory.INST.createText(ShapeFactory.INST.createPoint(0, Double.NEGATIVE_INFINITY), "aa");
assertEquals(ShapeFactory.INST.createPoint(), txt.getPosition());
}
use of net.sf.latexdraw.models.interfaces.shape.IText in project latexdraw by arnobl.
the class TestIText method testDuplicate.
@Test
public void testDuplicate() {
shape.setText("foo");
shape.setTextPosition(TextPosition.BOT_RIGHT);
final IText dup = shape.duplicate();
assertEquals(shape.getText(), dup.getText());
assertEquals(shape.getTextPosition(), dup.getTextPosition());
}
use of net.sf.latexdraw.models.interfaces.shape.IText in project latexdraw by arnobl.
the class TestIText method testConstructorsOK2.
@Test
public void testConstructorsOK2() {
IText txt = ShapeFactory.INST.createText(ShapeFactory.INST.createPoint(), "coucou");
assertNotNull(txt.getText());
assertFalse(txt.getText().isEmpty());
}
Aggregations