Rectangle Structure |
Namespace: Eto.Drawing
The Rectangle type exposes the following members.
Name | Description | |
---|---|---|
Rectangle(RectangleF) |
Initializes a new instance of a Rectangle class with truncated values of the specified floating-point rectangle | |
Rectangle(Size) |
Initializes a new instance of the Rectangle class with X, Y co-ordinates at 0,0 and the specified size | |
Rectangle(Point, Point) |
Initializes a new instance of the Rectangle class with two points
| |
Rectangle(Point, Size) |
Initializes a new instance of the Rectangle class with the specified location and size | |
Rectangle(Int32, Int32, Int32, Int32) |
Initializes a new instance of the Rectangle class with the specified x, y, width, and height |
Name | Description | |
---|---|---|
Bottom |
Gets or sets the logical bottom of this rectangle (Y + Height if Height is positive, Y + 1 if negative)
| |
BottomLeft | ||
BottomRight | ||
Center |
Gets or sets the rectangle's center position
| |
EndLocation |
Gets the ending location of this rectangle
| |
Height |
Gets or sets the Height of this rectangle
| |
InnerBottom |
Gets or sets the bottom of the rectangle that is inside the bounds
| |
InnerBottomLeft |
Gets or sets the point at the InnerBottom and Left of the rectangle
| |
InnerBottomRight |
Gets or sets the point at the InnerBottom and InnerRight of the rectangle
| |
InnerRight |
Gets or sets the right of the rectangle that is inside the bounds
| |
InnerTopRight |
Gets or sets the point at the Top and InnerRight of the rectangle
| |
IsEmpty |
Gets a value indicating that the Size of this rectangle is empty (either the width or height are zero)
| |
IsZero |
Gets a value indicating that both the and Size of this rectangle are zero
| |
Left |
Gets or sets the logical left of this rectangle (X co-ordinate if Width is positive, X + Width if negative)
| |
Location |
Gets the location of this rectangle
| |
MiddleBottom | ||
MiddleLeft | ||
MiddleRight | ||
MiddleTop | ||
MiddleX |
Gets or sets the rectangle's middle horizontal position
| |
MiddleY |
Gets or sets the rectangle's middle vertical position
| |
Right |
Gets or sets the logical right of this rectangle (X + Width if Width is positive, X + 1 if negative)
| |
Size |
Gets or sets the size of the rectangle
| |
Top |
Gets or sets the logical top of this rectangle (Y co-ordinate if Height is positive, Y + Height if negative)
| |
TopLeft | ||
TopRight | ||
Width |
Gets or sets the Width of this rectangle
| |
X |
Gets or sets the X co-ordinate of the Location of this rectangle
| |
Y |
Gets or sets the Y co-ordinate of the Location of this rectangle
|
Name | Description | |
---|---|---|
Align(Size) |
Aligns the rectangle to a grid of the specified gridSize | |
Align(Int32, Int32) |
Aligns the rectangle to a grid of the specified gridWidth and gridHeight | |
Align(Rectangle, Size) |
Aligns the rectangle to a grid of the specified gridSize | |
Align(Rectangle, Int32, Int32) |
Aligns the rectangle to a grid of the specified gridWidth and gridHeight | |
Ceiling |
Converts a floating point rectangle to an integral Rectangle by getting the smallest integral value of X, Y, Width, and Height
| |
Contains(Point) |
Gets a value indicating that the specified point is within the bounds of this rectangle
| |
Contains(Rectangle) |
Gets a value indicating that the specified rectangle is entirely contained within the bounds of this rectangle
| |
Contains(Int32, Int32) |
Gets a value indicating that the specified x and y co-ordinates are within the bounds of this rectangle
| |
Equals(Object) |
Compares this rectangle to an object for equality
(Overrides ValueTypeEquals(Object).) | |
Equals(Rectangle) |
Compares this rectangle with the specified other rectangle
| |
FromCenter |
Creates a new instance of a Rectangle with a specified center and size | |
FromSides |
Creates a new instance of a RectangleF from the values of the left, top, right and bottom sides
| |
GetHashCode |
Gets the hash code for this rectangle
(Overrides ValueTypeGetHashCode.) | |
Inflate(Size) |
Inflates all dimensions of this rectangle by the specified size | |
Inflate(Int32, Int32) |
Inflates all dimensions of this rectangle by the specified width and height | |
Inflate(Rectangle, Size) |
Inflates all dimensions of the rectangle by the specified size | |
Inflate(Rectangle, Int32, Int32) |
Inflates all dimensions of this rectangle by the specified width and height | |
Intersect(Rectangle) |
Intersect the rectangle with the specified rectangle | |
Intersect(Rectangle, Rectangle) |
Intersect the two specified rectangles
| |
Intersects |
Gets a value indicating that the specified rectangle overlaps this rectangle
| |
Normalize | ||
Offset(Point) |
Offsets the location of the rectangle by the X and Y values of the specified point | |
Offset(Size) |
Offsets the location of the rectangle by the specified size | |
Offset(Int32, Int32) |
Offsets the location of the rectangle by the specified x and y values
| |
Offset(Rectangle, Point) |
Offsets the location of the rectangle by the X and Y values of the specified point | |
Offset(Rectangle, Size) |
Offsets the location of the rectangle by the specified size | |
Offset(Rectangle, Int32, Int32) |
Offsets the location of the rectangle by the specified x and y values
| |
Restrict(Rectangle) |
Restricts the rectangle to be within the specified rectangle | |
Restrict(Size) |
Restricts the rectangle to be within the specified size at an X,Y location of 0, 0
| |
Restrict(Point, Size) |
Restricts the rectangle to be within the specified location and size | |
Restrict(Rectangle, Rectangle) |
Restricts the rectangle to be within the restrict rectangle
| |
Restrict(Rectangle, Size) |
Restricts the rectangle to be within the specified size | |
Round |
Converts a floating point rectangle to an integral Rectangle by rounding the X, Y, Width, and Height.
| |
ToString |
Converts this rectangle to a string
(Overrides ValueTypeToString.) | |
Truncate |
Converts a floating point rectangle to an integral Rectangle by truncating the X, Y, Width, and Height values
| |
Union(Rectangle) |
Union the rectangle into this instance to encompass both rectangles
| |
Union(Rectangle, Rectangle) |
Combines two rectangles into one rectangle that encompasses both
|
Name | Description | |
---|---|---|
Addition(Rectangle, Point) |
Adds the offset to the specified rectangle, moving its location
| |
Addition(Rectangle, Size) |
Adds the offset to the specified rectangle, moving its location
| |
Division(Rectangle, Size) |
Divides the specified rectangle by the Width and Height of size | |
Division(Rectangle, Int32) |
Divides all X, Y, Width, Height components of the rectangle by a factor factor
| |
Equality |
Compares two rectangles for equality
| |
(RectangleF to Rectangle) |
Implicit conversion from a RectangleF to a Rectangle | |
Inequality |
Compares two rectangles for inequality
| |
Multiply(Rectangle, Size) |
Multiplies the specified rectangle by the Width and Height of size | |
Multiply(Rectangle, Int32) |
Multiplies all X, Y, Width, Height components of the rectangle by a factor | |
Subtraction(Rectangle, Point) |
Subtracts the offset from the specified rectangle, moving its location
| |
Subtraction(Rectangle, Size) |
Subtracts the offset from the specified rectangle, moving its location
|