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
distancedoubleHow far each side moves: outward when positive.
resultGeoRectangle2The 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
distancedoubleHow far each side moves: outward when positive.
resultGeoRectangle2The rectangle with the same center and angle, or this one when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if a rectangle is left; false if it shrinks to nothing.