Package net.sf.latexdraw.parsers.svg

Examples of net.sf.latexdraw.parsers.svg.SVGStopElement


public class TestSVGStopElement extends AbstractTestSVGElement {
  @SuppressWarnings("unused")
  @Test
  public void testContructor() throws MalformedSVGDocument {
    try {
      new SVGStopElement(null, null);
      fail();
    }
    catch(Exception e){/**/}

    try {
      new SVGStopElement(node, null);
      fail();
    }
    catch(MalformedSVGDocument e){/**/}

    try {
      node.setAttribute(SVGAttributes.SVG_OFFSET, "dsd"); //$NON-NLS-1$
      new SVGStopElement(node, null);
      fail();
    }
    catch(MalformedSVGDocument e){/**/}

    node.setAttribute(SVGAttributes.SVG_OFFSET, "0.5"); //$NON-NLS-1$
    new SVGStopElement(node, null);
  }
View Full Code Here



  @Test
  public void testGetStopColor() throws MalformedSVGDocument {
    node.setAttribute(SVGAttributes.SVG_OFFSET, "0.5"); //$NON-NLS-1$
    SVGStopElement e = new SVGStopElement(node, null);
    assertEquals(e.getStopColor(), Color.BLACK);

    node.setAttribute(SVGAttributes.SVG_OFFSET, "0.5"); //$NON-NLS-1$
    node.setAttribute(SVGAttributes.SVG_STOP_COLOR, "blue"); //$NON-NLS-1$
    e = new SVGStopElement(node, null);
    assertEquals(e.getStopColor(), Color.BLUE);
  }
View Full Code Here


  @Test
  public void testGetOffset() throws MalformedSVGDocument {
    node.setAttribute(SVGAttributes.SVG_OFFSET, "0.5"); //$NON-NLS-1$
    SVGStopElement e = new SVGStopElement(node, null);
    assertEquals(e.getOffset(), 0.5, 0.0001);
  }
View Full Code Here


  @Test
  public void testEnableRendering() throws MalformedSVGDocument {
    node.setAttribute(SVGAttributes.SVG_OFFSET, "0.5"); //$NON-NLS-1$
    SVGStopElement s = new SVGStopElement(node, null);
    assertTrue(s.enableRendering());
  }
View Full Code Here

TOP

Related Classes of net.sf.latexdraw.parsers.svg.SVGStopElement

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.