Author: spouliot
Date: 2006-07-06 08:11:15 -0400 (Thu, 06 Jul 2006)
New Revision: 62311
Modified:
trunk/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog
trunk/mcs/class/System.Drawing/Test/System.Drawing/SolidBrushTest.cs
Log:
2006-07-06 Sebastien Pouliot <[EMAIL PROTECTED]>
* SolidBrushTest.cs: New test case using DrawLine.
Modified: trunk/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog
===================================================================
--- trunk/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog
2006-07-06 12:10:03 UTC (rev 62310)
+++ trunk/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog
2006-07-06 12:11:15 UTC (rev 62311)
@@ -1,3 +1,7 @@
+2006-07-06 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * SolidBrushTest.cs: New test case using DrawLine.
+
2006-07-04 Sebastien Pouliot <[EMAIL PROTECTED]>
* TestImage.cs: Add test cases for GetThumbnailImage.
Modified: trunk/mcs/class/System.Drawing/Test/System.Drawing/SolidBrushTest.cs
===================================================================
--- trunk/mcs/class/System.Drawing/Test/System.Drawing/SolidBrushTest.cs
2006-07-06 12:10:03 UTC (rev 62310)
+++ trunk/mcs/class/System.Drawing/Test/System.Drawing/SolidBrushTest.cs
2006-07-06 12:11:15 UTC (rev 62311)
@@ -89,5 +89,22 @@
Assert.AreEqual (0, bmp.GetPixel (9, 9).ToArgb
(), "9,9");
}
}
+
+ [Test]
+ public void DrawLine ()
+ {
+ using (Bitmap bmp = new Bitmap (10, 10)) {
+ using (Graphics g = Graphics.FromImage (bmp)) {
+ SolidBrush sb = new SolidBrush
(Color.Red);
+ Pen p = new Pen (sb);
+ g.DrawLine (p, 0, 0, 9, 9);
+ sb.Color = Color.Blue;
+ g.DrawLine (p, 8, 8, 4, 4); // pen is
still red
+ }
+ Assert.AreEqual (Color.Red.ToArgb (),
bmp.GetPixel (0, 0).ToArgb (), "0,0");
+ Assert.AreEqual (Color.Red.ToArgb (),
bmp.GetPixel (8, 8).ToArgb (), "8,8");
+ Assert.AreEqual (Color.Red.ToArgb (),
bmp.GetPixel (9, 9).ToArgb (), "9,9"); // include end point
+ }
+ }
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches