Package net.sf.latexdraw.parsers.svg

Examples of net.sf.latexdraw.parsers.svg.SVGGElement.appendChild()


        if(shape.hasShadow())  {
          final SVGElement shad = new SVGPathElement(doc);

          shad.setAttribute(SVGAttributes.SVG_D, path.toString());
          setSVGShadowAttributes(shad, true);
          root.appendChild(shad);
          setSVGArrow(shape, shad, 0, true, doc, defs);
      setSVGArrow(shape, shad, 1, true, doc, defs);
        }

        // The background of the borders must be filled is there is a shadow.
View Full Code Here


            setSVGBorderBackground(elt, root);
        }

        elt = new SVGPathElement(doc);
        elt.setAttribute(SVGAttributes.SVG_D, path.toString());
        root.appendChild(elt);

        if(shape.hasDbleBord()) {
            final SVGElement dble = new SVGPathElement(doc);
            dble.setAttribute(SVGAttributes.SVG_D, path.toString());
          setSVGDoubleBordersAttributes(dble);
View Full Code Here

        if(shape.hasDbleBord()) {
            final SVGElement dble = new SVGPathElement(doc);
            dble.setAttribute(SVGAttributes.SVG_D, path.toString());
          setSVGDoubleBordersAttributes(dble);
          root.appendChild(dble);
        }

        setSVGRotationAttribute(root);
        setSVGAttributes(doc, elt, true);
        elt.setAttribute(LNamespace.LATEXDRAW_NAMESPACE +':'+ LNamespace.XML_ROTATION, String.valueOf(rotationAngle));
View Full Code Here

    setSVGArrow(shape, elt, 0, false, doc, defs);
    setSVGArrow(shape, elt, 1, false, doc, defs);

        if(shape.isShowPts())
          root.appendChild(getShowPointsElement(doc));

        return root;
  }

View Full Code Here

    final SVGGElement showPts = new SVGGElement(doc);
    final double thickness  = shape.getThickness()/2.;

    showPts.setAttribute(LNamespace.LATEXDRAW_NAMESPACE + ':' + LNamespace.XML_TYPE, LNamespace.XML_TYPE_SHOW_PTS);

    showPts.appendChild(getShowPointsLine(doc, thickness, shape.getLineColour(), shape.getGravityCentre(),
        shape.getStartPoint(), shape.getDashSepBlack(), shape.getDashSepWhite(), false, 1, 0));
    showPts.appendChild(getShowPointsLine(doc, thickness, shape.getLineColour(), shape.getGravityCentre(),
        shape.getEndPoint(), shape.getDashSepBlack(), shape.getDashSepWhite(), false, 1, 0));

    return showPts;
View Full Code Here

    showPts.setAttribute(LNamespace.LATEXDRAW_NAMESPACE + ':' + LNamespace.XML_TYPE, LNamespace.XML_TYPE_SHOW_PTS);

    showPts.appendChild(getShowPointsLine(doc, thickness, shape.getLineColour(), shape.getGravityCentre(),
        shape.getStartPoint(), shape.getDashSepBlack(), shape.getDashSepWhite(), false, 1, 0));
    showPts.appendChild(getShowPointsLine(doc, thickness, shape.getLineColour(), shape.getGravityCentre(),
        shape.getEndPoint(), shape.getDashSepBlack(), shape.getDashSepWhite(), false, 1, 0));

    return showPts;
  }
}
View Full Code Here

         if(shape.hasShadow()) {
           final SVGElement shad = new SVGPathElement(doc);

      shad.setAttribute(SVGAttributes.SVG_D, path);
      setSVGShadowAttributes(shad, false);
      root.appendChild(shad);

      if(!shape.isClosed()) {
        setSVGArrow(shape, shad, 0, true, doc, defs);
        setSVGArrow(shape, shad, 1, true, doc, defs);
      }
View Full Code Here

        setSVGBorderBackground(elt, root);
        }

    elt = new SVGPathElement(doc);
    elt.setAttribute(SVGAttributes.SVG_D, path);
    root.appendChild(elt);

    if(shape.hasDbleBord()) {
      final SVGElement dblBord = new SVGPathElement(doc);
      dblBord.setAttribute(SVGAttributes.SVG_D, path);
      setSVGDoubleBordersAttributes(dblBord);
View Full Code Here

    if(shape.hasDbleBord()) {
      final SVGElement dblBord = new SVGPathElement(doc);
      dblBord.setAttribute(SVGAttributes.SVG_D, path);
      setSVGDoubleBordersAttributes(dblBord);
      root.appendChild(dblBord);
    }

    setSVGAttributes(doc, elt, false);
    elt.setAttribute(LNamespace.LATEXDRAW_NAMESPACE +':'+ LNamespace.XML_ROTATION, String.valueOf(shape.getRotationAngle()));
View Full Code Here

      setSVGArrow(shape, elt, 0, false, doc, defs);
      setSVGArrow(shape, elt, 1, false, doc, defs);
    }

    if(shape.isShowPts())
      root.appendChild(getShowPointsElement(doc));

    return root;
  }

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.