using Microsoft.Xna.Framework; namespace MonoGame.Extended.Tilemaps { /// /// Represents an elliptical object in a tilemap. /// public class TilemapEllipseObject : TilemapObject { /// /// Gets or sets the size of the ellipse's bounding rectangle. /// public Vector2 Size { get; set; } /// /// Gets the center point of the ellipse. /// public Vector2 Center { get { return Position + Size * 0.5f; } } /// /// Gets the horizontal radius of the ellipse. /// public float RadiusX { get { return Size.X * 0.5f; } } /// /// Gets the vertical radius of the ellipse. /// public float RadiusY { get { return Size.Y * 0.5f; } } /// public override RectangleF Bounds { get { return new RectangleF(Position.X, Position.Y, Size.X, Size.Y); } } /// /// Initializes a new instance of the class. /// /// The unique identifier for the object. /// The position fo the top-left corner of the bounding rectangle. /// The size of the bounding rectangle. public TilemapEllipseObject(int id, Vector2 position, Vector2 size) : base(id, position) { Size = size; } } }