Show / Hide Table of Contents

    Struct Point

    Struct defining a 2-D point as a pair of doubles.

    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Tizen.UIExtensions.Common
    Assembly: Tizen.UIExtensions.NUI.dll
    Syntax
    public struct Point

    Constructors

    Point(Double, Double)

    Creates a new Point object that represents the point (x,y).

    Declaration
    public Point(double x, double y)
    Parameters
    Type Name Description
    System.Double x

    The horizontal coordinate.

    System.Double y

    The vertical coordinate.

    Point(Size)

    Creates a new Point object that has coordinates that are specified by the width and height of sz, in that order.

    Declaration
    public Point(Size sz)
    Parameters
    Type Name Description
    Size sz

    Size that specifies a Point that has the coordinates (Width, Height).

    Fields

    Zero

    The Point at {0,0}.

    Declaration
    public static Point Zero
    Field Value
    Type Description
    Point

    Properties

    IsEmpty

    Whether both X and Y are 0.

    Declaration
    public bool IsEmpty { get; }
    Property Value
    Type Description
    System.Boolean

    true if both X and Y are 0.0.

    X

    Location along the horizontal axis.

    Declaration
    public double X { get; set; }
    Property Value
    Type Description
    System.Double

    Y

    Location along the vertical axis.

    Declaration
    public double Y { get; set; }
    Property Value
    Type Description
    System.Double

    Methods

    Deconstruct(out Double, out Double)

    Declaration
    public void Deconstruct(out double x, out double y)
    Parameters
    Type Name Description
    System.Double x
    System.Double y

    Distance(Point)

    Calculates the distance between two points.

    Declaration
    public double Distance(Point other)
    Parameters
    Type Name Description
    Point other

    The Point to which the distance is calculated.

    Returns
    Type Description
    System.Double

    The distance between this and the other.

    Equals(Object)

    Returns true if the X and Y values of this are exactly equal to those in the argument.

    Declaration
    public override bool Equals(object o)
    Parameters
    Type Name Description
    System.Object o

    Another Point.

    Returns
    Type Description
    System.Boolean

    true if the X and Y values are equal to those in o. Returns false if o is not a Point.

    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    Returns a hash value for the Point.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    A value intended for efficient insertion and lookup in hashtable-based data structures.

    Overrides
    System.ValueType.GetHashCode()

    Offset(Double, Double)

    Returns a new Point that translates the current Point by dx and dy.

    Declaration
    public Point Offset(double dx, double dy)
    Parameters
    Type Name Description
    System.Double dx

    The amount to add along the X axis.

    System.Double dy

    The amount to add along the Y axis.

    Returns
    Type Description
    Point

    A new Point at [this.X + dx, this.Y + dy].

    Round()

    Returns a new Point whose X and Y have been rounded to the nearest integral value.

    Declaration
    public Point Round()
    Returns
    Type Description
    Point

    A new Point whose X and Y have been rounded to the nearest integral value, per the behavior of Math.Round(Double).

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.ValueType.ToString()

    Operators

    Addition(Point, Size)

    Returns a new Point by adding a Size to a Point.

    Declaration
    public static Point operator +(Point pt, Size sz)
    Parameters
    Type Name Description
    Point pt

    The Point to which sz is being added.

    Size sz

    The values to add to pt.

    Returns
    Type Description
    Point

    A new Point at [pt.X + sz.Width, pt.Y + sz.Height].

    Equality(Point, Point)

    Whether the two Points are equal.

    Declaration
    public static bool operator ==(Point ptA, Point ptB)
    Parameters
    Type Name Description
    Point ptA

    The first point to compare.

    Point ptB

    The second point to compare.

    Returns
    Type Description
    System.Boolean

    Explicit(Point to Size)

    Returns a new Size whose Width and Height and equivalent to the pt's X and Y properties.

    Declaration
    public static explicit operator Size(Point pt)
    Parameters
    Type Name Description
    Point pt

    The Point to be translated as a Size.

    Returns
    Type Description
    Size

    A new Size based on the pt.

    Inequality(Point, Point)

    Declaration
    public static bool operator !=(Point ptA, Point ptB)
    Parameters
    Type Name Description
    Point ptA
    Point ptB
    Returns
    Type Description
    System.Boolean

    Subtraction(Point, Size)

    Returns a new Point by subtracting a Size from a Point.

    Declaration
    public static Point operator -(Point pt, Size sz)
    Parameters
    Type Name Description
    Point pt

    The Point from which sz is to be subtracted.

    Size sz

    The Size whose Width and Height will be subtracted from pt's X and Y.

    Returns
    Type Description
    Point

    A new Point at [pt.X - sz.Width, pt.Y - sz.Height].

    Extension Methods

    UnitExtensions.ToNative(Point)
    Back to top Copyright © 2021 Samsung
    Generated by DocFX