Permalink
Browse files

- Test app for testing ImageList class

svn path=/trunk/winforms/; revision=40051
  • Loading branch information...
1 parent a90dc10 commit 0f4439090b84db3832187f3eef6a5eb2392102ea Peter Dennis Bartok committed Feb 3, 2005
Showing with 38 additions and 0 deletions.
  1. +6 −0 imagelist/Makefile
  2. BIN imagelist/a.png
  3. BIN imagelist/b.png
  4. +32 −0 imagelist/swf-imagelist.cs
View
@@ -0,0 +1,6 @@
+
+imagelist.exe: swf-imagelist.cs
+ mcs /r:System.Drawing.dll /r:System.Windows.Forms.dll swf-imagelist.cs
+
+clean:
+ rm swf-imagelist.exe
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,32 @@
+//
+// Test drawing of imagelist. Output in image.bmp
+//
+
+
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+
+public class T {
+
+ public static void Main ()
+ {
+ Bitmap b = new Bitmap (250, 20);
+ ImageList il = new ImageList ();
+
+ il.ColorDepth = ColorDepth.Depth32Bit;
+ il.ImageSize = new Size (15, 15);
+
+ il.Images.Add (Image.FromFile ("a.png"));
+ il.Images.Add (Image.FromFile ("b.png"));
+
+ Graphics g = Graphics.FromImage (b);
+ il.Draw (g, 5, 3, 0);
+ g.DrawString ("aaa", new Font ("arial", 15), new SolidBrush (Color.Red), new Point (20, 5));
+ il.Draw (g, 50, 3, 1);
+
+ b.Save ("image.bmp");
+ }
+}
+

0 comments on commit 0f44390

Please sign in to comment.