From 600287f275063dde1ea6f55fd9aa5247d27256cf Mon Sep 17 00:00:00 2001 From: Ian C Date: Sat, 21 May 2005 02:38:48 +0000 Subject: Changed use of uints to ints (casting was getting silly). Fixed some funnies with edits -- font import now seem to work, somehow. --- BitmapChar.cs | 77 +++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 31 deletions(-) (limited to 'BitmapChar.cs') diff --git a/BitmapChar.cs b/BitmapChar.cs index 4719b33..3033fee 100644 --- a/BitmapChar.cs +++ b/BitmapChar.cs @@ -29,12 +29,13 @@ namespace BitmapFontEd /// public class BitmapChar { - public BitmapChar(uint width, uint height) + public BitmapChar(int width, int height) { + CheckSize(width,height); m_width=width; m_height=height; m_data=new Color[m_width,m_height]; - Clear(Color.Empty); + Clear(Color.Transparent); m_changed=false; } @@ -55,12 +56,12 @@ namespace BitmapFontEd m_changed=old.m_changed; } - public uint Width + public int Width { get {return m_width;} } - public uint Height + public int Height { get {return m_height;} } @@ -70,8 +71,10 @@ namespace BitmapFontEd get {return m_changed;} } - public void Resize(uint width, uint height) + public void Resize(int width, int height) { + CheckSize(width,height); + if (width==m_width && height==m_height) { return; @@ -81,10 +84,10 @@ namespace BitmapFontEd for(int y=0;y