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

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


  }


  @Test
  public void testParamArrowsizeDimNum() throws ParseException {
    IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=<->, arrowsize=1.5cm 3](1,1)").get().getShapeAt(0); //$NON-NLS-1$
    assertEquals(1.5*IShape.PPC, line.getArrowSizeDim(), 0.0001);
    assertEquals(3., line.getArrowSizeNum(), 0.0001);
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here


  }


  @Test
  public void testParamArrowsizeDim() throws ParseException {
    IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=<->, arrowsize=2cm](1,1)").get().getShapeAt(0); //$NON-NLS-1$
    assertEquals(2.*IShape.PPC, line.getArrowSizeDim(), 0.0001);
    assertEquals(0., line.getArrowSizeNum(), 0.0001);
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  }


  @Test
  public void testParamArrowsArrows() throws ParseException {
    IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=<->]{-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(0));
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  }


  @Test
  public void testParamArrowsRRBracker() throws ParseException {
    IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=)-](1,1)").get().getShapeAt(0); //$NON-NLS-1$
    assertEquals(ArrowStyle.RIGHT_ROUND_BRACKET, line.getArrowStyle(0));
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  }


  @Test
  public void testParamArrowsBarEnd() throws ParseException {
    IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=|*-](1,1)").get().getShapeAt(0); //$NON-NLS-1$
    assertEquals(ArrowStyle.BAR_END, line.getArrowStyle(0));
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  }


  @Test
  public void testParamArrowsRLBracker() throws ParseException {
    IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=(-](1,1)").get().getShapeAt(0); //$NON-NLS-1$
    assertEquals(ArrowStyle.LEFT_ROUND_BRACKET, line.getArrowStyle(0));
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  }


  @Test
  public void testParamArrowsSLBracket() throws ParseException {
    IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=[-](1,1)").get().getShapeAt(0); //$NON-NLS-1$
    assertEquals(ArrowStyle.LEFT_SQUARE_BRACKET, line.getArrowStyle(0));
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  }


  @Test
  public void testParamArrows() throws ParseException {
    IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=<->](1,1)").get().getShapeAt(0); //$NON-NLS-1$
    assertEquals(ArrowStyle.LEFT_ARROW, line.getArrowStyle(0));
    assertEquals(ArrowStyle.RIGHT_ARROW, line.getArrowStyle(1));
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  }


  @Test
  public void testNoneC() throws ParseException {
    IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{-C}(1,1)").get().getShapeAt(0); //$NON-NLS-1$
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(0));
    assertEquals(ArrowStyle.SQUARE_END, line.getArrowStyle(1));
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  }


  @Test
  public void testCNone() throws ParseException {
    IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{C-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$
    assertEquals(ArrowStyle.SQUARE_END, line.getArrowStyle(0));
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

TOP

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

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.