Microsoft.Protocols.TestSuites.Rdpegfx.RdpegfxTestUtility.drawDiagonal C# (CSharp) Method

drawDiagonal() public static method

Draw an image with a diagonal
public static drawDiagonal ( Image srcImage ) : Bitmap
srcImage Image The source image
return System.Drawing.Bitmap
        public static Bitmap drawDiagonal(Image srcImage)
        {
            Bitmap newBmp = (Bitmap)srcImage;
            for (int x = 0; x < newBmp.Width; x++)
            {
                int y = (x * newBmp.Height) / newBmp.Width;
                newBmp.SetPixel(x, y, Color.Black);
            }

            return newBmp;
        }