static Shape onePathToShape(OnePath onePath) { if (onePath == null) null; new Path2D.Float path; Iterator it = onePath.pointIterator(); Pt p = it.next(); path.moveTo(p.x, p.y); while (it.hasNext()) { p = it.next(); path.lineTo(p.x, p.y); } ret path; }