BoundingBox.d.ts 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import { PointF2D } from "../../Common/DataObjects/PointF2D";
  2. import { SizeF2D } from "../../Common/DataObjects/SizeF2D";
  3. import { RectangleF2D } from "../../Common/DataObjects/RectangleF2D";
  4. export declare class BoundingBox {
  5. protected isSymbol: boolean;
  6. protected relativePositionHasBeenSet: boolean;
  7. protected xBordersHaveBeenSet: boolean;
  8. protected yBordersHaveBeenSet: boolean;
  9. protected absolutePosition: PointF2D;
  10. protected relativePosition: PointF2D;
  11. protected size: SizeF2D;
  12. protected marginSize: SizeF2D;
  13. protected upperLeftCorner: PointF2D;
  14. protected upperLeftMarginCorner: PointF2D;
  15. protected borderLeft: number;
  16. protected borderRight: number;
  17. protected borderTop: number;
  18. protected borderBottom: number;
  19. protected borderMarginLeft: number;
  20. protected borderMarginRight: number;
  21. protected borderMarginTop: number;
  22. protected borderMarginBottom: number;
  23. protected boundingRectangle: RectangleF2D;
  24. protected boundingMarginRectangle: RectangleF2D;
  25. protected childElements: BoundingBox[];
  26. protected parent: BoundingBox;
  27. protected dataObject: Object;
  28. constructor(dataObject?: Object, parent?: BoundingBox);
  29. RelativePositionHasBeenSet: boolean;
  30. XBordersHaveBeenSet: boolean;
  31. YBordersHaveBeenSet: boolean;
  32. AbsolutePosition: PointF2D;
  33. RelativePosition: PointF2D;
  34. Size: SizeF2D;
  35. MarginSize: SizeF2D;
  36. UpperLeftCorner: PointF2D;
  37. UpperLeftMarginCorner: PointF2D;
  38. BorderLeft: number;
  39. BorderRight: number;
  40. BorderTop: number;
  41. BorderBottom: number;
  42. BorderMarginLeft: number;
  43. BorderMarginRight: number;
  44. BorderMarginTop: number;
  45. BorderMarginBottom: number;
  46. BoundingRectangle: RectangleF2D;
  47. BoundingMarginRectangle: RectangleF2D;
  48. ChildElements: BoundingBox[];
  49. Parent: BoundingBox;
  50. DataObject: Object;
  51. setAbsolutePositionFromParent(): void;
  52. calculateAbsolutePositionsRecursiveWithoutTopelement(): void;
  53. calculateAbsolutePositionsRecursive(x: number, y: number): void;
  54. calculateBoundingBox(): void;
  55. calculateTopBottomBorders(): void;
  56. computeNonOverlappingPositionWithMargin(placementPsi: BoundingBox, direction: ColDirEnum, position: PointF2D): void;
  57. collisionDetection(psi: BoundingBox): boolean;
  58. liesInsideBorders(psi: BoundingBox): boolean;
  59. pointLiesInsideBorders(position: PointF2D): boolean;
  60. marginCollisionDetection(psi: BoundingBox): boolean;
  61. liesInsideMargins(psi: BoundingBox): boolean;
  62. pointLiesInsideMargins(position: PointF2D): boolean;
  63. computeNonOverlappingPosition(placementPsi: BoundingBox, direction: ColDirEnum, position: PointF2D): void;
  64. getClickedObjectOfType<T>(clickPosition: PointF2D): T;
  65. getObjectsInRegion<T>(region: BoundingBox, liesInside?: boolean): T[];
  66. protected calculateRectangle(): void;
  67. protected calculateMarginRectangle(): void;
  68. private calculateMarginPositionAlongDirection(toBePlaced, direction);
  69. private calculatePositionAlongDirection(toBePlaced, direction);
  70. }
  71. export declare enum ColDirEnum {
  72. Left = 0,
  73. Right = 1,
  74. Up = 2,
  75. Down = 3,
  76. }