Corresponds in intention and use with the type RectD, although RectD is far more widely used.
More...
Inherits IAreaOfInterest.
|
double | Left |
| Left edge of the rectangle.
|
|
double | Top |
| Top edge of the rectangle.
|
|
double | Right |
| Right edge of the rectangle.
|
|
double | Bottom |
| Bottom edge of the rectangle.
|
|
|
static readonly RectD | Empty = new RectD(0, 0, -1, -1) |
| Null-element.
|
|
|
double | Width [get, set] |
| Width of the rectangle.
|
|
double | Height [get, set] |
| Height of the rectangle.
|
|
Point2Dd | Location [get, set] |
| Location of the top left corner of the rectangle.
|
|
bool | IsEmpty [get] |
| True if width and height are both zero, false otherwise.
|
|
CoordinateSystemType | CoordinateSystem [get] |
| Indicates the coordinate system in which this object is being measured (when used as an area of interest).
|
|
double | Area [get] |
| Area of the rectangle.
|
|
CoordinateSystemType | CoordinateSystem [get] |
| Implementers of this interface should specify here inside which coordinate system their Area of interest is to operate.
|
|
double | Area [get] |
| Size (in pixels) of the Area of interest
|
|
Corresponds in intention and use with the type RectD, although RectD is far more widely used.
◆ RectD() [1/2]
RectD |
( |
double |
left, |
|
|
double |
top, |
|
|
double |
right, |
|
|
double |
bottom |
|
) |
| |
Construct a RectD structure.
- Parameters
-
left | Left edge of the rectangle |
top | top edge of the rectangle |
right | Right edge of the rectangle |
bottom | bottom edge of the rectangle |
◆ RectD() [2/2]
Constructs a RectD structure.
- Parameters
-
location | Left/top location. |
size | Width and height. |
◆ Contains() [1/2]
bool Contains |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
Determines if the specified point is contained with this RectD.
- Parameters
-
x | X-coordinate of the point to test |
y | Y-coordinate of the point to test |
- Returns
true
of the point defined through the parameters x and y is inside this Rect; false
otherwise.
◆ Contains() [2/2]
Check if a point is located inside this RectD.
- Parameters
-
- Returns
- true if pt is inside this RectD, false otherwise.
◆ Equals()
override bool Equals |
( |
object |
obj | ) |
|
Tests whether obj is a RectD structure with the same location and size of this RectD structure.
- Parameters
-
obj | Object to compare to this one. |
- Returns
true
if obj is a RectD
and if the borders are equal.
◆ FromLTRB()
static RectD FromLTRB |
( |
double |
left, |
|
|
double |
top, |
|
|
double |
right, |
|
|
double |
bottom |
|
) |
| |
|
static |
Creates a RectD structure with the specified edge locations.
- Parameters
-
left | The x-coordinate of the upper left corner of this Rect structure |
top | The y-coordinate of the upper left corner of this Rect structure |
right | The x-coordinate of the lower right corner of this Rect structure |
bottom | The y-coordinate of the lower right corner of this Rect structure |
- Returns
- The new Rect that this method creates.
◆ GetHashCode()
override int GetHashCode |
( |
| ) |
|
Returns the hash code for this Rectangle
- Returns
- Hash code.
◆ Intersect() [1/2]
Returns a RectD structure that represents the intersection of the two input rectangles. If there is no intersection, an empty RectD is returned.
- Parameters
-
- Returns
- a RectD that represents the intersection of a and b.
◆ Intersect() [2/2]
void Intersect |
( |
RectD |
rect | ) |
|
Replaces this rectangle with the intersection of itself and the specified rectangle.
- Parameters
-
rect | The rectangle with which to intersect |
◆ IntersectsWith()
bool IntersectsWith |
( |
RectD |
rect | ) |
|
Test if this rectangle intersects with rect .
- Parameters
-
rect | The rectangle to test |
- Returns
- true if there is any intersection, false otherwise
◆ operator RectD()
Implicit conversion from Rect to RectD
.
- Parameters
-
rect | Rectangle to be converted. |
- Returns
- New
RectD.
◆ operator!=()
Comparison operator for RectD structures.
- Parameters
-
lhs | Left hand side operand |
rhs | Right hand side operand |
- Returns
true
if lhs != rhs , false
otherwise
◆ operator==()
Comparison operator for RectD structures.
- Parameters
-
lhs | Left hand side operand |
rhs | Right hand side operand |
- Returns
true
if lhs == rhs , false otherwise
◆ ToString()
override string ToString |
( |
| ) |
|
String conversion.
- Returns
- String representation of this RectD
◆ Union()
Gets a RectD structure that contains the union of two RectD structures.
- Parameters
-
a | A rectangle to union |
b | A rectangle to union |
- Returns
- A RectD that bounds the union of the two RectD structures