public static void Run() { GlyphFactory fac = new GlyphFactory(); //Position & character Dictionary <int, Character> document = new Dictionary <int, Character>(); document.Add(1, fac.GetGlyph('A')); document.Add(2, fac.GetGlyph('B')); document.Add(3, fac.GetGlyph('A')); GlyphContext context = new GlyphContext(); context.SetFont(1, "Calibri"); context.SetFont(2, "Times New Roman"); context.SetFont(3, "Comic Sans"); context.SetIndex(1); foreach (var item in document) { item.Value.Draw(context); context.Next(); } }
public virtual void Draw(Window window, GlyphContext context) { // Some implementation }
public virtual void Remove(GlyphContext context) { // Some implementation }
public virtual void Insert(Glyph glyph, GlyphContext context) { // Some implementation }
public virtual Glyph Current(GlyphContext context) { // Some implementation return(null); }
public virtual bool IsDone(GlyphContext context) { // Some implementation return(true); }
public virtual void First(GlyphContext context) { // Some implementation }
public virtual Font GetFont(GlyphContext context) { // Some implementation return(new Font("some-font-name")); }
public virtual void SetFont(Font font, GlyphContext context) { // Some implementation }
public virtual void Draw(GlyphContext context) { }
public override void Draw(Window window, GlyphContext context) { // Some specific implementation for drawing characters base.Draw(window, context); }