RectangleD Structure
Stores a set of four doubles that represent the location and size of a rectangle.
Namespace: Microsoft.VisualStudio.Modeling.Diagrams
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0.dll)
Syntax
'Declaration
<SerializableAttribute> _
<TypeConverterAttribute(GetType(RectangleDConverter))> _
Public Structure RectangleD
[SerializableAttribute]
[TypeConverterAttribute(typeof(RectangleDConverter))]
public struct RectangleD
[SerializableAttribute]
[TypeConverterAttribute(typeof(RectangleDConverter))]
public value class RectangleD
[<Sealed>]
[<SerializableAttribute>]
[<TypeConverterAttribute(typeof(RectangleDConverter))>]
type RectangleD = struct end
JScript supports the use of structures, but not the declaration of new ones.
The RectangleD type exposes the following members.
Constructors
Name | Description | |
---|---|---|
RectangleD(PointD, SizeD) | Initializes a new instance of the RectangleD class with the specified location and size. | |
RectangleD(Double, Double, Double, Double) | Initializes a new instance of the RectangleD class with the specified location and size. |
Top
Properties
Name | Description | |
---|---|---|
Bottom | Gets the y-coordinate of the bottom edge of this RectangleD structure | |
Center | Gets the coordinates of the center of this RectangleD structure. | |
Height | Gets or sets the height of this RectangleD structure. | |
IsEmpty | Tests whether all numeric properties of this RectangleD have values of zero. | |
Left | Gets the x-coordinate of the left edge of this RectangleD structure. | |
Location | Gets or sets the coordinates of the upper-left corner of this RectangleD structure. | |
Right | Gets the x-coordinate of the right edge of this RectangleD structure. | |
Size | Gets or sets the size of this RectangleD. | |
Top | Gets the y-coordinate of the top edge of this RectangleD structure. | |
Width | Gets or sets the width of this RectangleD structure. | |
X | Gets or sets the x-coordinate of the upper-left corner of this RectangleD structure. | |
Y | Gets or sets the y-coordinate of the upper-left corner of this RectangleD structure. |
Top
Methods
Name | Description | |
---|---|---|
Contains(PointD) | Determines if the specified point is contained within this RectangleD structure. | |
Contains(RectangleD) | Determines if the rectangular region represented by rectangle is entirely contained within this RectangleD structure. | |
Contains(Double, Double) | Determines if the specified point is contained within this RectangleD structure. | |
ContainsX | Determines if the X coordinate is contained within this RectangleD structure. | |
ContainsY | Determines if the Y coordinate is contained within this RectangleD structure. | |
Equals | Overridden. Tests whether obj is a RectangleD with the same location and size of this RectangleD. (Overrides ValueType.Equals(Object).) | |
GetHashCode | Gets the hash code for this RectangleD structure. For information about the use of hash codes, see Object.GetHashCode. (Overrides ValueType.GetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Inflate(SizeD) | A copy in which the edges are moved outwards by the specified distances, and the center is unmoved. | |
Inflate(Double, Double) | A copy in which the edges are moved outwards by specified distances, and the center is in the same position. | |
Inflate(RectangleD, Double, Double) | A copy in which the edges are moved outwards by the specified distances. The center of the copy is not moved. | |
Intersect(RectangleD) | Replaces this RectangleD structure with the intersection of itself and the specified RectangleD structure. | |
Intersect(RectangleD, RectangleD) | Returns a RectangleD structure that represents the intersection of two rectangles. If there is no intersection, null is returned. | |
IntersectsWith | Determines if this rectangle intersects with rectangle. | |
IsOnPerimeter | ||
Offset(PointD) | Adjusts the location of this rectangle by the specified amount. | |
Offset(Double, Double) | Adjusts the location of this rectangle by the specified amount. | |
PerimeterTranslation(PointD) | ||
PerimeterTranslation(Double, Double) | ||
ToRectangleF | Converts the specified RectangleD to a RectangleF. | |
ToString | Returns a string formatted like this: X=x, Y=y, Width=width, Height=height (Overrides ValueType.ToString.) | |
Union | Creates the smallest possible third rectangle that can contain both of two rectangles that form a union. |
Top
Operators
Name | Description | |
---|---|---|
Equality | Tests whether two RectangleD structures have equal location and size. | |
Implicit(Rectangle to RectangleD) | ||
Implicit(RectangleF to RectangleD) | ||
Inequality | Tests whether two RectangleD structures differ in location or size. |
Top
Fields
Name | Description | |
---|---|---|
Empty | Represents an instance of the RectangleD with its numeric properties initialized to zero. |
Top
Remarks
A rectangle is defined by its width, height, and upper-left corner.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.