Click or drag to resize

Point Structure

A struct representing X and Y co-ordinates as integer values

Namespace:  Eto.Drawing
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
public struct Point : IEquatable<Point>

The Point type exposes the following members.

Constructors
  NameDescription
Public methodPoint(PointF)
Initializes a new instance of a Point class with truncated values of the specified floating-point point
Public methodPoint(Size)
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 methodPoint(Int32, Int32)
Initializes a new instance of a Point class with specified x and y values
Top
Properties
  NameDescription
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 methodDistance(Point)
Gets the distance between this point and the specified point
Public methodStatic memberDistance(Point, Point)
Gets the distance between two points using pythagoras theorem
Public methodDotProduct(Point)
Gets the dot product of this instance and the specified point
Public methodStatic memberDotProduct(Point, Point)
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(Point)
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 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(Point)
Offsets the X and Y co-ordinates of this point by the values from the specified point
Public methodOffset(Int32, Int32)
Offsets the X and Y co-ordinates of this point by the specified x and y values
Public methodStatic memberOffset(Point, Point)
Offsets the X and Y co-ordinates of the point by the values from the specified offset
Public methodStatic memberOffset(Point, Int32, Int32)
Offsets the X and Y co-ordinates of the point by the specified x and y values
Public methodRestrict(Rectangle)
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 methodStatic memberRound
Rounds the X and Y components of the specified point to a Point
Public methodToString
Converts this point to a string
(Overrides ValueTypeToString.)
Public methodStatic memberTruncate
Truncates the X and Y components of the specified point to a Point
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(Point, Point)
Operator to return the addition of two points as a Point
Public operatorStatic memberAddition(Point, Size)
Operator to add a size to a point
Public operatorStatic memberAddition(Point, Int32)
Operator to add a value to both the X and Y co-ordinates of a point
Public operatorStatic memberDivision(Point, Size)
Divides the specified point with a size
Public operatorStatic memberDivision(Point, Int32)
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(PointF to Point)
Explicit conversion from a PointF to a Point by truncating values
Public operatorStatic member(Size to Point)
Explicit conversion from a size to a Point with a X and Y of the Width and Height values of the size, respectively
Public operatorStatic memberInequality
Determines the inequality between two points
Public operatorStatic memberMultiply(Int32, Point)
Multiplies the X and Y co-ordinates of the specified point with a given factor
Public operatorStatic memberMultiply(Point, Point)
Multiplies the X and Y co-ordinates of the two specified point values
Public operatorStatic memberMultiply(Point, Size)
Multiplies the specified point with a size
Public operatorStatic memberMultiply(Point, Int32)
Multiplies the X and Y co-ordinates of the specified point with a given factor
Public operatorStatic memberMultiply(Point, Single)
Multiplies the X and Y of a point by the specified floating point factor
Public operatorStatic memberSubtraction(Point, Point)
Operator to return the difference between two points as a Size
Public operatorStatic memberSubtraction(Point, Size)
Operator to subtract a size from a point
Public operatorStatic memberSubtraction(Point, Int32)
Operator to subtract a value from both the X and Y co-ordinates of a point
Public operatorStatic memberUnaryNegation
Returns a new Point 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