private void OnPaint(object sender, PaintEventArgs e) { var angularVelocity = Math.PI / 4; var angle = angularVelocity * (time * timer.Interval / 1000d); ImpossibleSquare.Draw(ClientSize.Width, ClientSize.Height, angle, e.Graphics); }
public void DrawExpectedImage() { const int width = 800; const int height = 600; var actual = new Bitmap(width, height); ImpossibleSquare.Draw(width, height, 0, Graphics.FromImage(actual)); //actual.Save(TestContext.CurrentContext.TestDirectory + "/expected-image.bmp"); AssertImageEquals(Resources.expected_image, actual); }