algonim
    Preparing search index...

    Class Region

    A rectangle with a position and size.

    Index

    Constructors

    Properties

    origin: Point
    size: Size

    Methods

    • Creates a region from corners. If a start coordinate isn't greater than its corresponding end coordinate, the position on that axis will be the start coordinate, and the size will be zero.

      Parameters

      Returns Region

    • Extracts a vertical column from this region by specifying the start and end of it along the width, ranging from 0 to 1.

      Parameters

      • startFac: number
      • endFac: number

      Returns Region

    • Extracts a horizontal column from this region by specifying the start and end of it along the height, ranging from 0 to 1.

      Parameters

      • startFac: number
      • endFac: number

      Returns Region

    • Creates a new region by applying a function to all parameters of this.

      Parameters

      • fn: (arg0: number) => number

      Returns Region

    • Creates a new region by applying a function to the position of this.

      Parameters

      • fn: (arg0: number) => number

      Returns Region

    • Creates a new region by applying a function to the size of this.

      Parameters

      • fn: (arg0: number) => number

      Returns Region