Implement CompoundPath#curves.

This commit is contained in:
Jürg Lehni 2012-12-18 14:53:38 +01:00
parent 29a2bc781b
commit 22ddd7a37e

View file

@ -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;
},