CvRect Structure OpenCvSharp Class Library
Offset and size of a rectangle

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

[SerializableAttribute]
public struct CvRect : IEquatable<CvRect>

The CvRect type exposes the following members.

Constructors

  NameDescription
Public methodCvRect(CvPoint, CvSize)
Constructor
Public methodCvRect(Int32, Int32, Int32, Int32)
Constructor
Top
Properties

  NameDescription
Public propertyBottom
Gets the y-coordinate that is the sum of the Y and Height property values of this CvRect structure.
Public propertyBottomRight
Coordinate of the right-most rectangle corner [CvPoint(X+Width, Y+Height)]
Public propertyLeft
Gets the x-coordinate of the left edge of this CvRect structure.
Public propertyLocation
Coordinate of the left-most rectangle corner [CvPoint(X, Y)]
Public propertyRight
Gets the x-coordinate that is the sum of X and Width property values of this CvRect structure.
Public propertySize
Size of the rectangle [CvSize(Width, Height)]
Public propertyTop
Gets the y-coordinate of the top edge of this CvRect structure.
Public propertyTopLeft
Coordinate of the left-most rectangle corner [CvPoint(X, Y)]
Top
Methods

  NameDescription
Public methodContains(CvPoint)
Determines if the specified point is contained within the rectangular region defined by this Rectangle.
Public methodContains(CvRect)
Determines if the specified rectangle is contained within the rectangular region defined by this Rectangle.
Public methodContains(Int32, Int32)
Determines if the specified point is contained within the rectangular region defined by this Rectangle.
Public methodEquals(Object)
Specifies whether this object contains the same members as the specified Object.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(CvRect)
Specifies whether this object contains the same members as the specified Object.
Public methodStatic memberFromLTRB
Creates a CvRect with the specified upper-left and lower-right corners.
Public methodGetHashCode
Returns a hash code for this object.
(Overrides ValueTypeGetHashCode.)
Public methodGetType (Inherited from Object.)
Public methodInflate(CvSize)
Inflates this CvRect by the specified amount.
Public methodInflate(Int32, Int32)
Inflates this CvRect by the specified amount.
Public methodStatic memberInflate(CvRect, Int32, Int32)
Creates and returns an inflated copy of the specified CvRect structure.
Public methodIntersect(CvRect)
Determines the CvRect structure that represents the intersection of two rectangles.
Public methodStatic memberIntersect(CvRect, CvRect)
Determines the CvRect structure that represents the intersection of two rectangles.
Public methodIntersectsWith
Determines if this rectangle intersects with rect.
Public methodToString
Converts this object to a human readable string.
(Overrides ValueTypeToString.)
Public methodUnion(CvRect)
Gets a CvRect structure that contains the union of two CvRect structures.
Public methodStatic memberUnion(CvRect, CvRect)
Gets a CvRect structure that contains the union of two CvRect structures.
Top
Operators

  NameDescription
Public operatorStatic memberAddition(CvRect, CvPoint)
Shifts rectangle by a certain offset
Public operatorStatic memberAddition(CvRect, CvSize)
Expands or shrinks rectangle by a certain amount
Public operatorStatic memberBitwiseAnd
Determines the CvRect structure that represents the intersection of two rectangles.
Public operatorStatic memberBitwiseOr
Gets a CvRect structure that contains the union of two CvRect structures.
Public operatorStatic memberEquality
Compares two CvRect objects. The result specifies whether the members of each object are equal.
Public operatorStatic memberInequality
Compares two CvRect objects. The result specifies whether the members of each object are unequal.
Public operatorStatic memberSubtraction(CvRect, CvPoint)
Shifts rectangle by a certain offset
Public operatorStatic memberSubtraction(CvRect, CvSize)
Expands or shrinks rectangle by a certain amount
Top
Fields

  NameDescription
Public fieldStatic memberEmpty
Represents a CvRect structure with its properties left uninitialized.
Public fieldHeight
Height of the rectangle
Public fieldStatic memberSizeOf
sizeof(CvRect)
Public fieldWidth
Width of the rectangle
Public fieldX
x-coordinate of the left-most rectangle corner[s]
Public fieldY
y-coordinate of the top-most or bottom-most rectangle corner[s]
Top
See Also

Reference