Package net.sf.latexdraw.parsers.svg.path

Examples of net.sf.latexdraw.parsers.svg.path.SVGPathSegMoveto


    final IPoint p = shape.getPtAt(0);
    int i;
    final int size = shape.getNbPoints();
    final int interval = shape.getInterval();

    path.add(new SVGPathSegMoveto(p.getX(), p.getY(), false));

    for(i=interval; i<size; i+=interval)
      path.add(new SVGPathSegLineto(shape.getPtAt(i).getX(), shape.getPtAt(i).getY(), false));

    if(i-interval<size)
View Full Code Here


    while(!pi.isDone()) {
      switch(pi.currentSegment(coords)) {
        case PathIterator.SEG_CLOSE  : list.add(new SVGPathSegClosePath()); break;
        case PathIterator.SEG_LINETO: list.add(new SVGPathSegLineto(coords[0], coords[1], false)); break;
        case PathIterator.SEG_MOVETO: list.add(new SVGPathSegMoveto(coords[0], coords[1], false)); break;
        case PathIterator.SEG_CUBICTO: list.add(new SVGPathSegCurvetoCubic(coords[4], coords[5], coords[0], coords[1], coords[2], coords[3], false)); break;
        case PathIterator.SEG_QUADTO: list.add(new SVGPathSegCurvetoQuadratic(coords[2], coords[3], coords[0], coords[1], false)); break;
        default: throw new ParseException("Invalid Path2D element:" + pi.currentSegment(coords), -1);
      }
      pi.next();
View Full Code Here

TOP

Related Classes of net.sf.latexdraw.parsers.svg.path.SVGPathSegMoveto

Copyright © 2018 www.massapicom. 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.