This documentation is archived and is not being maintained.

PointF Structure

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

Namespace:  System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

public struct PointF

The PointF type exposes the following members.

Public methodPointFInitializes a new instance of the PointF class with the specified coordinates.

Public propertyIsEmptyGets a value indicating whether this PointF is empty.
Public propertyXGets or sets the x-coordinate of this PointF.
Public propertyYGets or sets the y-coordinate of this PointF.

Public methodStatic memberAdd(PointF, Size)Translates a given PointF by the specified Size.
Public methodStatic memberAdd(PointF, SizeF)Translates a given PointF by a specified SizeF.
Public methodEqualsSpecifies whether this PointF contains the same coordinates as the specified Object. (Overrides ValueType.Equals(Object).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeReturns a hash code for this PointF structure. (Overrides ValueType.GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic memberSubtract(PointF, Size)Translates a PointF by the negative of a specified size.
Public methodStatic memberSubtract(PointF, SizeF)Translates a PointF by the negative of a specified size.
Public methodToStringConverts this PointF to a human readable string. (Overrides ValueType.ToString().)

Public operatorStatic memberAddition(PointF, Size)Translates a PointF by a given Size.
Public operatorStatic memberAddition(PointF, SizeF)Translates the PointF by the specified SizeF.
Public operatorStatic memberEqualityCompares two PointF structures. The result specifies whether the values of the X and Y properties of the two PointF structures are equal.
Public operatorStatic memberInequalityDetermines whether the coordinates of the specified points are not equal.
Public operatorStatic memberSubtraction(PointF, Size)Translates a PointF by the negative of a given Size.
Public operatorStatic memberSubtraction(PointF, SizeF)Translates a PointF by the negative of a specified SizeF.

Public fieldStatic memberEmptyRepresents a new instance of the PointF class with member data left uninitialized.

To convert a PointF to a Point, use Point.Round or Point.Truncate.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.