Examples of SVGElement


Examples of at.bestsolution.efxclipse.formats.svg.svg.SvgElement

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetResolvedInstance(SvgElement newResolvedInstance, NotificationChain msgs) {
    SvgElement oldResolvedInstance = resolvedInstance;
    resolvedInstance = newResolvedInstance;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SvgPackage.SVG_TREF_ELEMENT__RESOLVED_INSTANCE, oldResolvedInstance, newResolvedInstance);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

Examples of com.adobe.dp.epub.ops.SVGElement

            + " of the first chapter's first paragraph. ");
      paragraph1.add(sb1.toString());
      body1.add(paragraph1);

      // add SVG graphics area
      SVGElement svg = chapter1Doc.createSVGElement("svg");
      svg.setAttribute("viewBox", "0 0 400 200");
      svg.setClassName("svgimage");
      body1.add(svg);

      // draw background
      SVGElement bg = chapter1Doc.createSVGElement("rect");
      bg.setAttribute("x", "1");
      bg.setAttribute("y", "1");
      bg.setAttribute("width", "398");
      bg.setAttribute("height", "198");
      bg.setAttribute("stroke", "black");
      bg.setAttribute("stroke-width", "2");
      bg.setAttribute("fill", "#FFF8EE");
      svg.add(bg);

      // draw a shape
      SVGElement path = chapter1Doc.createSVGElement("path");
      path.setAttribute("fill", "none");
      path.setAttribute("stroke", "black");
      path.setAttribute("stroke-width", "4");
      String resistorPath = "M90 120h50l10 20l20-40l20 40l20-40l20 40l20-40l20 40l20-40l20 40l10-20h50";
      path.setAttribute("d", resistorPath);
      svg.add(path);

      // draw a label
      SVGElement label1 = chapter1Doc.createSVGElement("text");
      label1.setClassName("label1");
      label1.setAttribute("x", "150");
      label1.setAttribute("y", "60");
      label1.add("R = 30\u03A9");
      svg.add(label1);

      // draw rotated label
      SVGElement label2 = chapter1Doc.createSVGElement("text");
      label2.setClassName("label2");
      label2.setAttribute("transform", "translate(40 110)rotate(-75)");
      SVGElement t1 = chapter1Doc.createSVGElement("tspan");
      t1.setAttribute("fill", "red");
      t1.add("S");
      label2.add(t1);
      SVGElement t2 = chapter1Doc.createSVGElement("tspan");
      t2.setAttribute("fill", "green");
      t2.add("V");
      label2.add(t2);
      SVGElement t3 = chapter1Doc.createSVGElement("tspan");
      t3.setAttribute("fill", "blue");
      t3.add("G");
      label2.add(t3);
      svg.add(label2);

      // create a small paragraph to use as a link target
      Element target = chapter1Doc.createElement("p");
View Full Code Here

Examples of com.kitfox.svg.SVGElement

     
     
      //diagram.getRoot().getChild(1);
      for(int i = 0; i < diagram.getRoot().getNumChildren();i++){
       
        SVGElement element  = diagram.getRoot().getChild(i);
      //SVGElement element = diagram.getElement("shape_01");
      if(element != null){
      List vector = element.getPath(null);
      com.kitfox.svg.Path pathSVG = (com.kitfox.svg.Path) vector.get(1)
      Shape shape = pathSVG.getShape();
      this.sketchShapes.buildPathsFromAWTShape(shape);
      }
      }
View Full Code Here

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

  }


  @Test
  public void testItem() {
    SVGElement elt = (SVGElement)doc.createElement("elt"); //$NON-NLS-1$

    list.getNodes().clear();
    assertNull(list.item(0));
    assertNull(list.item(-1));
    assertNull(list.item(1));
View Full Code Here

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

    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);
    root.appendChild(g);
    root.setAttribute("xmlns:"+LNamespace.LATEXDRAW_NAMESPACE, LNamespace.LATEXDRAW_NAMESPACE_URI);//$NON-NLS-1$
View Full Code Here

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

      doc1.createElement(null);
      fail();
    }
    catch(DOMException e) { /* ok */ }

    SVGElement elt = (SVGElement)doc1.createElement("test"); //$NON-NLS-1$
    assertEquals(elt.getNodeName(), "test"); //$NON-NLS-1$
    assertEquals(doc1, elt.getOwnerDocument());
  }
View Full Code Here

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

  }


  @Test
  public void testSetParent() {
    SVGElement elt = (SVGElement)doc.createElement("elt"); //$NON-NLS-1$

    node.setParent(null);
    assertNull(node.getParent());
    node.setParent(elt);
    assertEquals(elt, node.getParent());
    SVGNodeList list = elt.getChildren(getNameNode());
    assertEquals(1, list.getLength());
    node.setParent(null);
    list = elt.getChildren(getNameNode());
    assertEquals(0, list.getLength());
  }
View Full Code Here

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

      fail();
    }
    catch(DOMException e) { /* ok */ }


    SVGElement elt = (SVGElement)doc.createElement("eltAppendChild"); //$NON-NLS-1$
    assertEquals(node.appendChild(elt), elt);
    assertEquals(node.getChildren("eltAppendChild").getLength(), 1); //$NON-NLS-1$
  }
View Full Code Here

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


  @Test
  public void testGetNamespaceURI() {
    SVGAttr attr   = new SVGAttr("pref:n", "", node); //$NON-NLS-1$ //$NON-NLS-2$
    SVGElement elt = (SVGElement)node.getOwnerDocument().createElement("tag2"); //$NON-NLS-1$

    assertNull(attr.getNamespaceURI());
    elt.setAttribute("xmlns:pref", "namespace"); //$NON-NLS-1$ //$NON-NLS-2$
    elt.appendChild(node);
    assertEquals(attr.getNamespaceURI(), "namespace"); //$NON-NLS-1$
  }
View Full Code Here

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


  @Test
  public void testLookupNamespaceURI() {
    SVGAttr attr   = new SVGAttr("pref:n", "", node); //$NON-NLS-1$ //$NON-NLS-2$
    SVGElement elt = (SVGElement)node.getOwnerDocument().createElement("tag2"); //$NON-NLS-1$

    assertNull(attr.getNamespaceURI());
    elt.setAttribute("xmlns:pref", "namespace"); //$NON-NLS-1$ //$NON-NLS-2$
    elt.appendChild(node);
    assertEquals(attr.getNamespaceURI(), "namespace"); //$NON-NLS-1$
  }
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.