Guest User

Untitled

a guest
Jan 20th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. var group = new Konva.Group({
  2. clipFunc: function (ctx) {
  3. ctx.moveTo(handlesArray[0].attrs['x'], handlesArray[0].attrs['y']);
  4. for (var i = 0; i < handlesArray.length - 2; i += 2) {
  5. ctx.quadraticCurveTo(handlesArray[i + 1].attrs['x'], handlesArray[i + 1].attrs['y'], handlesArray[i + 2].attrs['x'], handlesArray[i + 2].attrs['y']);
  6. }
  7. ctx.lineTo(handlesArray[0].attrs['x'], handlesArray[0].attrs['y']);
  8. ctx.clip();
  9. }
  10. });
Add Comment
Please, Sign In to add comment