Struct Size
Represents the pixel-accurate size of a rectangle.
Implements
Namespace: OpenCV.Net
Assembly: OpenCV.Net.dll
Syntax
public struct Size : IEquatable<Size>
Constructors
| Improve this Doc View SourceSize(Int32, Int32)
Initializes a new instance of the Size structure from the specified dimensions.
Declaration
public Size(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
Int32 | width | The width of the rectangle. |
Int32 | height | The height of the rectangle. |
Fields
| Improve this Doc View SourceHeight
The height of the rectangle.
Declaration
public int Height
Field Value
Type | Description |
---|---|
Int32 |
Width
The width of the rectangle.
Declaration
public int Width
Field Value
Type | Description |
---|---|
Int32 |
Properties
| Improve this Doc View SourceZero
Declaration
public static Size Zero { get; }
Property Value
Type | Description |
---|---|
Size |
Methods
| Improve this Doc View SourceEquals(Size)
Returns a value indicating whether this instance has the same dimensions as a specified Size structure.
Declaration
public bool Equals(Size other)
Parameters
Type | Name | Description |
---|---|---|
Size | other | The Size structure to compare to this instance. |
Returns
Type | Description |
---|---|
Boolean | true if |
Equals(Object)
Tests to see whether the specified object is a Size structure with the same dimensions as this Size structure.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The |
Returns
Type | Description |
---|---|
Boolean | true if |
GetHashCode()
Returns a hash code for this Size structure.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | An integer value that specifies a hash value for this Size structure. |
ToString()
Creates a
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A |
Operators
| Improve this Doc View SourceEquality(Size, Size)
Tests whether two Size structures are equal.
Declaration
public static bool operator ==(Size left, Size right)
Parameters
Type | Name | Description |
---|---|---|
Size | left | The Size structure on the left of the equality operator. |
Size | right | The Size structure on the right of the equality operator. |
Returns
Type | Description |
---|---|
Boolean | true if |
Inequality(Size, Size)
Tests whether two Size structures are different.
Declaration
public static bool operator !=(Size left, Size right)
Parameters
Type | Name | Description |
---|---|---|
Size | left | The Size structure on the left of the inequality operator. |
Size | right | The Size structure on the right of the inequality operator. |
Returns
Type | Description |
---|---|
Boolean | true if |