mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Define Path#toShape() and Shape#toPath() as aliases to #clone().
This commit is contained in:
parent
8639051081
commit
e8390a76d8
3 changed files with 4 additions and 1 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*
|
||||
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||
* http://paperjs.org/
|
||||
|
|
|
@ -186,6 +186,8 @@ var Shape = Item.extend(/** @lends Shape# */{
|
|||
return path;
|
||||
},
|
||||
|
||||
toShape: '#clone',
|
||||
|
||||
_draw: function(ctx, param, strokeMatrix) {
|
||||
var style = this._style,
|
||||
hasFill = style.hasFill(),
|
||||
|
|
|
@ -1522,6 +1522,8 @@ var Path = PathItem.extend(/** @lends Path# */{
|
|||
return null;
|
||||
},
|
||||
|
||||
toPath: '#clone',
|
||||
|
||||
_hitTestSelf: function(point, options) {
|
||||
var that = this,
|
||||
style = this.getStyle(),
|
||||
|
|
Loading…
Reference in a new issue