Upravit

Sdílet prostřednictvím


SKPoint Struct

Definition

Represents an ordered pair of floating-point x- and y-coordinates that defines a point in a two-dimensional plane.

public struct SKPoint
public struct SKPoint : IEquatable<SkiaSharp.SKPoint>
Inheritance
SKPoint
Implements

Remarks

To convert a SKPoint to a SKPointI, use Round(SKPoint) or Truncate(SKPoint).

Constructors

SKPoint(Single, Single)

Creates a new instance of a point with the specified coordinates.

Fields

Empty

Represents a new instance of the SKPoint class with member data left uninitialized.

Properties

IsEmpty

Gets a value indicating whether this point is empty.

Length

Gets the Euclidean distance from the origin (0, 0).

LengthSquared

Gets the Euclidean distance squared from the origin (0, 0).

X

Gets or sets the x-coordinate of this SKPoint.

Y

Gets or sets the x-coordinate of this SKPoint.

Methods

Add(SKPoint, SKPoint)

Translates a given point by a specified offset.

Add(SKPoint, SKPointI)

Translates a given point by a specified offset.

Add(SKPoint, SKSize)

Translates a given point by a specified size.

Add(SKPoint, SKSizeI)

Translates a given point by a specified size.

Distance(SKPoint, SKPoint)

Calculate the Euclidean distance between two points.

DistanceSquared(SKPoint, SKPoint)

Calculate the Euclidean distance squared between two points.

Equals(Object)

Specifies whether this SKPoint contains the same coordinates as the specified Object.

Equals(SKPoint)

Specifies whether this SKPoint contains the same coordinates as the specified SKPoint.

GetHashCode()

Calculates the hashcode for this point.

Normalize(SKPoint)

Returns a point with the same direction as the specified point, but with a length of one.

Offset(Single, Single)

Translates a given point by a specified offset.

Offset(SKPoint)

Translates a given point by a specified offset.

Reflect(SKPoint, SKPoint)

Returns the reflection of a point off a surface that has the specified normal.

Subtract(SKPoint, SKPoint)

Translates a given point by the negative of a specified offset.

Subtract(SKPoint, SKPointI)

Translates a given point by the negative of a specified offset.

Subtract(SKPoint, SKSize)

Translates a SKPoint by the negative of a specified size.

Subtract(SKPoint, SKSizeI)

Translates a SKPoint by the negative of a specified size.

ToString()

Converts this SKPoint to a human readable string.

Operators

Addition(SKPoint, SKPoint)

Translates a given point by a specified offset.

Addition(SKPoint, SKPointI)

Translates a given point by a specified offset.

Addition(SKPoint, SKSize)

Translates a given point by a specified size.

Addition(SKPoint, SKSizeI)

Translates a given point by a specified size.

Equality(SKPoint, SKPoint)

Compares two SKPoint structures. The result specifies whether the values of the X and Y properties of the two SKPoint structures are equal.

Inequality(SKPoint, SKPoint)

Determines whether the coordinates of the specified points are not equal.

Subtraction(SKPoint, SKPoint)

Translates a given point by the negative of a specified offset.

Subtraction(SKPoint, SKPointI)

Translates a given point by the negative of a specified offset.

Subtraction(SKPoint, SKSize)

Translates a SKPoint by the negative of a given SKSize.

Subtraction(SKPoint, SKSizeI)

Translates a SKPoint by the negative of a given SKSizeI.

Applies to