Skip to content

Instantly share code, notes, and snippets.

@cdoger
Last active December 21, 2015 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdoger/6335493 to your computer and use it in GitHub Desktop.
Save cdoger/6335493 to your computer and use it in GitHub Desktop.
iterator = curveHolder.curves.iterator(); // This iterator is a Iterator<BezierCurve>
paths.reset(); // Don't forget to reset the paths
first = true;
for (;iterator.hasNext();) {
curve = iterator.next();
if (first) {
first = false;
paths.moveTo(curve.point1.x, curve.point1.y);
}
paths.quadTo(curve.controlPoint.x, curve.controlPoint.y,
curve.point2.x, curve.point2.y);
}
canvas.drawPath(paths, paint);
canvas.clipPath(paths);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment