Skip to content

dropRightPx

ts
function Rect.dropRightPx(rect: Rect, amount: number): Rect

Removes a specified number of pixels from the rectangle's width at the right edge.

Example

ts
Rect.dropRightPx({ left: 10, top: 20, width: 100, height: 80 }, 25);
// { left: 10, top: 20, width: 75, height: 80 }
ts
pipe({ left: 10, top: 20, width: 100, height: 80 }, Rect.dropRightPx(25));
// { left: 10, top: 20, width: 75, height: 80 }