Search Results for

    Show / Hide Table of Contents

    Struct Point

    Represents a 2D point with integer coordinates (usually zero-based).

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

    Constructors

    | Improve this Doc View Source

    Point(Point2f)

    Initializes a new instance of the Point structure from the specified Point2f structure.

    Declaration
    public Point(Point2f point)
    Parameters
    Type Name Description
    Point2f point

    The Point2f used to initialize this instance by rounding.

    | Improve this Doc View Source

    Point(Int32, Int32)

    Initializes a new instance of the Point structure from the specified coordinates.

    Declaration
    public Point(int x, int y)
    Parameters
    Type Name Description
    Int32 x

    The x-coordinate of the point.

    Int32 y

    The y-coordinate of the point.

    Fields

    | Improve this Doc View Source

    X

    The x-coordinate of the point.

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

    Y

    The y-coordinate of the point.

    Declaration
    public int Y
    Field Value
    Type Description
    Int32

    Properties

    | Improve this Doc View Source

    Zero

    Returns a Point that has X and Y values set to zero.

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

    Methods

    | Improve this Doc View Source

    Equals(Point)

    Returns a value indicating whether this instance has the same coordinates as a specified Point structure.

    Declaration
    public bool Equals(Point other)
    Parameters
    Type Name Description
    Point other

    The Point structure to compare to this instance.

    Returns
    Type Description
    Boolean

    true if other has the same X and Y coordinates as this instance; otherwise, false.

    | Improve this Doc View Source

    Equals(Object)

    Tests to see whether the specified object is a Point structure with the same coordinates as this Point 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 Point and has the same X and Y coordinates as this Point; otherwise, false.

    | Improve this Doc View Source

    GetHashCode()

    Returns a hash code for this Point structure.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    An integer value that specifies a hash value for this Point structure.

    | Improve this Doc View Source

    ToString()

    Creates a representation of this Point structure.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A containing the X and Y values of this Point structure.

    Operators

    | Improve this Doc View Source

    Addition(Point, Point)

    Adds two Point structures.

    Declaration
    public static Point operator +(Point left, Point right)
    Parameters
    Type Name Description
    Point left

    The Point structure on the left of the addition operator.

    Point right

    The Point structure on the right of the addition operator.

    Returns
    Type Description
    Point

    The Point that is the result of adding the left and right points.

    | Improve this Doc View Source

    Equality(Point, Point)

    Tests whether two Point structures are equal.

    Declaration
    public static bool operator ==(Point left, Point right)
    Parameters
    Type Name Description
    Point left

    The Point structure on the left of the equality operator.

    Point right

    The Point structure on the right of the equality operator.

    Returns
    Type Description
    Boolean

    true if left and right have equal X and Y coordinates; otherwise, false.

    | Improve this Doc View Source

    Inequality(Point, Point)

    Tests whether two Point structures are different.

    Declaration
    public static bool operator !=(Point left, Point right)
    Parameters
    Type Name Description
    Point left

    The Point structure on the left of the inequality operator.

    Point right

    The Point structure on the right of the inequality operator.

    Returns
    Type Description
    Boolean

    true if left and right differ either in X or Y coordinates; false if left and right are equal.

    | Improve this Doc View Source

    Multiply(Point, Int32)

    Multiplies a Point structure by an integer scalar.

    Declaration
    public static Point operator *(Point point, int scalar)
    Parameters
    Type Name Description
    Point point

    The Point structure to multiply by the scalar.

    Int32 scalar

    The scalar by which to multiply the point.

    Returns
    Type Description
    Point

    The Point that is the result of multiplying point by scalar.

    | Improve this Doc View Source

    Multiply(Int32, Point)

    Multiplies a Point structure by an integer scalar.

    Declaration
    public static Point operator *(int scalar, Point point)
    Parameters
    Type Name Description
    Int32 scalar

    The scalar by which to multiply the point.

    Point point

    The Point structure to multiply by the scalar.

    Returns
    Type Description
    Point

    The Point that is the result of multiplying point by scalar.

    | Improve this Doc View Source

    Subtraction(Point, Point)

    Subtracts two Point structures.

    Declaration
    public static Point operator -(Point left, Point right)
    Parameters
    Type Name Description
    Point left

    The Point structure on the left of the subtraction operator.

    Point right

    The Point structure on the right of the subtraction operator.

    Returns
    Type Description
    Point

    The Point that is the result of subtracting the left and right points.

    | Improve this Doc View Source

    UnaryNegation(Point)

    Returns the inversion with respect to the origin of the specified Point structure.

    Declaration
    public static Point operator -(Point point)
    Parameters
    Type Name Description
    Point point

    The Point structure for which to compute the inversion.

    Returns
    Type Description
    Point

    The Point that is the result of inverting point with respect to the origin.

    Implements

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