# RectangleExtensionMethods class

Namespace: [Grasshopper2.Extensions](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.extensions.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public static class RectangleExtensionMethods
```

Extension methods for Eto.Drawing.Rectangle and Eto.Drawing.RectangleF

## Methods

- [AdjustSides](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/adjustsides.md): (6 overloads, static) Adjust the sides of a rectangle.
- [Align](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/align.md): (static) Move a rectangle so that the indicated edge aligns with the given coordinate.
- [Area](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/area.md): (static) Gets the (unsigned) area of a rectangle.
- [BoundingBox](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/boundingbox.md): (4 overloads, static) Gets the bounding rectangle for a collection of points.
- [Ceiling](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/ceiling.md): (2 overloads, static) Round a rectangle to the nearest integer coordinates ensuring only ever to grow the rectangle content.
- [Centre](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/centre.md): (2 overloads, static) Gets the point that best describes the centre of a rectangle.
- [ClosestPointIn](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/closestpointin.md): (2 overloads, static) Project a point onto the interior of a rectangle.
- [ClosestPointOn](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/closestpointon.md): (2 overloads, static) Project a point onto the boundary of a rectangle.
- [Contains](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/contains.md): (2 overloads, static) Test whether a point is inside a rectangle.
- [ContainsInEllipse](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/containsinellipse.md): (2 overloads, static) Test whether the point is inside the ellipse bounded by the rectangle.
- [Corners](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/corners.md): (2 overloads, static) Gets the rectangle corners, ordered counter-clockwise starting from the lower left corner.
- [DistanceTo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/distanceto.md): (4 overloads, static) Gets the distance from this rectangle to a point. Any point in or on the rectangle has a distance of zero.
- [Down](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/down.md): (static) Move a rectangle down so that the new top lines up with the old bottom.
- [Edge](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/edge.md): (static) Gets the edge of a rectangle.
- [Floor](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/floor.md): (2 overloads, static) Round a rectangle to the nearest integer coordinates ensuring only ever to shrink the rectangle content.
- [FurthestPoint](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/furthestpoint.md): (2 overloads, static) Find the point on the rectangle that is furthest from some base point.
- [Grow](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/grow.md): (2 overloads, static) Grow a rectangle until it contains a given point.
- [Interpolate](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/interpolate.md): (static) Interpolate between two rectangles.
- [Intersects](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/intersects.md): (static) Test whether two boxes intersect within tolerance.
- [Left](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/left.md): (static) Move a rectangle left so that the new right lines up with the old left.
- [MakeIncreasing](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/makeincreasing.md): (2 overloads, static) Make sure the width and height of a rectangle are increasing.
- [Move](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/move.md): (2 overloads, static) Move a rectangle.
- [MoveInto](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/moveinto.md): (static) Move this rectangle such that it is entirely within another one, whenever possible.
- [Offset](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/offset.md): (static) Offset a rectangle.
- [Perimeter](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/perimeter.md): (static) Gets the (unsigned) perimeter or circumference of a rectangle.
- [PointAt](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/pointat.md): (2 overloads, static) Gets the point at a rectangle parameter.
- [Radius](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/radius.md): (2 overloads, static) Gets the radius of the rectangle (distance from the centre to a corner).
- [RectangleAt](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/rectangleat.md): (static) Create a rectangle from normalised coordinates.
- [Right](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/right.md): (static) Move a rectangle left so that the new left lines up with the old right.
- [Round](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/round.md): (4 overloads, static) Round the coordinates of a rectangle.
- [Scale](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/scale.md): (static) Scale a rectangle around its centre by a specific factor.
- [SplitHorizontal](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/splithorizontal.md): (2 overloads, static) Split a rectangle into two.
- [SplitVertical](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/splitvertical.md): (3 overloads, static) Split a rectangle into two.
- [Subdivide](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/subdivide.md): (static) Create an array (row-by-row) of division rectangles.
- [ToInnerRectangle](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/toinnerrectangle.md): (2 overloads, static) Create the largest possible rectangle inside another rectangle with a specific width/height ratio.
- [ToInnerSquare](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/toinnersquare.md): (2 overloads, static) Convert a rectangle to the biggest square that fits inside it.
- [ToOuterRectangle](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/toouterrectangle.md): (2 overloads, static) Create the smallest possible rectangle outside another rectangle with a specific width/height ratio.
- [ToOuterSquare](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/tooutersquare.md): (2 overloads, static) Convert a rectangle to the smallest square containing it.
- [ToRectangle](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/torectangle.md): (static) Convert a RectangleF into a Rectangle.
- [ToRectangle3d](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/torectangle3d.md): (2 overloads, static) Convert an Eto rectangle into a Rhino rectangle.
- [ToRounded](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/torounded.md): (static) Fillet the corners of a rectangle. The radius is automatically shrunk to avoid self-intersections.
- [ToRoundedEdge](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/toroundededge.md): (static) Create a graphicspath that describes slab edges within a rounded rectangle.
- [ToRoundedRectangle](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/toroundedrectangle.md): (4 overloads, static) Create a graphics path that represents a rounded rectangle.
- [Up](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.rectangleextensionmethods/up.md): (static) Move a rectangle up so that the new bottom lines up with the old top.
