mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-07 19:49:09 -04:00
Add #set() function to Point, Rectangle and Size (Matrix has it already).
This commit is contained in:
parent
b03ad9b090
commit
700f4aeb6a
3 changed files with 17 additions and 0 deletions
src/basic
|
@ -46,6 +46,13 @@ Rectangle = Base.extend({
|
|||
}
|
||||
},
|
||||
|
||||
set: function(x, y, width, height) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
},
|
||||
|
||||
getPoint: function() {
|
||||
return new Point(this.x, this.y);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue