Point Structure (Microsoft.Xna.Framework)

Describes a 2D-point.

Namespace: Microsoft.Xna.Framework
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.398)
  • C#
  • VB
  • F#
[DebuggerDisplayAttribute("{DebugDisplayString,nq}")]
[DataContractAttribute]
[StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = -1, Size = -1)]
public struct Point : IEquatable<Point>

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

The Point type exposes the following members.

  Platforms Name Description
Point(int, int) Constructs a point with X and Y from two values. 
Point(int) Constructs a point with X and Y set to the same value. 
Top
  Platforms Name Description
X The x coordinate of this Point
Y The y coordinate of this Point
Top
  Platforms Name Description
Zero Returns a Point with coordinates 0, 0. 
Top
  Platforms Name Description
Deconstruct Deconstruction method for Point
Equals(object) Compares whether current instance is equal to specified System.Object. (Overrides ValueType.Equals().)
Equals(Point) Compares whether current instance is equal to specified Point. (Implements IEquatable<T>.Equals().)
GetHashCode Gets the hash code of this Point. (Overrides ValueType.GetHashCode().)
ToString Returns a System.String representation of this Point in the format: {X:[X] Y:[Y]} (Overrides ValueType.ToString().)
ToVector2 Gets a Vector2 representation for this object. 
Top
  Platforms Name Description
Addition Adds two points. 
Subtraction Subtracts a Point from a Point
Multiply Multiplies the components of two points by each other. 
Division Divides the components of a Point by the components of another Point
Equality Compares whether two Point instances are equal. 
Inequality Compares whether two Point instances are not equal. 
Top
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web