System.Drawing.GeomUtilities.TransformRectangle C# (CSharp) Метод

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

static private TransformRectangle ( RectangleF &rectangle, Matrix matrix ) : void
rectangle RectangleF
matrix Matrix
Результат void
        internal static void TransformRectangle(ref RectangleF rectangle, Matrix matrix)
        {
            var transform = matrix.transform;
            var x = rectangle.X;
            var y = rectangle.Y;

            rectangle.X = (float)(transform.xx * x + transform.xy * y + transform.x0);
            rectangle.Y = (float)(transform.yx * x + transform.yy * y + transform.y0);

            x = rectangle.Width;
            y = rectangle.Height;

            rectangle.Width = (float)(transform.xx * x + transform.xy * y + transform.x0);
            rectangle.Height = (float)(transform.yx * x + transform.yy * y + transform.y0);
        }