Esempio n. 1
0
            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();
                }
            }
Esempio n. 2
0
 public virtual void Draw(Window window, GlyphContext context)
 {
     // Some implementation
 }
Esempio n. 3
0
 public virtual void Remove(GlyphContext context)
 {
     // Some implementation
 }
Esempio n. 4
0
 public virtual void Insert(Glyph glyph, GlyphContext context)
 {
     // Some implementation
 }
Esempio n. 5
0
 public virtual Glyph Current(GlyphContext context)
 {
     // Some implementation
     return(null);
 }
Esempio n. 6
0
 public virtual bool IsDone(GlyphContext context)
 {
     // Some implementation
     return(true);
 }
Esempio n. 7
0
 public virtual void First(GlyphContext context)
 {
     // Some implementation
 }
Esempio n. 8
0
 public virtual Font GetFont(GlyphContext context)
 {
     // Some implementation
     return(new Font("some-font-name"));
 }
Esempio n. 9
0
 public virtual void SetFont(Font font, GlyphContext context)
 {
     // Some implementation
 }
Esempio n. 10
0
 public virtual void Draw(GlyphContext context)
 {
 }
Esempio n. 11
0
 public override void Draw(Window window, GlyphContext context)
 {
     // Some specific implementation for drawing characters
     base.Draw(window, context);
 }