|
| Rect (int left, int top, int right, int bottom) |
| Constructor for Cvb rectangles.
|
|
| Rect (Point2D location, Size2D size) |
| Constructor for Cvb rectangles.
|
|
bool | Contains (Point2D pt) |
| Check if a point is located inside this Rect.
|
|
bool | Contains (Point2Dd pt) |
| Check if a point is located inside this Rect.
|
|
bool | Contains (Point2Dd pt, double epsilon) |
| Check if a point is located inside this Rect.
|
|
bool | Contains (int x, int y) |
| Determines if the specified point is contained with this Rect.
|
|
override bool | Equals (object obj) |
| Tests whether obj is a Rect structure with the same/ location and size as this Rect structure.
|
|
override int | GetHashCode () |
| Returns the hash code for this Rect.
|
|
override string | ToString () |
| String conversion.
|
|
bool | IntersectsWith (Rect rect) |
| Test if this rectangle intersects with rect .
|
|
void | Intersect (Rect rect) |
| Replaces this rectangle with the intersection of itself and the specified rectangle.
|
|
|
static Rect | TruncateCeiling (RectD rect) |
| Converts the given rect to a Rect structure by truncating Left and Top and rounding Right and Bottom to the next higher integer number.
|
|
static Rect | Ceiling (RectD rect) |
| Converts the given rect to a Rect structure by rounding the values of the RectD structure to the next higher integer number.
|
|
static Rect | Round (RectD rect) |
| Converts the given rect to a Rect structure by rounding the values of the RectD structure mathematically.
|
|
static Rect | Truncate (RectD rect) |
| Converts the given rect to a Rect structure by rounding the values of the RectD structure to the next lower integer number.
|
|
static Rect | Intersect (Rect a, Rect b) |
| Returns a Rect structure that represents the intersection of the two input rectangles. If there is no intersection, an empty Rect is returned.
|
|
static Rect | Union (Rect a, Rect b) |
| Gets a Rect structure that contains the union of two Rect structures.
|
|
static Rect | FromLTRB (int left, int top, int right, int bottom) |
| Creates a Rect structure with the specified edge locations.
|
|
static Rect | CropExtent (Rect ext, Point2D pos, Size2D imageSize) |
| Assuming that a Rect structure contains the extent of something relative to a position inside an image, this function crops the Rect so that the whole content is inside the image.
|
|
static bool | operator!= (Rect lhs, Rect rhs) |
| Comparison operator for Rect structures.
|
|
static bool | operator== (Rect lhs, Rect rhs) |
| Comparison operator for Rect structures.
|
|
static | operator Rect (RectD rect) |
| Explicit conversion operator (truncates the values).
|
|
Cvb Rectangle structure.
Unlike System.Drawing.Rectangle
, which upholds the convention that Right and Bottom are not part of the rectangle (in other words: Width = Left - Right and Height = Bottom - Top), Common Vision Blox always uses rectangles (or rectangular shaped areas of interest represented by integer parameters left, top, right and bottom) in such a way that right and bottom are still part of the area to be investigated (i.e. Width = Right - Left + 1 and Height = Bottom - Top
To model this difference correctly we decided to give CVB.Net a rectangle of its own which behaves according to the conventions used in Common Vision Blox.