Preparing search index...

    Represents a rectangular area with x, y, width, height.

        // Rect represents a rectangular area with x, y, width, height.
    // Constructor: new Rect(x, y, width, height)
    const r1 = new Rect(10, 20, 200, 150);
    console.log('Rect created: x=10, y=20, w=200, h=150');

    const r2 = new Rect(100, 100, 50, 50);
    console.log('Rect2: x=100, y=100, w=50, h=50');

    // Rect is used by Pixmap.crop() and other UI geometry APIs
    Index

    Constructors

    Constructors

    • Constructs a new Rect instance representing a rectangular region in UI space.

      Parameters

      • x: number
      • y: number
      • width: number
      • height: number

      Returns Rect