use of net.sf.latexdraw.models.interfaces.shape.IText in project latexdraw by arnobl.
the class TestTextParsing method testBug7220751.
@Test
public void testBug7220751() {
// https://bugs.launchpad.net/latexdraw/+bug/722075
parser("\\color{blue} xyz");
assertEquals(1, listener.getShapes().size());
IText text = getShapeAt(0);
assertEquals("xyz", text.getText());
assertEquals(DviPsColors.BLUE, text.getLineColour());
}
use of net.sf.latexdraw.models.interfaces.shape.IText in project latexdraw by arnobl.
the class TestTextParsing method testBug7220752.
@Test
public void testBug7220752() {
// https://bugs.launchpad.net/latexdraw/+bug/722075
parser("\\textcolor{blue}{xyz}");
assertEquals(1, listener.getShapes().size());
IText text = getShapeAt(0);
assertEquals("xyz", text.getText());
assertEquals(DviPsColors.BLUE, text.getLineColour());
}
use of net.sf.latexdraw.models.interfaces.shape.IText in project latexdraw by arnobl.
the class TestTextParsing method testParseTexttiny.
@Test
public void testParseTexttiny() {
parser("\\rput(1,2){\\tiny coucou}");
assertEquals(1, listener.getShapes().size());
IText text = getShapeAt(0);
assertEquals("\\tiny coucou", text.getText());
}
use of net.sf.latexdraw.models.interfaces.shape.IText in project latexdraw by arnobl.
the class TestTextParsing method testTextWithSpecialColour.
@Test
public void testTextWithSpecialColour() {
parser("\\definecolor{color0}{rgb}{0.5,0.5,0.5}\\color{color0}foo");
final IText txt = getShapeAt(0);
assertNotNull(txt);
assertEquals(ShapeFactory.INST.createColor(0.5, 0.5, 0.5), txt.getLineColour());
}
use of net.sf.latexdraw.models.interfaces.shape.IText in project latexdraw by arnobl.
the class TestTextParsing method testBug911816.
@Test
public void testBug911816() {
// https://bugs.launchpad.net/latexdraw/+bug/911816
parser("\\psframebox{$E=mc^2$}");
assertEquals(1, listener.getShapes().size());
IText text = getShapeAt(0);
assertEquals("\\psframebox{$E=mc^2$}", text.getText());
}
Aggregations