using DotSDL.Interop.Core; using DotSDL.Math.Vector; namespace DotSDL.Graphics { /// /// Represents a point in 2D space. /// public class Point : Vector2 { /// /// The base structure that this class wraps around. /// internal Rect.SdlPoint SdlPoint => new Rect.SdlPoint { X = X, Y = Y }; /// /// Returns a with the coordinates (1, 1). /// public new static Point One => new Point(1, 1); /// /// Returns a with the coordinates (1, 0). /// public new static Point UnitX => new Point(1, 0); /// /// Returns a with the coordinates (0, 1). /// public new static Point UnitY => new Point(0, 1); /// /// Returns a with the coordinates (0, 0). /// public new static Point Zero => new Point(0, 0); /// /// Creates a new with the coordinates (0, 0). /// public Point() : this(Zero) { } /// /// Creates a new based on an existing . /// /// The to base this new object on. public Point(Point point) { X = point.X; Y = point.Y; } /// /// Creates a new based on an existing . /// /// The to based this new object on. public Point(Vector2 vec) { X = vec.X; Y = vec.Y; } /// /// Creates a new based on integer coordinates. /// /// The X coordinate of the new . /// The Y coordinate of the new . public Point(int x, int y) { X = x; Y = y; } } }