다음을 통해 공유


Point Struct

Definition

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

[System.Diagnostics.DebuggerDisplay("X={X}, Y={Y}")]
[Xamarin.Forms.TypeConverter(typeof(Xamarin.Forms.PointTypeConverter))]
public struct Point
type Point = struct
Inheritance
System.ValueType
Point
Attributes
System.Diagnostics.DebuggerDisplayAttribute TypeConverterAttribute

Constructors

Point(Double, Double)

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

Point(Size)

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

Fields

Zero

The Point at {0,0}.

Properties

IsEmpty

Whether both X and Y are 0.

X

Location along the horizontal axis.

Y

Location along the vertical axis.

Methods

Deconstruct(Double, Double)
Distance(Point)

Calculates the distance between two points.

Equals(Object)

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

GetHashCode()

Returns a hash value for the Point.

Offset(Double, Double)

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

Round()

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

ToString()

A human-readable representation of the Point.

Operators

Addition(Point, Size)

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

Equality(Point, Point)

Whether the two Points are equal.

Explicit(Point to Size)

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

Inequality(Point, Point)

Whether two points are not equal.

Subtraction(Point, Size)

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

Applies to