use of net.sf.latexdraw.parsers.svg.path.SVGPathSegCurvetoCubic in project latexdraw by arnobl.
the class SVGPathElement method isBezierCurve.
public boolean isBezierCurve() {
final SVGPathSegList segList = getSegList();
if (segList.isEmpty() || !(segList.get(0) instanceof SVGPathSegMoveto))
return false;
final int size = segList.size() - 1;
boolean ok = true;
int i;
for (i = 1; i < size && ok; i++) if (!(segList.get(i) instanceof SVGPathSegCurvetoCubic) && !(segList.get(i) instanceof SVGPathSegCurvetoCubicSmooth))
ok = false;
return ok && (segList.get(size) instanceof SVGPathSegClosePath || segList.get(size) instanceof SVGPathSegCurvetoCubic || segList.get(size) instanceof SVGPathSegCurvetoCubicSmooth);
}
Aggregations