Examples of SVGDocument


Examples of com.tinyline.svg.SVGDocument

      SVGImageElem.setImageLoader(this);
      // Uncomment the following line for full antialiasing
      raster.setAntialiased(true);

      if ( SVGDocument.defaultFont == null ) {
        SVGDocument doc = loadSVG( getClass().getResourceAsStream("/net/xoetrope/optional/svg/tinyline/helvetica_svg"));
        SVGFontElem font = SVGDocument.getFont(doc,SVG.VAL_DEFAULT_FONTFAMILY);
        SVGDocument.defaultFont = font;
      }
    }
  }
View Full Code Here

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

public class TestSVGCircleElement extends AbstractTestSVGElement {
  @Override
  @Before
  public void setUp() {
    doc = new SVGDocument();
        node = (SVGElement)doc.createElement(SVGElements.SVG_CIRCLE);
  }
View Full Code Here

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

  protected SVGDocument doc;


  @Before
  public void setUp() {
    doc  = new SVGDocument();
    list = new SVGNodeList();
  }
View Full Code Here

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


  public T saveLoadShape(T sh) {
    IDrawing drawing = ShapeFactory.createDrawing();
    drawing.addShape(sh);
    SVGDocument doc = toSVG(drawing);
    return toLatexdraw(doc);
  }
View Full Code Here

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

    if(drawing==null)
      return null;

    // Creation of the SVG document.
    final List<IShape> shapes  = drawing.getShapes();
    final SVGDocument doc     = new SVGDocument();
    final SVGSVGElement root   = doc.getFirstChild();
    final SVGGElement g     = new SVGGElement(doc);
    final SVGDefsElement defs  = new SVGDefsElement(doc);
    SVGElement elt;

    root.appendChild(defs);
View Full Code Here

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

  protected SVGDocument doc2;


  @Before
  public void setUp() throws MalformedSVGDocument, URISyntaxException, IOException {
    doc1 = new SVGDocument();
    doc2 = new SVGDocument(new URI("src/resources/test/res/test.svg")); //$NON-NLS-1$
  }
View Full Code Here

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

  @SuppressWarnings("unused")
  @Test
  public void testSVGDocument() throws MalformedSVGDocument, URISyntaxException, IOException {
    try {
      new SVGDocument(null);
      fail();
    }
    catch(IllegalArgumentException e){ /* ok */ }

    try {
      new SVGDocument(new URI("dfqsfg")); //$NON-NLS-1$
      fail();
    }
    catch(MalformedSVGDocument e){ /* ok */ }
    catch(FileNotFoundException e){ /* ok */ }

    SVGDocument doc = new SVGDocument(new URI("src/resources/test/res/test.svg")); //$NON-NLS-1$
    assertNotNull(doc.getFirstChild());
    assertNotNull(doc.getLastChild());
  }
View Full Code Here

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

  }


  @Test
  public void testSVGDocument2() {
    SVGDocument doc = new SVGDocument();

    assertNotNull(doc.getFirstChild());
    assertNotNull(doc.getLastChild());
    assertNull(doc.getDocumentURI());
  }
View Full Code Here

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

  }


  @Test
  public void testIsEqualNode() throws MalformedSVGDocument, URISyntaxException, IOException {
    SVGDocument doc = new SVGDocument();
    assertTrue(doc1.isEqualNode(doc));
    assertFalse(doc1.isEqualNode(null));
    assertFalse(doc1.isEqualNode(doc2));
    doc = new SVGDocument(new URI("src/resources/test/res/test.svg")); //$NON-NLS-1$
    assertTrue(doc2.isEqualNode(doc));
    assertFalse(doc2.isEqualNode(null));
    assertFalse(doc2.isEqualNode(doc1));
  }
View Full Code Here

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

  protected SVGDocument doc;


  @Before
  public void setUp() {
    doc = new SVGDocument();
  }
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.