Click or drag to resize

PointF Structure

A struct representing X and Y co-ordinates as floating point values

Namespace:  Eto.Drawing
Assembly:  Eto (in Eto.dll) Version: 2.4.0
Syntax
[TypeConverterAttribute(typeof(PointFConverter))]
public struct PointF : IEquatable<PointF>

The PointF type exposes the following members.

Constructors
  NameDescription
Public methodPointF(Point)
Initializes a new instance of a PointF class with values of the Pointpoint
Public methodPointF(SizeF)
Initializes a new instance of a Point class with X and Y values corresponding to the Width and Height values of the specified size, respecitively
Public methodPointF(Single, Single)
Initializes a new instance of a Point class with specified x and y values
Top
Properties
  NameDescription
Public propertyAngle
Gets the angle of the point as a vector from origin 0,0.
Public propertyIsZero
Gets a value indicating that both the X and Y co-ordinates of this point are zero
Public propertyLength
Gets the length of the point as a vector from origin 0,0
Public propertyLengthSquared
Gets the squared length of the point as a vector from origin 0,0.
Public propertyNormal
Gets the point as a normal vector (perpendicular) to the current point from the origin
Public propertyUnitVector
Gets the current point as a unit vector (a point with a Length of 1.0 from origin 0,0)
Public propertyX
Gets or sets the X co-ordinate of this point
Public propertyY
Gets or sets the Y co-ordinate of this point
Top
Methods
  NameDescription
Public methodStatic memberAbs
Returns the absolute X and Y components of the specified point
Public methodAngleTo
Gets the angle of the width/height as a vector from the specified destination.
Public methodDistance(PointF)
Gets the distance between this point and the specified point
Public methodStatic memberDistance(PointF, PointF)
Gets the distance between two points using pythagoras theorem
Public methodDotProduct(PointF)
Gets the dot product of this instance and the specified point
Public methodStatic memberDotProduct(PointF, PointF)
Gets the dot product between two points
Public methodEquals(Object)
Returns a value indicating that the specified obj is equal to this point
(Overrides ValueTypeEquals(Object).)
Public methodEquals(PointF)
Returns a value indicating that the specified other point is equal to this point
Public methodGetHashCode
Gets the hash code of this point
(Overrides ValueTypeGetHashCode.)
Public methodLengthTo
Gets the length between this point and the destination point.
Public methodStatic memberMax
Returns the maximum X and Y components of two points
Public methodStatic memberMin
Returns the minimum X and Y components of two points
Public methodOffset(PointF)
Offsets the X and Y co-ordinates of this point by the values from the specified offset
Public methodOffset(Single, Single)
Offsets the X and Y co-ordinates of this point by the specified x and y values
Public methodStatic memberOffset(PointF, PointF)
Offsets the X and Y co-ordinates of the point by the values from the specified offset
Public methodStatic memberOffset(PointF, Single, Single)
Offsets the X and Y co-ordinates of the point by the specified x and y values
Public methodRestrict(RectangleF)
Restricts the X and Y co-ordinates within the specified rectangle
Public methodStatic memberRestrict(Point, Rectangle)
Restricts the X and Y co-ordinates of the specified point within the rectangle
Public methodRotate(Single)
Treats the point as a vector and rotates it around the origin (0,0) by the specified angle.
Public methodStatic memberRotate(PointF, Single)
Treats the point as a vector and rotates it around the origin (0,0) by the specified angle.
Public methodToString
Converts this point to a string
(Overrides ValueTypeToString.)
Public methodStatic memberUnitVectorAtAngle
Creates a unit vector PointF (a point with a Length of 1.0 from origin 0,0) with the specified angle, in degrees
Top
Operators
  NameDescription
Public operatorStatic memberAddition(PointF, PointF)
Operator to return the addition of two points as a PointF
Public operatorStatic memberAddition(PointF, SizeF)
Operator to add a size to a point
Public operatorStatic memberAddition(PointF, Single)
Operator to add a value to both the X and Y co-ordinates of a point
Public operatorStatic memberDivision(PointF, SizeF)
Divides the specified point with a size
Public operatorStatic memberDivision(PointF, Single)
Divides the X and Y co-ordinates of the specified point with a given value
Public operatorStatic memberEquality
Determines equality between two points
Public operatorStatic member(SizeF to PointF)
Explicit conversion from a size to a PointF with a X and Y of the Width and Height values of the size, respectively
Public operatorStatic member(Point to PointF)
Implicit conversion from a Point to a PointF
Public operatorStatic memberInequality
Determines the inequality between two points
Public operatorStatic memberMultiply(Single, PointF)
Multiplies the X and Y co-ordinates of the specified point with a given factor
Public operatorStatic memberMultiply(PointF, PointF)
Multiplies the X and Y co-ordinates of the two specified point values
Public operatorStatic memberMultiply(PointF, SizeF)
Multiplies the specified point with a size
Public operatorStatic memberMultiply(PointF, Single)
Multiplies the X and Y co-ordinates of the specified point with a given factor
Public operatorStatic memberSubtraction(PointF, PointF)
Operator to return the difference between two points as a PointF
Public operatorStatic memberSubtraction(PointF, SizeF)
Operator to subtract a size from a point
Public operatorStatic memberSubtraction(PointF, Single)
Operator to subtract a value from both the X and Y co-ordinates of a point
Public operatorStatic memberUnaryNegation
Returns a new PointF with negative x and y values of the specified point
Top
Fields
  NameDescription
Public fieldStatic memberEmpty
Gets an empty point with an X and Y value of zero
Top
Remarks
The point struct is used for drawing and positioning of elements and widgets
See Also