ixfx
    Preparing search index...

    Function subtractSize

    • Subtracts a width & height from a. Leaves x & y as-is.

      const rect = { x: 10, y: 20, width: 100, height: 200 };
      subtractSize(rect, { width: 50, height: 100 });
      subtractSize(rec, 50, 100);
      // Both yields: { x:10, y: 20, width: 50, height: 100 }

      Parameters

      Returns Geometry.RectPositioned

    • Subtracts a width & height from a.

      const rect = { width: 100, height: 200 };
      subtractSize(rect, { width: 50, height: 100 });
      subtractSize(rec, 50, 100);
      // Both yields: { width: 50, height: 100 }

      Parameters

      • a: Geometry.Rect

        Rectangle

      • b: number | Geometry.Rect

        Rectangle to subtract by, or width

      • Optionalc: number

        Height, if second parameter is width

      Returns Geometry.Rect