Table of Contents

Method TryOffset

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

TryOffset(double, out GeoRectangle2)

Grows this rectangle by a distance on every side, or shrinks it when the distance is negative, keeping its corners square, using default tolerance.

public bool TryOffset(double distance, out GeoRectangle2 result)

Parameters

distance double

How far each side moves: outward when positive.

result GeoRectangle2

The rectangle with the same center and angle, or this one when the method returns false.

Returns

bool

true if a rectangle is left; false if it shrinks to nothing.

TryOffset(double, out GeoRectangle2, Tolerance)

Grows this rectangle by a distance on every side, or shrinks it when the distance is negative, keeping its corners square, within tolerance.

public bool TryOffset(double distance, out GeoRectangle2 result, Tolerance tolerance)

Parameters

distance double

How far each side moves: outward when positive.

result GeoRectangle2

The rectangle with the same center and angle, or this one when the method returns false.

tolerance Tolerance

The tolerance.

Returns

bool

true if a rectangle is left; false if it shrinks to nothing.