rendered paste bodyIndex: ImageList.cs
===================================================================
--- ImageList.cs (revision 60088)
+++ ImageList.cs (working copy)
@@ -171,14 +171,14 @@
}
[Flags()]
- private enum ItemFlags
+ internal enum ItemFlags
{
None = 0,
UseTransparentColor = 1,
ImageStrip = 2
}
- private sealed class ImageListItem
+ internal sealed class ImageListItem
{
internal readonly object Image;
internal readonly ItemFlags Flags;
@@ -223,7 +223,7 @@
private ColorDepth colorDepth = DefaultColorDepth;
private Size imageSize = DefaultImageSize;
private Color transparentColor = DefaultTransparentColor;
- private ArrayList list = new ArrayList();
+ internal ArrayList list = new ArrayList();
#if NET_2_0
private ArrayList keys = new ArrayList();
#endif
@@ -533,6 +533,7 @@
for (imageX = 0; imageX < width; imageX += imageWidth) {
bitmap = new Bitmap(imageWidth, imageHeight, PixelFormat.Format32bppArgb);
graphics = Graphics.FromImage(bitmap);
+
graphics.DrawImage(image, imageRect, imageX, 0, imageWidth, imageHeight, GraphicsUnit.Pixel, imageAttributes);
graphics.Dispose();
@@ -1118,12 +1119,16 @@
public void Draw(Graphics g, int x, int y, int index)
{
- g.DrawImage(images.GetImage(index), x, y);
+ Bitmap img = (Bitmap)(((ImageCollection.ImageListItem)images.list[0]).Image);
+ g.DrawImage(img, x, y, new Rectangle(img.Height * index, 0, img.Height, img.Height), GraphicsUnit.Pixel);
+// g.DrawImage(images.GetImage(index), x, y);
}
public void Draw(Graphics g, int x, int y, int width, int height, int index)
{
- g.DrawImage(images.GetImage(index), x, y, width, height);
+ Bitmap img = (Bitmap)(((ImageCollection.ImageListItem)images.list[0]).Image);
+ g.DrawImage(img, x, y, new Rectangle(img.Height * index, 0, img.Height, img.Height), GraphicsUnit.Pixel);
+// g.DrawImage(images.GetImage(index), x, y, width, height);
}
public override string ToString()