diff --git a/MBS.Framework/Drawing/Rectangle.cs b/MBS.Framework/Drawing/Rectangle.cs index b567f13..54c3e43 100644 --- a/MBS.Framework/Drawing/Rectangle.cs +++ b/MBS.Framework/Drawing/Rectangle.cs @@ -78,6 +78,24 @@ namespace MBS.Framework.Drawing return rect; } + /// + /// Creates a from left, top, right, bottom coordinates. + /// + /// The ltrb. + /// Bounding box l. + /// Bounding box t. + /// Bounding box r. + /// Bounding box b. + public static Rectangle FromLTRB(double left, double top, double right, double bottom) + { + Rectangle rect = new Rectangle(); + rect.X = left; + rect.Y = top; + rect.Right = right; + rect.Bottom = bottom; + return rect; + } + /// /// Normalize this instance. ///