Examples of SVGDocument


Examples of org.vectomatic.dom.svg.impl.SVGDocument

   * Creates a new empty SVG document
   * @return
   * a new empty SVG document
   */
  public static final OMSVGDocument createDocument() {
    SVGDocument doc = DOMHelper.createDocument(SVGConstants.SVG_NAMESPACE_URI, SVGConstants.SVG_SVG_TAG).cast();
      return OMNode.convert(doc);
  }
View Full Code Here

Examples of org.w3c.dom.svg.SVGDocument

    * Return the image as a SVG string
    * */
    public String generateSVGString() {
         try {
            StringWriter writer = new StringWriter();
            SVGDocument svgDoc = getRootActivity().getSVGDocument();
             this.svgDoc = svgDoc;
           
            DOMUtilities.writeDocument(svgDoc, writer);
            writer.close();
             svgStr = writer.toString();
View Full Code Here

Examples of org.w3c.dom.svg.SVGDocument

     
      SVGDocumentFactory documentFactory =
        new SAXSVGDocumentFactory(userAgent.getXMLParserClassName(), true);
      documentFactory.setValidating(userAgent.isXMLParserValidating());

      SVGDocument document;
      if (svgText != null)
      {
        document = documentFactory.createSVGDocument(null,
            new StringReader(svgText));
      }
View Full Code Here

Examples of org.w3c.dom.svg.SVGDocument

                if (svgUserAgent != null) {
                    String oldURI = svgDocument.getURL();
                    ParsedURL newURI = null;
                    // if the anchor element is in an external resource
                    if (elt.getOwnerDocument() != svgDocument) {
                        SVGDocument doc = (SVGDocument)elt.getOwnerDocument();
                        href = new ParsedURL(doc.getURL(), href).toString();
                    }
                    newURI = new ParsedURL(oldURI, href);
                    href = newURI.toString();
                    svgUserAgent.openLink(href, true);
                } else {
View Full Code Here

Examples of org.w3c.dom.svg.SVGDocument

     * Runs this loader.
     */
    public void run() {
        try {
            fireStartedEvent();
            SVGDocument svgDocument = (SVGDocument)loader.loadDocument(url);
            fireCompletedEvent(svgDocument);
        } catch (InterruptedIOException e) {
            fireCancelledEvent();
        } catch (Exception e) {
            exception = e;
View Full Code Here

Examples of org.w3c.dom.svg.SVGDocument

                                                        filterRegion,
                                                        ctx);

        Filter filter = null;
        // try to load the image as an svg document
        SVGDocument svgDoc = (SVGDocument)filterElement.getOwnerDocument();
        ParsedURL purl;
        URL baseURL = ((SVGOMDocument)svgDoc).getURLObject();
        if (baseURL != null)
            purl = new ParsedURL(baseURL.toString(), uriStr);
        else
View Full Code Here

Examples of org.w3c.dom.svg.SVGDocument

        if (!(document instanceof SVGOMDocument)) {
            throw new TranscoderException(Messages.formatMessage("notsvg",
                    null));
        }
        SVGDocument svgDoc = (SVGDocument)document;
        SVGSVGElement root = svgDoc.getRootElement();
        // initialize the SVG document with the appropriate context
        String parserClassname = (String)hints.get(KEY_XML_PARSER_CLASSNAME);
        DefaultSVGContext svgCtx = new DefaultSVGContext();
        svgCtx.setPixelToMM(userAgent.getPixelToMM());
        ((SVGOMDocument)document).setSVGContext(svgCtx);
View Full Code Here

Examples of org.w3c.dom.svg.SVGDocument

        if (n != -1) {
            uri = uri.substring(0, n);
        }
        DocumentState state = (DocumentState)cacheMap.get(uri);
        if (state == null) {
            SVGDocument document = documentFactory.createSVGDocument(uri);
            if (bridgeContext != null) {
                bridgeContext.initializeDocument(document);
            }

            DocumentDescriptor desc = documentFactory.getDocumentDescriptor();
View Full Code Here

Examples of org.w3c.dom.svg.SVGDocument

        // In some cases we converted document fragments which didn't
        // have a parent SVG element, this check makes sure only the
        // real root of the SVG Document tries to do negotiation with
        // the UA.
        SVGDocument doc = (SVGDocument)((SVGElement)e).getOwnerDocument();
        boolean isOutermost = (doc.getRootElement() == e);
        float x = 0;
        float y = 0;
        // x and y have no meaning on the outermost 'svg' element
        if (!isOutermost) {
            // 'x' attribute - default is 0
View Full Code Here

Examples of org.w3c.dom.svg.SVGDocument

        String uriStr = purl.toString();
        Dimension cursorSize = null;

        // Try to load as an SVG Document
        DocumentLoader loader = (DocumentLoader)ctx.getDocumentLoader();
        SVGDocument svgDoc = (SVGDocument)cursorElement.getOwnerDocument();
        URIResolver resolver = new URIResolver(svgDoc, loader);
        try {
            Element rootElement = null;
            Node n = resolver.getNode(uriStr, cursorElement);
            if (n.getNodeType() == n.DOCUMENT_NODE) {
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.