// BitmapFontEd // Copyright (C) 2005 Ian Cowburn // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // // $Id$ // using System; using System.Drawing; using System.IO; using System.Collections; namespace BitmapFontEd { /// /// Description of BitmapChar. /// public class BitmapChar { public BitmapChar(uint width, uint height) { m_width=width; m_height=height; m_data=new Color[m_width,m_height]; Clear(Color.Black); m_changed=false; } public BitmapChar() : this(16,16) { } public BitmapChar(BitmapChar old) { m_width=old.m_width; m_height=old.m_height; m_data=new Color[m_width,m_height]; for(int x=0;x=0 && nx=0 && ny=0 && nx=0 && ny>16,(col&0xff00)>>8,col&0xff); } } } s.m_changed=false; return s; } // ------------------------------------------------ // PRIVATE // private uint m_width; private uint m_height; private Color[,] m_data; private bool m_changed; private int Mod(int v, uint max) { while(v<0) v+=(int)max; v=v%(int)max; return v; } } /// /// Describes a list of bitmap characters /// public class BitmapCharList : IEnumerable { private const int CHARS=95; public BitmapCharList() { m_list=new BitmapChar[CHARS]; for(int f=0;f