From 2db332c8ad3dff265ab209a1ff727f30be4dbd20 Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 1 Aug 2005 23:46:42 +0000 Subject: Initial working version --- Sprite.cs | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'Sprite.cs') diff --git a/Sprite.cs b/Sprite.cs index 47678e9..290f582 100644 --- a/Sprite.cs +++ b/Sprite.cs @@ -19,6 +19,7 @@ // using System; using System.Drawing; +using System.Drawing.Imaging; using System.IO; using System.Collections; @@ -44,6 +45,11 @@ namespace BitmapSpriteEd } public Frame(Frame old) + { + CopyFrom(old); + } + + public void CopyFrom(Frame old) { m_width=old.m_width; m_height=old.m_height; @@ -59,7 +65,7 @@ namespace BitmapSpriteEd m_changed=old.m_changed; } - + public int Width { get {return m_width;} @@ -256,6 +262,24 @@ namespace BitmapSpriteEd return s; } + public Bitmap Bitmap + { + get + { + Bitmap bmp=new Bitmap(m_width,m_height,PixelFormat.Format32bppArgb); + + for(int x=0;x