float x;
- Gets or sets the x-coordinate.
float y;
- Gets of sets the y-coordinate.
float width;
- Gets or sets the width component.
float height;
- Gets or sets the height component.
static RectF empty;
- Represents a RectF structure with its values set to zero.
static RectF opCall(float x, float y, float width, float height);
- Initializes a new instance with the specified location and size.
Parameters
float x
The x-coordinate.
float y
The y-coordinate.
float width
The width.
float height
The height.
static RectF opCall(PointF location, SizeF size);
- Initializes a new instance with the specified location and size.
Parameters
PointF location
The upper-left corner.
SizeF size
The width and height.
static RectF fromLTRB(float left, float top, float right, float bottom);
- Creates a RectF structure width the specified edge locations.
Parameters
float left
The x-coordinate of the upper-left corner.
float top
The y-coordinate of the upper-left corner.
float right
The x-coordinate of the lower-right corner.
float bottom
The y-coordinate of the lower-right corner.
Returns
The new RectF that this method creates.
bool equals(RectF other);
bool opEquals(RectF other);
- Tests whether the specified Rect structure has the same location and size as this instance.
Parameters
RectF other
The RectF to test.
Returns
true if the x, y, width and height properties of other are equal to the corresponding properties of this instance; otherwise, false.
static RectF unionRects(RectF a, RectF b);
- Gets a Rect structure containing the union of two RectF structures.
Parameters
RectF a
A RectF to union.
RectF b
A RectF to union.
Returns
A RectF structure that bounds the union of the two Rect structures.
bool contains(PointF pt);
- Determines if the specified point is contained within this instance.
Parameters
PointF pt
The PointF to test.
Returns
true if the point represented by pt is contained within this instance; otherwise, false.
bool contains(float x, float y);
- Determines if the specified point is contained within this instance.
Parameters
float x
The x-coordinate of the point to test.
float y
The y-coordinate of the point to test.
Returns
true if the point defined by x and y is contained within this instance; otherwise, false.
bool contains(RectF rect);
- Determines if the specified rectangular region is entirely contained within this instance.
Parameters
RectF rect
The rectangular region to test.
Returns
true if the rectangular region represented by rect is entirely contained within this instance; otherwise, false.
static RectF inflate(RectF rect, float x, float y);
- Returns an inflated copy of the specified RectF structure.
Parameters
RectF rect
The RectF to be copied.
float x
The amount to inflate the copy horizontally.
float y
The amount to inflate the copy vertically.
Returns
The inflated RectF.
void inflate(SizeF size);
- Inflates this instance by the specified amount.
Parameters
SizeF size
The amount to
inflate this instance.
void inflate(float width, float height);
- Inflates this instance by the specified amount.
Parameters
x
The amount to inflate this instance horizontally.
y
The amount to inflate this instance vertically.
void offset(PointF pos);
- Adjust the location of this instance by the specified amount.
Parameters
PointF pos
The amount to offset the location.
void offset(float x, float y);
- Adjust the location of this instance by the specified amount.
Parameters
float x
The horizontal offset.
float y
The vertical offset.
bool intersectsWith(RectF rect);
- Determines whether this instance intersects with rect.
Parameters
RectF rect
The RectF to test.
Returns
true if there is any intersection; otherwise, false.
static RectF intersect(RectF a, RectF b);
- Returns a RectF structure that represents the intersection of two RectF structures.
Parameters
RectF a
A RectF to intersect.
RectF b
A RectF to intersect.
Returns
A RectF that represents the intersection of a and b.
void intersect(RectF rect);
- Replaces this instance with the intersection of itself and the specified RectF structure.
Parameters
RectF rect
The RectF with which to intersect.
float left();
- Gets the x-coordinate of the left edge of this RectF structure.
float top();
- Gets the y-coordinate of the top edge of this RectF structure.
float right();
- Gets the x-coordinate that is the sum of the x and width values.
float bottom();
- Gets the y-coordinate that is the sum of the y and height values.
PointF location();
void location(PointF value);
- Gets or sets the coordinates of the upper-left corner of this RectF structure.
SizeF size();
void size(SizeF value);
- Gets or sets the size of this RectF structure.