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

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


  }


  @Test public void testShape3() {
    assertTrue(group.getShapeAt(3) instanceof IText);
    final IText txt = (IText) group.getShapeAt(3);
    assertEquals(345.08930858, txt.getPosition().getX(), 0.0001);
    assertEquals(198.570298, txt.getPosition().getY(), 0.0001);
    assertEquals("\\normalsize{needs}", txt.getText()); //$NON-NLS-1$
    assertEquals(Color.BLACK, txt.getLineColour());
    assertEquals(Math.toRadians(-28.917426838501797), txt.getRotationAngle(), 0.0001);
  }
View Full Code Here


  }


  @Test public void testShape1() {
    assertTrue(group.getShapeAt(1) instanceof IText);
    final IText txt = (IText) group.getShapeAt(1);
    assertEquals(177.8671875, txt.getPosition().getX(), 0.01);
    assertEquals(234.328125, txt.getPosition().getY(), 0.01);
    assertEquals("\\normalsize{ActionPasteNode}", txt.getText()); //$NON-NLS-1$
    assertEquals(Color.BLACK, txt.getLineColour());
    assertEquals(0., txt.getRotationAngle(),0.0001);
  }
View Full Code Here

import org.junit.Test;

public class TestParsingPsframebox extends TestPSTParser {
  @Test public void testFrameboxWithSpecialColour() throws ParseException {
    IText txt = (IText)parser.parsePSTCode("\\definecolor{color3b}{rgb}{0.7725490196078432,0.09803921568627451,0.09803921568627451}"+ //$NON-NLS-1$
        "\\psframebox[linewidth=0.04,doubleline=true,doublesep=0.12,fillstyle=solid,fillcolor=color3b]{coucou}").get().getShapeAt(0); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
    assertTrue(txt.getText().contains("definecolor{color3b}{rgb}{")); //$NON-NLS-1$
  }
View Full Code Here

  @Test public void testParse_pstribox_star() throws ParseException {
    IGroup group = parser.parsePSTCode("\\pstribox*[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("\\pstribox*[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  @Test public void testParse_pstribox() throws ParseException {
    IGroup group = parser.parsePSTCode("\\pstribox[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("\\pstribox[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  @Test public void testParse_psdiabox_star() throws ParseException {
    IGroup group = parser.parsePSTCode("\\psdiabox*[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("\\psdiabox*[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  @Test public void testParse_psdiabox() throws ParseException {
    IGroup group = parser.parsePSTCode("\\psdiabox[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("\\psdiabox[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  @Test public void testParse_psovalbox_star() throws ParseException {
    IGroup group = parser.parsePSTCode("\\psovalbox*[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("\\psovalbox*[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  @Test public void testParse_psovalbox() throws ParseException {
    IGroup group = parser.parsePSTCode("\\psovalbox[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("\\psovalbox[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  @Test public void testParse_pscirclebox_star() 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

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.