public SVGPathSegCurvetoCubicItem(SVGPathSeg pathSeg){ this.type = pathSeg.getPathSegType(); switch(type){ case SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS: letter = PATHSEG_CURVETO_CUBIC_ABS_LETTER; setX(((SVGPathSegCurvetoCubicAbs)pathSeg).getX()); setY(((SVGPathSegCurvetoCubicAbs)pathSeg).getY()); setX1(((SVGPathSegCurvetoCubicAbs)pathSeg).getX1()); setY1(((SVGPathSegCurvetoCubicAbs)pathSeg).getY1()); setX2(((SVGPathSegCurvetoCubicAbs)pathSeg).getX2()); setY2(((SVGPathSegCurvetoCubicAbs)pathSeg).getY2()); break; case SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL: letter = PATHSEG_CURVETO_CUBIC_REL_LETTER; setX(((SVGPathSegCurvetoCubicRel)pathSeg).getX()); setY(((SVGPathSegCurvetoCubicRel)pathSeg).getY()); setX1(((SVGPathSegCurvetoCubicRel)pathSeg).getX1()); setY1(((SVGPathSegCurvetoCubicRel)pathSeg).getY1()); setX2(((SVGPathSegCurvetoCubicRel)pathSeg).getX2()); setY2(((SVGPathSegCurvetoCubicRel)pathSeg).getY2()); break; default: } }
public SVGPathSegCurvetoCubicItem(SVGPathSeg pathSeg){ this.type = pathSeg.getPathSegType(); switch(type){ case SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS: letter = PATHSEG_CURVETO_CUBIC_ABS_LETTER; setX(((SVGPathSegCurvetoCubicAbs)pathSeg).getX()); setY(((SVGPathSegCurvetoCubicAbs)pathSeg).getY()); setX1(((SVGPathSegCurvetoCubicAbs)pathSeg).getX1()); setY1(((SVGPathSegCurvetoCubicAbs)pathSeg).getY1()); setX2(((SVGPathSegCurvetoCubicAbs)pathSeg).getX2()); setY2(((SVGPathSegCurvetoCubicAbs)pathSeg).getY2()); break; case SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL: letter = PATHSEG_CURVETO_CUBIC_REL_LETTER; setX(((SVGPathSegCurvetoCubicRel)pathSeg).getX()); setY(((SVGPathSegCurvetoCubicRel)pathSeg).getY()); setX1(((SVGPathSegCurvetoCubicRel)pathSeg).getX1()); setY1(((SVGPathSegCurvetoCubicRel)pathSeg).getY1()); setX2(((SVGPathSegCurvetoCubicRel)pathSeg).getX2()); setY2(((SVGPathSegCurvetoCubicRel)pathSeg).getY2()); break; default: } }
double x0=( path.getX1() - imageCenterX ) * scale; double y0=( path.getY1() - imageCenterY ) * -scale; double x1=( path.getX2() - imageCenterX ) * scale; double y1=( path.getY2() - imageCenterY ) * -scale; double x2=( path.getX() - imageCenterX ) * scale; double y2=( path.getY() - imageCenterY ) * -scale;