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