Rect 结构 |
[缺少 "T:CPF.Drawing.Rect" 的 <summary> 文档]
命名空间: CPF.Drawing
[SerializableAttribute] public struct Rect : IFormattable
Rect 类型公开以下成员。
名称 | 说明 | |
---|---|---|
Rect(Size) |
Constructor which sets the initial values to bound the (0,0) point and the point
that results from (0,0) + size.
| |
Rect(Point, Point) |
Constructor which sets the initial values to bound the two points provided.
| |
Rect(Point, Vector) |
Constructor which sets the initial values to bound the point provided and the point
which results from point + vector.
| |
Rect(Point, Size) |
Constructor which sets the initial values to the values of the parameters
| |
Rect(Single, Single, Single, Single) |
Constructor which sets the initial values to the values of the parameters.
Width and Height must be non-negative
|
名称 | 说明 | |
---|---|---|
Bottom |
Bottom Property - This is a read-only alias for Y + Height
If this is the empty rectangle, the value will be negative infinity.
| |
BottomLeft |
BottomLeft Property - This is a read-only alias for the Point which is at X, Y + Height
If this is the empty rectangle, the value will be positive infinity, negative infinity.
| |
BottomRight |
BottomRight Property - This is a read-only alias for the Point which is at X + Width, Y + Height
If this is the empty rectangle, the value will be negative infinity, negative infinity.
| |
Center |
Gets the center point of the rectangle.
| |
Empty |
Empty - a static property which provides an Empty rectangle. X and Y are positive-infinity
and Width and Height are negative infinity. This is the only situation where Width or
Height can be negative.
| |
Height |
Height - The Height component of the Size. This cannot be set to negative, and will only
be negative if this is the empty rectangle, in which case it will be negative infinity.
If this rect is Empty, setting this property is illegal.
| |
IsEmpty | ||
Left |
Left Property - This is a read-only alias for X
If this is the empty rectangle, the value will be positive infinity.
| |
Location |
Location - The Point representing the origin of the Rectangle
| |
Right |
Right Property - This is a read-only alias for X + Width
If this is the empty rectangle, the value will be negative infinity.
| |
Size |
Size - The Size representing the area of the Rectangle
| |
Top |
Top Property - This is a read-only alias for Y
If this is the empty rectangle, the value will be positive infinity.
| |
TopLeft |
TopLeft Property - This is a read-only alias for the Point which is at X, Y
If this is the empty rectangle, the value will be positive infinity, positive infinity.
| |
TopRight |
TopRight Property - This is a read-only alias for the Point which is at X + Width, Y
If this is the empty rectangle, the value will be negative infinity, positive infinity.
| |
Width |
Width - The Width component of the Size. This cannot be set to negative, and will only
be negative if this is the empty rectangle, in which case it will be negative infinity.
If this rect is Empty, setting this property is illegal.
| |
X |
X - The X coordinate of the Location.
If this is the empty rectangle, the value will be positive infinity.
If this rect is Empty, setting this property is illegal.
| |
Y |
Y - The Y coordinate of the Location
If this is the empty rectangle, the value will be positive infinity.
If this rect is Empty, setting this property is illegal.
|
名称 | 说明 | |
---|---|---|
Contains(Point) |
Contains - Returns true if the Point is within the rectangle, inclusive of the edges.
Returns false otherwise.
| |
Contains(Rect) |
Contains - Returns true if the Rect non-Empty and is entirely contained within the
rectangle, inclusive of the edges.
Returns false otherwise
| |
Contains(Single, Single) |
Contains - Returns true if the Point represented by x,y is within the rectangle inclusive of the edges.
Returns false otherwise.
| |
Equals(Object) |
Equals - compares this Rect with the passed in object. In this equality
float.NaN is equal to itself, unlike in numeric equality.
Note that float values can acquire error when operated upon, such that
an exact comparison between two values which
are logically equal may fail.
(重写 ValueTypeEquals(Object).) | |
Equals(Rect) |
Equals - compares this Rect with the passed in object. In this equality
float.NaN is equal to itself, unlike in numeric equality.
Note that float values can acquire error when operated upon, such that
an exact comparison between two values which
are logically equal may fail.
| |
Equals(Rect, Rect) |
Compares two Rect instances for object equality. In this equality
float.NaN is equal to itself, unlike in numeric equality.
Note that float values can acquire error when operated upon, such that
an exact comparison between two values which
are logically equal may fail.
| |
GetHashCode |
Returns the HashCode for this Rect
(重写 ValueTypeGetHashCode.) | |
GetType | (继承自 Object。) | |
Inflate(Size) |
Inflate - inflate the bounds by the size provided, in all directions
If this is Empty, this method is illegal.
| |
Inflate(Single, Single) |
Inflate - inflate the bounds by the size provided, in all directions.
If -width is > Width / 2 or -height is > Height / 2, this Rect becomes Empty
If this is Empty, this method is illegal.
| |
Inflate(Rect, Size) |
Inflate - return the result of inflating rect by the size provided, in all directions
If this is Empty, this method is illegal.
| |
Inflate(Rect, Single, Single) |
Inflate - return the result of inflating rect by the size provided, in all directions
If this is Empty, this method is illegal.
| |
Intersect(Rect) |
Intersect - Update this rectangle to be the intersection of this and rect
If either this or rect are Empty, the result is Empty as well.
更新为交集
| |
Intersect(Rect, Rect) |
Intersect - Return the result of the intersection of rect1 and rect2.
If either this or rect are Empty, the result is Empty as well.
| |
IntersectsWith |
IntersectsWith - Returns true if the Rect intersects with this rectangle
Returns false otherwise.
Note that if one edge is coincident, this is considered an intersection.
| |
Offset(Vector) |
Offset - translate the Location by the offset provided.
If this is Empty, this method is illegal.
| |
Offset(Single, Single) |
Offset - translate the Location by the offset provided
If this is Empty, this method is illegal.
| |
Offset(Rect, Vector) |
Offset - return the result of offsetting rect by the offset provided
If this is Empty, this method is illegal.
| |
Offset(Rect, Single, Single) |
Offset - return the result of offsetting rect by the offset provided
If this is Empty, this method is illegal.
| |
Scale |
Scale the rectangle in the X and Y directions
| |
ToString |
Creates a string representation of this object based on the current culture.
(重写 ValueTypeToString.) | |
ToString(IFormatProvider) |
Creates a string representation of this object based on the IFormatProvider
passed in. If the provider is null, the CurrentCulture is used.
| |
Transform(Matrix) |
Updates rectangle to be the bounds of the original value transformed
by the matrix.
The Empty Rect is not affected by this call.
| |
Transform(Rect, Matrix) |
Returns the bounds of the transformed rectangle.
The Empty Rect is not affected by this call.
| |
Union(Point) |
Union - Update this rectangle to be the union of this and point.
| |
Union(Rect) |
Union - Update this rectangle to be the union of this and rect.
| |
Union(Rect, Point) |
Union - Return the result of the union of rect and point.
| |
Union(Rect, Rect) |
Union - Return the result of the union of rect1 and rect2.
|
名称 | 说明 | |
---|---|---|
Equality | ||
(String to Rect) | ||
Inequality |
Compares two Rect instances for exact inequality.
Note that float values can acquire error when operated upon, such that
an exact comparison between two values which are logically equal may fail.
Furthermore, using this equality operator, float.NaN is not equal to itself.
|
名称 | 说明 | |
---|---|---|
ConvertTo |
类型转换
(由 ObjectExtenstions 定义。) | |
Delay |
延迟操作
(由 ObjectExtenstions 定义。) | |
Equal |
对象是否相等
(由 ObjectExtenstions 定义。) | |
GetCreationCode | (由 ObjectExtenstions 定义。) | |
GetPropretyValue |
获取对象属性值
(由 ObjectExtenstions 定义。) | |
GetValue |
快速动态获取对象的属性值
(由 FastReflectionExtensions 定义。) | |
Invoke |
快速动态调用对象的方法
(由 FastReflectionExtensions 定义。) | |
SetPropretyValue |
设置属性值
(由 ObjectExtenstions 定义。) | |
SetValue |
快速动态设置对象的属性值
(由 FastReflectionExtensions 定义。) | |
ToSKRect | (由 Extension 定义。) |