GraphicalRectangle.ts 758 B

123456789101112131415
  1. import {OutlineAndFillStyleEnum} from "./DrawingEnums";
  2. import {BoundingBox} from "./BoundingBox";
  3. import {PointF2D} from "../../Common/DataObjects/PointF2D";
  4. import {GraphicalObject} from "./GraphicalObject";
  5. export class GraphicalRectangle extends GraphicalObject {
  6. constructor(upperLeftPoint: PointF2D, lowerRightPoint: PointF2D, parent: BoundingBox, style: OutlineAndFillStyleEnum) {
  7. super();
  8. this.boundingBox = new BoundingBox(parent);
  9. this.boundingBox.RelativePosition = upperLeftPoint;
  10. this.boundingBox.BorderRight = lowerRightPoint.x - upperLeftPoint.x;
  11. this.boundingBox.BorderBottom = lowerRightPoint.y - upperLeftPoint.y;
  12. this.style = style;
  13. }
  14. public style: OutlineAndFillStyleEnum;
  15. }