Exemple #1
0
        public static void DrawString(this GraphicContext gc, string src, Font font, Point loc, Color color)
        {
            Point basePos = loc;

            foreach (var c in src)
            {
                gc.DrawGlyph(font.Glyphs[25], basePos, color);
                basePos += new Point(font.Glyphs[0].XMax, 0);
            }
        }
Exemple #2
0
        public override void Draw(GraphicContext gc)
        {
            ScreenManager.Clear(Colors.CornflowerBlue);

            var raw  = Britanic.GetFont();
            var font = new Graphics.Fonts.Formats.CFLFontFormat();

            gc.DrawGlyph(font.GetFont(raw), new Point(5, 5), Colors.Black);

            gc.DrawLine(new Point(10, 10), new Point(150, 10), Colors.Black);

            /* var w = new Window();
             * w.Size = new Size(250, 250);
             * w.Background = Colors.Blue;
             * w.TitleBarColor = Colors.Yellow;
             * w.StartPosition = WindowStartPosition.CenterScreen;
             *
             * w.SetGraphics(gc);
             *
             * w.Show();*/
        }