mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-15 15:09:29 +00:00
Add RectangleF.TopRight (#661)
There was a TopLeft and a BottomRight, but no TopRight or BottomLeft... But there could be. :)
This commit is contained in:
@@ -120,6 +120,16 @@ namespace MonoGame.Extended
|
||||
/// </summary>
|
||||
public Point2 TopLeft => new Point2(X, Y);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="Point2" /> representing the top-right of this <see cref="RectangleF" />.
|
||||
/// </summary>
|
||||
public Point2 TopRight => new Point2(X + Width, Y);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="Point2" /> representing the bottom-left of this <see cref="RectangleF" />.
|
||||
/// </summary>
|
||||
public Point2 BottomLeft => new Point2(X, Y + Height);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="Point2" /> representing the bottom-right of this <see cref="RectangleF" />.
|
||||
/// </summary>
|
||||
@@ -679,4 +689,4 @@ namespace MonoGame.Extended
|
||||
|
||||
internal string DebugDisplayString => string.Concat(X, " ", Y, " ", Width, " ", Height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user