RelativeRectangle Struct
Specifies the relative rectangle.
public struct RelativeRectangle : IEquatable<RelativeRectangle>
Public Structure RelativeRectangle
Implements IEquatable(Of RelativeRectangle)
Implements
Constructors
RelativeRectangle(Double, Double, Double, Double)
Initializes a new instance of the RelativeRectangle struct.
public RelativeRectangle(double left, double top, double right, double bottom)
Public Sub New(left As Double, top As Double, right As Double, bottom As Double)
Parameters
left
- System.Double
The left.
top
- System.Double
The top.
right
- System.Double
The right.
bottom
- System.Double
The bottom.
Properties
Bottom
Gets or sets the bottom edge of the rectangle.
Property Value
- System.Double
The bottom edge of the rectangle.
Remarks
Value 0 represents 0% while value 1 represents 100%.
Left
Gets or sets the left edge of the rectangle.
Property Value
- System.Double
The left edge of the rectangle.
Remarks
Value 0 represents 0% while value 1 represents 100%.
Right
Gets or sets the right edge of the rectangle.
Property Value
- System.Double
The right edge of the rectangle.
Remarks
Value 0 represents 0% while value 1 represents 100%.
Top
Gets or sets the top edge of the rectangle.
Property Value
- System.Double
The top edge of the rectangle.
Remarks
Value 0 represents 0% while value 1 represents 100%.
Methods
Equals(RelativeRectangle)
Determines whether the other
RelativeRectangle is equal to this RelativeRectangle instance.
public bool Equals(RelativeRectangle other)
Public Function Equals(other As RelativeRectangle) As Boolean
Parameters
other
- RelativeRectangle
The other relative rectangle to compare with this relative rectangle instance.
Returns
- System.Boolean
true if the other
RelativeRectangle is equal to this RelativeRectangle instance; otherwise, false.
Equals(Object)
Determines whether the specified System.Object is equal to this RelativeRectangle instance.
public override bool Equals(object obj)
Public Overrides Function Equals(obj As Object) As Boolean
Parameters
obj
- System.Object
The System.Object to compare with this relative rectangle instance.
Returns
- System.Boolean
true if the specified System.Object is a RelativeRectangle and is equal to this RelativeRectangle instance; otherwise, false.
Overrides
GetHashCode()
Returns a hash code for this RelativeRectangle instance.
Returns
- System.Int32
An integer value that specifies a hash value for this RelativeRectangle instance.
Overrides
ToString()
Returns a System.String that represents this RelativeRectangle instance.
Returns
- System.String
A System.String that represents this RelativeRectangle instance.
Overrides
Remarks
This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).
Operators
Equality(RelativeRectangle, RelativeRectangle)
Determines whether first
and second
RelativeRectangles are equal.
public static bool operator ==(RelativeRectangle first, RelativeRectangle second)
Public Shared Operator =(first As RelativeRectangle, second As RelativeRectangle) As Boolean
Parameters
first
- RelativeRectangle
The first relative rectangle.
second
- RelativeRectangle
The second relative rectangle.
Returns
- System.Boolean
true if first
and second
relative rectangles are equal; otherwise, false.
Inequality(RelativeRectangle, RelativeRectangle)
Determines whether first
and second
RelativeRectangles are not equal.
public static bool operator !=(RelativeRectangle first, RelativeRectangle second)
Public Shared Operator <>(first As RelativeRectangle, second As RelativeRectangle) As Boolean
Parameters
first
- RelativeRectangle
The first relative rectangle.
second
- RelativeRectangle
The second relative rectangle.
Returns
- System.Boolean
true if first
and second
relative rectangles are not equal; otherwise, false.