Package net.sf.latexdraw.glib.models.interfaces.shape

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IText


  @Test public void testParse_pscirclebox() throws ParseException {
    IGroup group = parser.parsePSTCode("\\pscirclebox[doubleline=true]{\\psframe(0,1)}").get(); //$NON-NLS-1$
    assertEquals(1, group.size());
    assertTrue(group.getShapeAt(0) instanceof IText);
    IText text = ((IText)group.getShapeAt(0));
    assertEquals("\\pscirclebox[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here


  @Test public void testParse_psshadowbox_star() throws ParseException {
    IGroup group = parser.parsePSTCode("\\psshadowbox*[doubleline=true]{\\psframe(0,1)}").get(); //$NON-NLS-1$
    assertEquals(1, group.size());
    assertTrue(group.getShapeAt(0) instanceof IText);
    IText text = ((IText)group.getShapeAt(0));
    assertEquals("\\psshadowbox*[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  @Test public void testParse_psshadowbox() throws ParseException {
    IGroup group = parser.parsePSTCode("\\psshadowbox[doubleline=true]{\\psframe(0,1)}").get(); //$NON-NLS-1$
    assertEquals(1, group.size());
    assertTrue(group.getShapeAt(0) instanceof IText);
    IText text = ((IText)group.getShapeAt(0));
    assertEquals("\\psshadowbox[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  @Test public void testBug911816() throws ParseException {
    // https://bugs.launchpad.net/latexdraw/+bug/911816
    IGroup group = parser.parsePSTCode("\\psframebox{$E=mc^2$}").get(); //$NON-NLS-1$
    assertEquals(1, group.size());
    assertTrue(group.getShapeAt(0) instanceof IText);
    IText text = ((IText)group.getShapeAt(0));
    assertEquals("\\psframebox{$E=mc^2$}", text.getText()); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  @Test public void testParse_psframebox() throws ParseException {
    IGroup group = parser.parsePSTCode("\\psframebox[doubleline=true]{\\psframe(0,1)}").get(); //$NON-NLS-1$
    assertEquals(1, group.size());
    assertTrue(group.getShapeAt(0) instanceof IText);
    IText text = ((IText)group.getShapeAt(0));
    assertEquals("\\psframebox[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  @Test public void testParse_psdblframebox() throws ParseException {
    IGroup group = parser.parsePSTCode("\\psdblframebox{\\psframe(0,1)}").get(); //$NON-NLS-1$
    assertEquals(1, group.size());
    assertTrue(group.getShapeAt(0) instanceof IText);
    IText text = ((IText)group.getShapeAt(0));
    assertEquals("\\psdblframebox{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  @Test public void testParse_psframebox_star() throws ParseException {
    IGroup group = parser.parsePSTCode("\\psframebox*[doubleline=true]{\\psframe(0,1)}").get(); //$NON-NLS-1$
    assertEquals(1, group.size());
    assertTrue(group.getShapeAt(0) instanceof IText);
    IText text = ((IText)group.getShapeAt(0));
    assertEquals("\\psframebox*[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  @Test public void testParse_psdblframebox_star() throws ParseException {
    IGroup group = parser.parsePSTCode("\\psdblframebox*{\\psframe(0,1)}").get(); //$NON-NLS-1$
    assertEquals(1, group.size());
    assertTrue(group.getShapeAt(0) instanceof IText);
    IText text = ((IText)group.getShapeAt(0));
    assertEquals("\\psdblframebox*{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  }


  @Test
  public void testRPutCoordRotationSText() throws ParseException {
    IText txt = (IText)parser.parsePSTCode("\\rput{S}(1,2){coucou}").get().getShapeAt(0); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
    assertEquals("coucou", txt.getText()); //$NON-NLS-1$
    assertEquals(IShape.PPC, txt.getPosition().getX(), 0.001);
    assertEquals(-2.*IShape.PPC, txt.getPosition().getY(), 0.001);
    assertEquals(Math.toRadians(-180.), txt.getRotationAngle(), 0.001);
  }
View Full Code Here

  }


  @Test
  public void testRPutCoordRotationWText() throws ParseException {
    IText txt = (IText)parser.parsePSTCode("\\rput{W}(1,2){coucou}").get().getShapeAt(0); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
    assertEquals("coucou", txt.getText()); //$NON-NLS-1$
    assertEquals(IShape.PPC, txt.getPosition().getX(), 0.001);
    assertEquals(-2.*IShape.PPC, txt.getPosition().getY(), 0.001);
    assertEquals(Math.toRadians(-90.), txt.getRotationAngle(), 0.001);
  }
View Full Code Here

TOP

Related Classes of net.sf.latexdraw.glib.models.interfaces.shape.IText

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.