switch(type){
case PathIterator.SEG_MOVETO:
p.moveTo(points[j], points[j + 1]);
break;
case PathIterator.SEG_LINETO:
p.lineTo(points[j], points[j + 1]);
break;
case PathIterator.SEG_QUADTO:
p.quadTo(points[j], points[j + 1], points[j + 2], points[j + 3]);
break;
case PathIterator.SEG_CUBICTO: