System.Drawing.Region.RectangleToPath C# (CSharp) Метод

RectangleToPath() статический приватный Метод

static private RectangleToPath ( RectangleF rect ) : Android.Graphics.Path
rect RectangleF
Результат Android.Graphics.Path
        static Path RectangleToPath(RectangleF rect)
        {
            Path path = new Path ();

            path.Add(new IntPoint(rect.Left * scale, rect.Top * scale));
            path.Add(new IntPoint(rect.Right * scale, rect.Top * scale));
            path.Add(new IntPoint(rect.Right * scale, rect.Bottom * scale));
            path.Add(new IntPoint(rect.Left * scale, rect.Bottom * scale));
            path.Add(new IntPoint(rect.Left * scale, rect.Top * scale));

            return path;
        }