PointF 结构

定义

表示在二维平面中定义点的浮点 x 和 y 坐标的有序对。Represents an ordered pair of floating-point x- and y-coordinates that defines a point in a two-dimensional plane.

public value class PointF : IEquatable<System::Drawing::PointF>
public value class PointF
public struct PointF : IEquatable<System.Drawing.PointF>
public struct PointF
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public struct PointF
type PointF = struct
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type PointF = struct
Public Structure PointF
Implements IEquatable(Of PointF)
Public Structure PointF
继承
PointF
属性
实现

注解

若要将转换 PointFPoint ,请使用 Point.RoundPoint.TruncateTo convert a PointF to a Point, use Point.Round or Point.Truncate.

构造函数

PointF(Single, Single)

用指定坐标初始化 PointF 类的新实例。Initializes a new instance of the PointF class with the specified coordinates.

字段

Empty

表示 PointF 类的、成员数据未被初始化的新实例。Represents a new instance of the PointF class with member data left uninitialized.

属性

IsEmpty

获取一个值,该值指示此 PointF 是否为空。Gets a value indicating whether this PointF is empty.

X

获取或设置此 PointF 的 x 坐标。Gets or sets the x-coordinate of this PointF.

Y

获取或设置此 PointF 的 y 坐标。Gets or sets the y-coordinate of this PointF.

方法

Add(PointF, Size)

按指定的 PointF 平移给定的 SizeTranslates a given PointF by the specified Size.

Add(PointF, SizeF)

按指定的 PointF 平移给定的 SizeFTranslates a given PointF by a specified SizeF.

Equals(Object)

指定此 PointF 是否包含与指定 Object 有相同的坐标。Specifies whether this PointF contains the same coordinates as the specified Object.

Equals(PointF)

指示当前对象是否等于同一类型的另一个对象。Indicates whether the current object is equal to another object of the same type.

GetHashCode()

返回此 PointF 结构的哈希代码。Returns a hash code for this PointF structure.

Subtract(PointF, Size)

按指定大小的负值平移 PointFTranslates a PointF by the negative of a specified size.

Subtract(PointF, SizeF)

按指定大小的负值平移 PointFTranslates a PointF by the negative of a specified size.

ToString()

将此 PointF 转换为可读字符串。Converts this PointF to a human readable string.

运算符

Addition(PointF, Size)

PointF 平移给定 SizeTranslates a PointF by a given Size.

Addition(PointF, SizeF)

按指定的 PointF 平移 SizeFTranslates the PointF by the specified SizeF.

Equality(PointF, PointF)

比较两个 PointF 结构。Compares two PointF structures. 此结果指定两个 X 结构的 YPointF 属性的值是否相等。The result specifies whether the values of the X and Y properties of the two PointF structures are equal.

Inequality(PointF, PointF)

确定指定点的坐标是否不等。Determines whether the coordinates of the specified points are not equal.

Subtraction(PointF, Size)

PointF 平移给定 Size 的负数。Translates a PointF by the negative of a given Size.

Subtraction(PointF, SizeF)

按指定 PointF 的负值平移 SizeFTranslates a PointF by the negative of a specified SizeF.

适用于