Search Results for

    Show / Hide Table of Contents

    Struct Point

    Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane.
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Terminal.Gui
    Assembly: Terminal.Gui.dll
    Syntax
    public struct Point

    Constructors

    | Edit this page View Source

    Point(int, int)

    Point Constructor
    Declaration
    public Point(int x, int y)
    Parameters
    Type Name Description
    int x
    int y
    Remarks
    Creates a Point from a specified x,y coordinate pair.
    | Edit this page View Source

    Point(Size)

    Point Constructor
    Declaration
    public Point(Size sz)
    Parameters
    Type Name Description
    Size sz
    Remarks
    Creates a Point from a Size value.

    Fields

    | Edit this page View Source

    Empty

    Empty Shared Field
    Declaration
    public static readonly Point Empty
    Field Value
    Type Description
    Point
    Remarks
    An uninitialized Point Structure.
    | Edit this page View Source

    X

    Gets or sets the x-coordinate of this Point.
    Declaration
    public int X
    Field Value
    Type Description
    int
    | Edit this page View Source

    Y

    Gets or sets the y-coordinate of this Point.
    Declaration
    public int Y
    Field Value
    Type Description
    int

    Properties

    | Edit this page View Source

    IsEmpty

    IsEmpty Property
    Declaration
    public bool IsEmpty { get; }
    Property Value
    Type Description
    bool
    Remarks
    Indicates if both X and Y are zero.

    Methods

    | Edit this page View Source

    Add(Point, Size)

    Adds the specified Size to the specified Point.
    Declaration
    public static Point Add(Point pt, Size sz)
    Parameters
    Type Name Description
    Point pt The Point to add.
    Size sz The Size to add.
    Returns
    Type Description
    Point The Point that is the result of the addition operation.
    | Edit this page View Source

    Equals(object)

    Equals Method
    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    ValueType.Equals(object)
    Remarks
    Checks equivalence of this Point and another object.
    | Edit this page View Source

    GetHashCode()

    GetHashCode Method
    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    ValueType.GetHashCode()
    Remarks
    Calculates a hashing value.
    | Edit this page View Source

    Offset(int, int)

    Offset Method
    Declaration
    public void Offset(int dx, int dy)
    Parameters
    Type Name Description
    int dx
    int dy
    Remarks
    Moves the Point a specified distance.
    | Edit this page View Source

    Offset(Point)

    Translates this Point by the specified Point.
    Declaration
    public void Offset(Point p)
    Parameters
    Type Name Description
    Point p The Point used offset this Point.
    | Edit this page View Source

    Subtract(Point, Size)

    Returns the result of subtracting specified Size from the specified Point.
    Declaration
    public static Point Subtract(Point pt, Size sz)
    Parameters
    Type Name Description
    Point pt The Point to be subtracted from.
    Size sz The Size to subtract from the Point.
    Returns
    Type Description
    Point The Point that is the result of the subtraction operation.
    | Edit this page View Source

    ToString()

    ToString Method
    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    ValueType.ToString()
    Remarks
    Formats the Point as a string in coordinate notation.

    Operators

    | Edit this page View Source

    operator +(Point, Size)

    Addition Operator
    Declaration
    public static Point operator +(Point pt, Size sz)
    Parameters
    Type Name Description
    Point pt
    Size sz
    Returns
    Type Description
    Point
    Remarks
    Translates a Point using the Width and Height properties of the given Size.
    | Edit this page View Source

    operator ==(Point, Point)

    Equality Operator
    Declaration
    public static bool operator ==(Point left, Point right)
    Parameters
    Type Name Description
    Point left
    Point right
    Returns
    Type Description
    bool
    Remarks
    Compares two Point objects. The return value is based on the equivalence of the X and Y properties of the two points.
    | Edit this page View Source

    explicit operator Size(Point)

    Point to Size Conversion
    Declaration
    public static explicit operator Size(Point p)
    Parameters
    Type Name Description
    Point p
    Returns
    Type Description
    Size
    Remarks
    Returns a Size based on the Coordinates of a given Point. Requires explicit cast.
    | Edit this page View Source

    operator !=(Point, Point)

    Inequality Operator
    Declaration
    public static bool operator !=(Point left, Point right)
    Parameters
    Type Name Description
    Point left
    Point right
    Returns
    Type Description
    bool
    Remarks
    Compares two Point objects. The return value is based on the equivalence of the X and Y properties of the two points.
    | Edit this page View Source

    operator -(Point, Size)

    Subtraction Operator
    Declaration
    public static Point operator -(Point pt, Size sz)
    Parameters
    Type Name Description
    Point pt
    Size sz
    Returns
    Type Description
    Point
    Remarks
    Translates a Point using the negation of the Width and Height properties of the given Size.
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX