Table of Contents

Method Deflate

Namespace
LMKit.Graphics.Geometry
Assembly
LM-Kit.NET.dll

Deflate(double)

Returns a new rectangle contracted equally on all sides.

public Rectangle Deflate(double uniform)

Parameters

uniform double

The amount to remove from each side (left, top, right, bottom).

Returns

Rectangle

A new Rectangle that is smaller by uniform on each side.

Exceptions

ArgumentException

Thrown when the deflation would invert the rectangle (negative width or height).

Deflate(double, double)

Returns a new rectangle contracted by the specified amounts on each axis.

public Rectangle Deflate(double dx, double dy)

Parameters

dx double

The horizontal amount to remove on each side (left and right).

dy double

The vertical amount to remove on each side (top and bottom).

Returns

Rectangle

A new Rectangle that is smaller by dx horizontally and dy vertically on each side.

Exceptions

ArgumentException

Thrown when the deflation would invert the rectangle (negative width or height).