mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-13 16:33:28 -04:00
Implement CompoundPath#curves.
This commit is contained in:
parent
29a2bc781b
commit
22ddd7a37e
1 changed files with 14 additions and 0 deletions
|
@ -87,6 +87,20 @@ var CompoundPath = this.CompoundPath = PathItem.extend(/** @lends CompoundPath#
|
|||
this._children[i].smooth();
|
||||
},
|
||||
|
||||
/**
|
||||
* All the curves contained within the compound-path, from all its child
|
||||
* {@link Path} items.
|
||||
*
|
||||
* @type Curve[]
|
||||
* @bean
|
||||
*/
|
||||
getCurves: function() {
|
||||
var curves = [];
|
||||
for (var i = 0, l = this._children.length; i < l; i++)
|
||||
curves = curves.concat(this._children[i].getCurves());
|
||||
return curves;
|
||||
},
|
||||
|
||||
isEmpty: function() {
|
||||
return this._children.length == 0;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue