mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-17 18:29:55 -04:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
fb547a758f
2 changed files with 23 additions and 23 deletions
|
@ -135,27 +135,27 @@ var Rectangle = this.Rectangle = Base.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
getTopLeft: function() {
|
getTopLeft: function() {
|
||||||
return Point.create(this.left, this.top);
|
return Point.create(this.getLeft(), this.getTop());
|
||||||
},
|
},
|
||||||
|
|
||||||
setTopLeft: function() {
|
setTopLeft: function() {
|
||||||
var topLeft = Point.read(arguments);
|
var topLeft = Point.read(arguments);
|
||||||
this.left = topLeft.x;
|
this.setLeft(topLeft.x);
|
||||||
this.top = topLeft.y;
|
this.setTop(topLeft.y);
|
||||||
},
|
},
|
||||||
|
|
||||||
getTopRight: function() {
|
getTopRight: function() {
|
||||||
return Point.create(this.right, this.top);
|
return Point.create(this.getRight(), this.getTop());
|
||||||
},
|
},
|
||||||
|
|
||||||
setTopRight: function() {
|
setTopRight: function() {
|
||||||
var topRight = Point.read(arguments);
|
var topRight = Point.read(arguments);
|
||||||
this.right = topRight.x;
|
this.setRight(topRight.x);
|
||||||
this.top = topRight.y;
|
this.setTop(topRight.y);
|
||||||
},
|
},
|
||||||
|
|
||||||
getBottomLeft: function() {
|
getBottomLeft: function() {
|
||||||
return Point.create(this.left, this.bottom);
|
return Point.create(this.getLeft(), this.getBottom());
|
||||||
},
|
},
|
||||||
|
|
||||||
setBottomLeft: function() {
|
setBottomLeft: function() {
|
||||||
|
@ -165,53 +165,53 @@ var Rectangle = this.Rectangle = Base.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
getBottomRight: function() {
|
getBottomRight: function() {
|
||||||
return Point.create(this.right, this.bottom);
|
return Point.create(this.getRight(), this.getBottom());
|
||||||
},
|
},
|
||||||
|
|
||||||
setBottomRight: function() {
|
setBottomRight: function() {
|
||||||
var bottomRight = Point.read(arguments);
|
var bottomRight = Point.read(arguments);
|
||||||
this.bottom = bottomRight.y;
|
this.setBottom(bottomRight.y);
|
||||||
this.right = bottomRight.x;
|
this.setRight(bottomRight.x);
|
||||||
},
|
},
|
||||||
|
|
||||||
getLeftCenter: function() {
|
getLeftCenter: function() {
|
||||||
return Point.create(this.left, this.centerY);
|
return Point.create(this.getLeft(), this.getCenterY());
|
||||||
},
|
},
|
||||||
|
|
||||||
setLeftCenter: function() {
|
setLeftCenter: function() {
|
||||||
var leftCenter = Point.read(arguments);
|
var leftCenter = Point.read(arguments);
|
||||||
this.left = leftCenter.x;
|
this.setLeft(leftCenter.x);
|
||||||
this.centerY = leftCenter.y;
|
this.setCenterY(leftCenter.y);
|
||||||
},
|
},
|
||||||
|
|
||||||
getTopCenter: function() {
|
getTopCenter: function() {
|
||||||
return Point.create(this.centerX, this.top);
|
return Point.create(this.getCenterX(), this.getTop());
|
||||||
},
|
},
|
||||||
|
|
||||||
setTopCenter: function() {
|
setTopCenter: function() {
|
||||||
var topCenter = Point.read(arguments);
|
var topCenter = Point.read(arguments);
|
||||||
this.centerX = topCenter.x;
|
this.setCenterX(topCenter.x);
|
||||||
this.top = topCenter.y;
|
this.setTop(topCenter.y);
|
||||||
},
|
},
|
||||||
|
|
||||||
getRightCenter: function() {
|
getRightCenter: function() {
|
||||||
return Point.create(this.right, this.centerY);
|
return Point.create(this.getRight(), this.getCenterY());
|
||||||
},
|
},
|
||||||
|
|
||||||
setRightCenter: function() {
|
setRightCenter: function() {
|
||||||
var rightCenter = Point.read(arguments);
|
var rightCenter = Point.read(arguments);
|
||||||
this.right = rightCenter.x;
|
this.setRight(rightCenter.x);
|
||||||
this.centerY = rightCenter.y;
|
this.setCenterY(rightCenter.y);
|
||||||
},
|
},
|
||||||
|
|
||||||
getBottomCenter: function() {
|
getBottomCenter: function() {
|
||||||
return Point.create(this.centerX, this.bottom);
|
return Point.create(this.getCenterX(), this.getBottom());
|
||||||
},
|
},
|
||||||
|
|
||||||
setBottomCenter: function() {
|
setBottomCenter: function() {
|
||||||
var bottomCenter = Point.read(arguments);
|
var bottomCenter = Point.read(arguments);
|
||||||
this.bottom = bottomCenter.y;
|
this.setBottom(bottomCenter.y);
|
||||||
this.centerX = bottomCenter.x;
|
this.setCenterX(bottomCenter.x);
|
||||||
},
|
},
|
||||||
|
|
||||||
clone: function() {
|
clone: function() {
|
||||||
|
|
|
@ -33,6 +33,6 @@ var Color = this.Color = Base.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
getCanvasStyle: function() {
|
getCanvasStyle: function() {
|
||||||
return this.cssString;
|
return this._cssString;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue