Package net.sf.latexdraw.parsers.svg

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


        for(double k=0; k<subGridDots; k++) {
          dot = new SVGCircleElement(document);
          dot.setAttribute(SVGAttributes.SVG_CX, String.valueOf(m));
          dot.setAttribute(SVGAttributes.SVG_CY, String.valueOf(n+k*dotStep));
          dot.setAttribute(SVGAttributes.SVG_R, String.valueOf(subGridWidth/2.));
          subgridDots.appendChild(dot);
        }

    dot = new SVGCircleElement(document);
    dot.setAttribute(SVGAttributes.SVG_CX, String.valueOf(brx));
    dot.setAttribute(SVGAttributes.SVG_CY, String.valueOf(bry));
View Full Code Here


        line = new SVGLineElement(document);
        line.setAttribute(SVGAttributes.SVG_X1, String.valueOf(i+xSubStep*j));
        line.setAttribute(SVGAttributes.SVG_X2, String.valueOf(i+xSubStep*j));
        line.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(bry));
        line.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(tly));
        subgrids.appendChild(line);
      }

    for(k=minY, i=posY; k<maxY; i-=yStep, k++)
      for(j=0; j<=subGridDiv; j++) {
        line = new SVGLineElement(document);
View Full Code Here

        line = new SVGLineElement(document);
        line.setAttribute(SVGAttributes.SVG_X1, String.valueOf(tlx));
        line.setAttribute(SVGAttributes.SVG_X2, String.valueOf(brx));
        line.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(i-ySubStep*j));
        line.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(i-ySubStep*j));
        subgrids.appendChild(line);
      }

    elt.appendChild(subgrids);
  }

 
View Full Code Here

        for(l=0, j=m; l<gridDots; l++, j+=dotStep) {
          dot = new SVGCircleElement(document);
          dot.setAttribute(SVGAttributes.SVG_CX, String.valueOf(i));
          dot.setAttribute(SVGAttributes.SVG_CY, String.valueOf(j));
          dot.setAttribute(SVGAttributes.SVG_R, String.valueOf(gridWidth/2.));
          gridDotsElt.appendChild(dot);
        }

    for(k=minY, i=posY; k<=maxY; i-=yStep, k++)
      for(m=tlx, n=minX; n<maxX; n++, m+=absStep)
        for(l=0, j=m; l<gridDots; l++, j+=dotStep) {
View Full Code Here

        for(l=0, j=m; l<gridDots; l++, j+=dotStep) {
          dot = new SVGCircleElement(document);
          dot.setAttribute(SVGAttributes.SVG_CX, String.valueOf(j));
          dot.setAttribute(SVGAttributes.SVG_CY, String.valueOf(i));
          dot.setAttribute(SVGAttributes.SVG_R, String.valueOf(gridWidth/2.));
          gridDotsElt.appendChild(dot);
        }

    dot = new SVGCircleElement(document);
    dot.setAttribute(SVGAttributes.SVG_CX, String.valueOf(brx));
    dot.setAttribute(SVGAttributes.SVG_CY, String.valueOf(bry));
View Full Code Here

    dot = new SVGCircleElement(document);
    dot.setAttribute(SVGAttributes.SVG_CX, String.valueOf(brx));
    dot.setAttribute(SVGAttributes.SVG_CY, String.valueOf(bry));
    dot.setAttribute(SVGAttributes.SVG_R, String.valueOf(gridWidth/2.));
    gridDotsElt.appendChild(dot);

    elt.appendChild(gridDotsElt);
  }

View Full Code Here

      line = new SVGLineElement(document);
      line.setAttribute(SVGAttributes.SVG_X1, String.valueOf(i));
      line.setAttribute(SVGAttributes.SVG_X2, String.valueOf(i));
      line.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(bry));
      line.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(tly));
      grids.appendChild(line);
    }

    for(k=minY, i=posY; k<=maxY; i-=yStep, k++) {
      line = new SVGLineElement(document);
      line.setAttribute(SVGAttributes.SVG_X1, String.valueOf(tlx));
View Full Code Here

      line = new SVGLineElement(document);
      line.setAttribute(SVGAttributes.SVG_X1, String.valueOf(tlx));
      line.setAttribute(SVGAttributes.SVG_X2, String.valueOf(brx));
      line.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(i));
      line.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(i));
      grids.appendChild(line);
    }

    elt.appendChild(grids);
  }
View Full Code Here

    for(i=tlx + (isYLabelWest ? width+gridLabelsSize/4. : -width-labelWidth-gridLabelsSize/4.), j=minX; j<=maxX; i+=absStep, j++) {
      text = new SVGTextElement(document);
      text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)i));
      text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(yorigin+tmp)));
      text.setTextContent(String.valueOf((int)j));
      texts.appendChild(text);
    }

    if(isYLabelWest)
      for(i=tly + (isXLabelSouth ? -width-gridLabelsSize/4. : width+labelHeight), j=maxY ; j>=minY; i+=absStep, j--) {
        label = String.valueOf((int)j);
View Full Code Here

        label = String.valueOf((int)j);
        text = new SVGTextElement(document);
        text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)(xorigin-fontMetrics.stringWidth(label)-gridLabelsSize/4.-width)));
        text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)i));
        text.setTextContent(label);
        texts.appendChild(text);
      }
    else
      for(i=tly + (isXLabelSouth ? -width-gridLabelsSize/4. : width+labelHeight), j=maxY; j>=minY; i+=absStep, j--) {
        label = String.valueOf((int)j);
        text = new SVGTextElement(document);
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.