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

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


  }


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


  }


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

  }


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

  }


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



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

  }


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

  }


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

  }


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

  }


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


  @Override
  @Test
  public void testStarLineColourIsFillingColour() throws ParseException {
    IDot sh = (IDot)parser.parsePSTCode("\\"+getCommandName()+"*["+"linecolor=green, dotstyle=o]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    assertEquals(Color.GREEN, sh.getFillingCol());
    assertEquals(Color.GREEN, sh.getLineColour());
    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.