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

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


  }


  @Test
  public void testDotsizeNoNum() throws ParseException {
    IDot dot =  (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotsize=1.5]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals(1.5*IShape.PPC, dot.getDiametre(), 0.001);
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here


  }


  @Test
  public void testDotsizeNoNumWithUnit() throws ParseException {
    IDot dot =  (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotsize=15 mm]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals(1.5*IShape.PPC, dot.getDiametre(), 0.001);
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  }


  @Test
  public void testDotsizeNoNumWithWhitespace() throws ParseException {
    IDot dot =  (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotsize=15 mm]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals(1.5*IShape.PPC, dot.getDiametre(), 0.001);
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  }


  @Test
  public void testDotsize() throws ParseException {
    IDot dot =  (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotsize=1.5 cm 4]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals(1.5*IShape.PPC+4.*PSTricksConstants.DEFAULT_LINE_WIDTH*IShape.PPC, dot.getDiametre(), 0.001);
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here


  @Override
  @Test
  public void testCoordinatesFloat2() throws ParseException {
    IDot dot =  (IDot)parser.parsePSTCode("\\"+getCommandName()+"(35.5,50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals(35.5*IShape.PPC, dot.getPtAt(0).getX(), 0.0001);
    assertEquals(-50.5*IShape.PPC, dot.getPtAt(0).getY(), 0.0001);
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  }


  @Test
  public void testDotStylePentagonStar() throws ParseException {
    IDot dot =  (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=pentagon*]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals(DotStyle.FPENTAGON, dot.getDotStyle());
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  }


  @Test
  public void testDotStylePentagon() throws ParseException {
    IDot dot =  (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=pentagon]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals(DotStyle.PENTAGON, dot.getDotStyle());
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  }


  @Test
  public void testDotStyleTriangleStar() throws ParseException {
    IDot dot =  (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=triangle*]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals(DotStyle.FTRIANGLE, dot.getDotStyle());
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  }


  @Test
  public void testDotStyleTriangle() throws ParseException {
    IDot dot =  (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=triangle]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals(DotStyle.TRIANGLE, dot.getDotStyle());
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

  }


  @Test
  public void testDotStyleDiamondStar() throws ParseException {
    IDot dot =  (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=diamond*]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals(DotStyle.FDIAMOND, dot.getDotStyle());
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

TOP

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

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.