Creates a Rectangle object.
Parameters:
-
object:
Object
— an object containing properties to be set on the
rectangle
Example — Create a rectangle between {x: 20, y: 20} and {x: 80, y:80}
var rectangle = new Rectangle({
point: [20, 20],
size: [60, 60]
});
Example — Create a rectangle between {x: 20, y: 20} and {x: 80, y:80}
var rectangle = new Rectangle({
from: [20, 20],
to: [80, 80]
});