Class managing clipping regions.

Hierarchy

  • BimCTClippingRegions

Constructors

Accessors

Methods

  • Add a new clipping region.

    Returns

    null if the rectangle overlaps with another region or the newly added region

    Parameters

    • rectangle: Rectangle

    Returns Promise<ClippingRegion>

  • Brings the specified region to the front by drawing it last.

    Parameters

    Returns void

  • Clear all regions.

    Returns Promise<void>

  • Checks if a Measurement is contained within a region

    Parameters

    Returns Promise<boolean>

  • Destroys the clipping region manager by clearing all regions, removing the canvas from the DOM, and releasing resources.

    Returns void

  • Get a region by its index in the _regions array.

    Parameters

    • index: number

    Returns ClippingRegion

  • Get the clipping region that is behind a point

    Returns

    The BimCTClippingRegion containing the point, or null if no region contains the point.

    Parameters

    • x: number

      The x-coordinate of the point.

    • y: number

      The y-coordinate of the point.

    Returns ClippingRegion

  • Parameters

    • x: number
    • y: number
    • x1: number
    • y1: number

    Returns ClippingRegion

  • Gets the clipping region of a measurement.

    Returns

    The clipping region or null if not found.

    Parameters

    Returns Promise<ClippingRegion>

  • Highlights the region and brings it forward

    Parameters

    • x: number

      The x-coordinate of the point.

    • y: number

      The y-coordinate of the point.

    Returns void

  • Check if a point is inside any clipping region.

    Returns

    true if no region exist or if this point lies inside a region otherwise false

    Parameters

    • x: number

      The x-coordinate of the point.

    • y: number

      The y-coordinate of the point.

    Returns boolean

  • Redraws the clipping regions.

    Returns Promise<void>

  • Remove a region by its index in the _regions array.

    Parameters

    • index: number

    Returns Promise<void>

  • Remove a region by its BimCTClippingRegion reference.

    Parameters

    Returns Promise<boolean>

  • Resizes the canvas to the specified dimensions and redraws all clipping regions.

    Parameters

    • width: number

      The new width of the canvas in pixels.

    • height: number

      The new height of the canvas in pixels.

    Returns Promise<void>