| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- function Rectangle() {
- Object.defineProperties(this, {
- 'x': { enumerable: true, configurable: true, get: Rectangle.prototype.__get_x, set: Rectangle.prototype.__set_x},
- 'y': { enumerable: true, configurable: true, get: Rectangle.prototype.__get_y, set: Rectangle.prototype.__set_y},
- 'w': { enumerable: true, configurable: true, get: Rectangle.prototype.__get_w, set: Rectangle.prototype.__set_w},
- 'h': { enumerable: true, configurable: true, get: Rectangle.prototype.__get_h, set: Rectangle.prototype.__set_h}
- })
- }
- Rectangle.prototype.__get_x = function() {
- return Polycode.Rectangle__get_x(this.__ptr)
- }
- Rectangle.prototype.__set_x = function(val) {
- Polycode.Rectangle__set_x(this.__ptr, val)
- }
- Rectangle.prototype.__get_y = function() {
- return Polycode.Rectangle__get_y(this.__ptr)
- }
- Rectangle.prototype.__set_y = function(val) {
- Polycode.Rectangle__set_y(this.__ptr, val)
- }
- Rectangle.prototype.__get_w = function() {
- return Polycode.Rectangle__get_w(this.__ptr)
- }
- Rectangle.prototype.__set_w = function(val) {
- Polycode.Rectangle__set_w(this.__ptr, val)
- }
- Rectangle.prototype.__get_h = function() {
- return Polycode.Rectangle__get_h(this.__ptr)
- }
- Rectangle.prototype.__set_h = function(val) {
- Polycode.Rectangle__set_h(this.__ptr, val)
- }
- Rectangle.prototype.setRect = function(x,y,w,h) {
- Polycode.Rectangle_setRect(this.__ptr, x,y,w,h)
- }
- Rectangle.prototype.Clipped = function(rect) {
- var retVal = new Rectangle()
- retVal.__ptr = Polycode.Rectangle_Clipped(this.__ptr, rect)
- return retVal
- }
- Rectangle.prototype.minX = function() {
- return Polycode.Rectangle_minX(this.__ptr)
- }
- Rectangle.prototype.maxX = function() {
- return Polycode.Rectangle_maxX(this.__ptr)
- }
- Rectangle.prototype.minY = function() {
- return Polycode.Rectangle_minY(this.__ptr)
- }
- Rectangle.prototype.maxY = function() {
- return Polycode.Rectangle_maxY(this.__ptr)
- }
|