Search Results for

    Show / Hide Table of Contents

    Struct Size

    Represents the pixel-accurate size of a rectangle.

    Implements
    IEquatable<Size>
    Namespace: OpenCV.Net
    Assembly: OpenCV.Net.dll
    Syntax
    public struct Size : IEquatable<Size>

    Constructors

    | Improve this Doc View Source

    Size(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 Source

    Height

    The height of the rectangle.

    Declaration
    public int Height
    Field Value
    Type Description
    Int32
    | Improve this Doc View Source

    Width

    The width of the rectangle.

    Declaration
    public int Width
    Field Value
    Type Description
    Int32

    Properties

    | Improve this Doc View Source

    Zero

    Returns a Size that has Width and Height values set to zero.

    Declaration
    public static Size Zero { get; }
    Property Value
    Type Description
    Size

    Methods

    | Improve this Doc View Source

    Equals(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 other has the same width and height as this instance; otherwise, false.

    | Improve this Doc View Source

    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 to test.

    Returns
    Type Description
    Boolean

    true if obj is a Size and has the same width and height as this Size; otherwise, false.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    ToString()

    Creates a representation of this Size structure.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A containing the Width and Height values of this Size structure.

    Operators

    | Improve this Doc View Source

    Equality(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 left and right have equal width and height; otherwise, false.

    | Improve this Doc View Source

    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 left and right differ either in width or height; false if left and right are equal.

    Implements

    IEquatable<>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX