RectangleF2D.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. "use strict";
  2. var SizeF2D_1 = require("./SizeF2D");
  3. var PointF2D_1 = require("./PointF2D");
  4. var RectangleF2D = (function () {
  5. function RectangleF2D(x, y, width, height) {
  6. this.x = 0;
  7. this.y = 0;
  8. this.width = 0;
  9. this.height = 0;
  10. this.x = x;
  11. this.y = y;
  12. this.width = width;
  13. this.height = height;
  14. }
  15. RectangleF2D.createFromLocationAndSize = function (location, size) {
  16. return new RectangleF2D(location.x, location.y, size.width, size.height);
  17. };
  18. Object.defineProperty(RectangleF2D.prototype, "Location", {
  19. get: function () {
  20. return new PointF2D_1.PointF2D(this.x, this.y);
  21. },
  22. enumerable: true,
  23. configurable: true
  24. });
  25. Object.defineProperty(RectangleF2D.prototype, "Size", {
  26. get: function () {
  27. return new SizeF2D_1.SizeF2D(this.width, this.height);
  28. },
  29. enumerable: true,
  30. configurable: true
  31. });
  32. return RectangleF2D;
  33. }());
  34. exports.RectangleF2D = RectangleF2D;