Examples of IShape


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

  }


  @Test
  public void testStarBorderPosOuter() throws ParseException {
    IShape sh = parser.parsePSTCode("\\"+getCommandName()+"*["+"dimen=inner]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    if(sh.isBordersMovable()) {
      assertEquals(BorderPos.INTO, sh.getBordersPosition());
      assertTrue(PSTParser.errorLogs().isEmpty());
    }
  }
View Full Code Here

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



  @Test
  public void testStarHasNoLineStyle() throws ParseException {
    IShape sh = parser.parsePSTCode("\\"+getCommandName()+"*["+"linestyle=dashed]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    if(sh.isLineStylable()) {
      assertEquals(LineStyle.SOLID, sh.getLineStyle());
      assertTrue(PSTParser.errorLogs().isEmpty());
    }
  }
View Full Code Here

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



  @Test
  public void testStarHasNoDoubleBorder() throws ParseException {
    IShape sh = parser.parsePSTCode("\\"+getCommandName()+"*["+"doubleline=true]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    if(sh.isDbleBorderable()) {
      assertFalse(sh.hasDbleBord());
      assertTrue(PSTParser.errorLogs().isEmpty());
    }
  }
View Full Code Here

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

  }


  @Test
  public void testStarFillingParametershaveNoEffect() throws ParseException {
    IShape sh = parser.parsePSTCode("\\"+getCommandName()+"*["+"fillstyle=gradient]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    assertEquals(FillingStyle.PLAIN, sh.getFillingStyle());
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

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

  }


  @Test
  public void testStarLineColourIsFillingColour() throws ParseException {
    IShape sh = parser.parsePSTCode("\\"+getCommandName()+"*["+"linecolor=green]"+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

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

  }


  @Test
  public void testStarNoShadow() throws ParseException {
    IShape sh = parser.parsePSTCode("\\"+getCommandName()+"*["+"shadow=true]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    if(sh.isShadowable()) {
      assertFalse(sh.hasShadow());
      assertTrue(PSTParser.errorLogs().isEmpty());
    }
  }
View Full Code Here

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



  @Test
  public void testParamDimen() throws ParseException {
    IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[dimen=inner]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
    if(sh.isBordersMovable()) {
      assertEquals(BorderPos.OUT, sh.getBordersPosition());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$
      assertEquals(BorderPos.INTO, sh.getBordersPosition());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+"[dimen=outer]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
      assertEquals(BorderPos.INTO, sh.getBordersPosition());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+"[dimen=middle]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
      assertEquals(BorderPos.MID, sh.getBordersPosition());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+"[dimen=outer,dimen=middle]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
      assertEquals(BorderPos.MID, sh.getBordersPosition());
      assertTrue(PSTParser.errorLogs().isEmpty());
    }
  }
View Full Code Here

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



  @Test
  public void testParamLineStyle() throws ParseException {
    IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[linestyle=dashed]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
    if(sh.isLineStylable()) {
      assertEquals(LineStyle.DASHED, sh.getLineStyle());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$
      assertEquals(LineStyle.SOLID, sh.getLineStyle());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+"[linestyle=dotted]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
      assertEquals(LineStyle.DOTTED, sh.getLineStyle());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+"[linestyle=solid]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
      assertEquals(LineStyle.SOLID, sh.getLineStyle());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+"[linestyle=dashed,linestyle=dotted]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
      assertEquals(LineStyle.DOTTED, sh.getLineStyle());
      assertTrue(PSTParser.errorLogs().isEmpty());
    }
  }
View Full Code Here

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



  @Test
  public void testParamFillingStyle() throws ParseException {
    IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle =gradient]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
    if(sh.isFillable()) {
      assertTrue(sh.hasGradient());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$
      assertFalse(sh.isFilled());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
      assertEquals(FillingStyle.CLINES, sh.getFillingStyle());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines*]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
      assertEquals(FillingStyle.CLINES_PLAIN, sh.getFillingStyle());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=hlines*]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
      assertEquals(FillingStyle.HLINES_PLAIN, sh.getFillingStyle());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=hlines]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
      assertEquals(FillingStyle.HLINES, sh.getFillingStyle());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=vlines*]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
      assertEquals(FillingStyle.VLINES_PLAIN, sh.getFillingStyle());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=vlines]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
      assertEquals(FillingStyle.VLINES, sh.getFillingStyle());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=none]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
      assertEquals(FillingStyle.NONE, sh.getFillingStyle());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient,fillstyle=clines]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
      assertEquals(FillingStyle.CLINES, sh.getFillingStyle());
      assertTrue(PSTParser.errorLogs().isEmpty());
      sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=solid]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
      assertEquals(FillingStyle.PLAIN, sh.getFillingStyle());
      assertTrue(sh.isFilled());
      assertTrue(PSTParser.errorLogs().isEmpty());
    }
  }
View Full Code Here

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

  }


  @Test
  public void testParamLinecolor() throws ParseException {
    IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[linecolor =blue]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals(Color.BLUE, sh.getLineColour());
    assertTrue(PSTParser.errorLogs().isEmpty());
    sh = parser.parsePSTCode("\\"+getCommandName()+"[linecolor=\\psfillcolor]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals(Color.WHITE, sh.getLineColour());
    assertTrue(PSTParser.errorLogs().isEmpty());
    sh = parser.parsePSTCode("\\"+getCommandName()+"[linecolor=\\psfillcolor,linecolor=red]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals(Color.RED, sh.getLineColour());
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.