Convert a group to a path

71 views
Skip to first unread message

Paulo Silva

unread,
Mar 15, 2023, 6:56:42 PM3/15/23
to Paper.js
Hello all,

Is it possible to convert a (clipped) group to a path?

Referring to the example mentioned in the site, I would like to convert the clipped group of two paths to a new path.

Thanks in advance,

var star = new Path.Star({
    center: view.center,
    points: 6,
    radius1: 20,
    radius2: 40,
    fillColor: 'red'
});

var circle = new Path.Circle({
    center: view.center,
    radius: 25,
    strokeColor: 'black'
});

// Create a group of the two items and clip it:
var group = new Group(circle, star);
group.clipped = true;

Marlus Araujo

unread,
Aug 5, 2023, 2:25:33 PM8/5/23
to Paper.js
Maybe you can use boolean operations
http://paperjs.org/examples/boolean-operations/
Reply all
Reply to author
Forward
0 new messages