OpenSheetMusicDisplay
    Preparing search index...

    Class BoundingBox

    A bounding box delimits an area on the 2D plane.

    Graphical object where the bounding box will be attached

    Parent bounding box of an object in a higher hierarchy position

    Create a child to parent relationship too. Will be true by default

    Index

    Constructors

    • Create a bounding box

      Parameters

      • dataObject: Object = undefined

        Graphical object where the bounding box will be attached

      • parent: BoundingBox = undefined

        Parent bounding box of an object in a higher hierarchy position

      • isSymbol: boolean = false

        Defines the bounding box to be symbol thus not calculating its boundaries by itself. NOTE: Borders need to be set!

      Returns BoundingBox

    Properties

    absolutePosition: PointF2D = ...
    borderBottom: number = 0
    borderLeft: number = 0
    borderMarginBottom: number = 0
    borderMarginLeft: number = 0
    borderMarginRight: number = 0
    borderMarginTop: number = 0
    borderRight: number = 0
    borderTop: number = 0
    boundingMarginRectangle: RectangleF2D
    boundingRectangle: RectangleF2D
    childElements: BoundingBox[] = []
    dataObject: Object
    isSymbol: boolean = false
    marginSize: SizeF2D = ...
    parent: BoundingBox
    relativePosition: PointF2D = ...
    relativePositionHasBeenSet: boolean = false
    size: SizeF2D = ...
    upperLeftCorner: PointF2D = ...
    upperLeftMarginCorner: PointF2D = ...
    xBordersHaveBeenSet: boolean = false
    yBordersHaveBeenSet: boolean = false

    Accessors

    Methods

    • Calculate the the absolute position by adding up all relative positions of all parents (including the own rel. pos.)

      Returns void

    • This method calculates the Absolute Positions recursively from the root element down to the leaf elements

      Parameters

      • x: number
      • y: number

      Returns void