public FontCharacter(Image character, FontFlag flags) { Int32 i = (Int32)flags; forms = new Image[i + 1]; forms[i] = character; }
public Image GetForm(FontFlag flags) { if ((Int32)flags < forms.Length) { return(forms[((Int32)flags)]); } else { return(null); } }
public void AddForm(Image character, FontFlag flags) { Int32 i = (Int32)flags; if (i > forms.Length - 1) { Image[] forms2 = new Image[i + 1]; Array.Copy(forms, forms2, forms.Length); forms = forms2; } forms[i] = character; }
public void AddCharacter(int charNumber, Image ch, FontFlag flags) { if (foundChars[charNumber] == null) { foundChars[charNumber] = new FontCharacter(ch, flags); } else { foundChars[charNumber].AddForm(ch, flags); } chars++; }
public Image GetCharacter(int charNumber, FontFlag flags) { if (foundChars[charNumber] != null) { if (foundChars[charNumber].GetForm(flags) != null) { return(foundChars[charNumber].GetForm(flags)); } else { throw new Exception("Form Not Found!"); } } else { throw new Exception("Character non-existant!"); } }
public Image GetCharacter(int charNumber, FontFlag flags) { if (foundChars[charNumber] != null) { if (foundChars[charNumber].GetForm(flags) != null) { return foundChars[charNumber].GetForm(flags); } else { throw new Exception("Form Not Found!"); } } else { throw new Exception("Character non-existant!"); } }
public abstract Image GetCharacter(Int32 charNumber, FontFlag flags);
public override Image GetCharacter(Int32 charNumber, FontFlag flags) { return(foundChars.GetCharacter(charNumber, flags)); }
public override Image GetCharacter(Int32 charNumber, FontFlag flags) { return foundChars.GetCharacter(charNumber, flags); }
public Image GetForm(FontFlag flags) { if ((Int32)flags < forms.Length) { return (forms[((Int32)flags)]); } else { return null; } }