Improve documentation of PathItem#getArea() and PathItem#isClockwise()

This commit is contained in:
Jürg Lehni 2016-07-21 15:30:31 +02:00
parent a0417040f8
commit baf58fb021
2 changed files with 11 additions and 4 deletions

View file

@ -240,8 +240,10 @@ var CompoundPath = PathItem.extend(/** @lends CompoundPath# */{
}, },
/** /**
* The area that the path's geometry is covering. Self-intersecting paths * The area that the compound-path's geometry is covering, calculated by
* can contain sub-areas that cancel each other out. * getting th e{@link Path#getArea()} of each sub-path and it adding up.
* Note that self-intersecting paths and sub-paths of different orientation
* can result in areas that cancel each other out.
* *
* @bean * @bean
* @type Number * @type Number
@ -256,7 +258,7 @@ var CompoundPath = PathItem.extend(/** @lends CompoundPath# */{
/** /**
* The total length of all sub-paths in this compound-path, calculated by * The total length of all sub-paths in this compound-path, calculated by
* getting {@link Path#getLength()} of each sub-path and it adding up. * getting the {@link Path#getLength()} of each sub-path and it adding up.
* *
* @bean * @bean
* @type Number * @type Number

View file

@ -91,10 +91,15 @@ var PathItem = Item.extend(/** @lends PathItem# */{
}, },
/** /**
* Specifies whether the path is oriented clock-wise. * Specifies whether the path as a whole is oriented clock-wise, by looking
* at the path's area.
* Note that self-intersecting paths and sub-paths of different orientation
* can result in areas that cancel each other out.
* *
* @bean * @bean
* @type Boolean * @type Boolean
* @see Path#getArea()
* @see CompoundPath#getArea()
*/ */
isClockwise: function() { isClockwise: function() {
return this.getArea() >= 0; return this.getArea() >= 0;