System.Drawing.Rectangle.FromLTRB C# (CSharp) Method

FromLTRB() public static method

public static FromLTRB ( int left, int top, int right, int bottom ) : System.Drawing.Rectangle
left int
top int
right int
bottom int
return System.Drawing.Rectangle
        public static System.Drawing.Rectangle FromLTRB(int left, int top, int right, int bottom) { throw null; }
        public override int GetHashCode() { throw null; }

Same methods

Rectangle::FromLTRB ( int left, int top, int right, int bottom ) : Rectangle

Usage Example

Beispiel #1
0
        /// <summary>
        /// Return a rectangle of our coordinates
        /// </summary>
        /// <param name="topLeft"></param>
        /// <param name="bottomRight"></param>
        /// <returns></returns>
        public Rectangle ConvertRectangle(PointF topLeft, PointF bottomRight)
        {
            Point topLeftXY     = ConvertPoint(topLeft);
            Point bottomRightXY = ConvertPoint(bottomRight);

            return(Rectangle.FromLTRB(Math.Min(topLeftXY.X, bottomRightXY.X), Math.Min(topLeftXY.Y, bottomRightXY.Y), Math.Max(topLeftXY.X, bottomRightXY.X), Math.Max(topLeftXY.Y, bottomRightXY.Y)));
        }
All Usage Examples Of System.Drawing.Rectangle::FromLTRB