private async void InitAll()
 {
     this.plotter = new Plotter(this);
     await plotter.Init();
     await plotter.PenUp();
     this.painter = new Painter(plotter, this);
     this.textPainter = new TextPainter(plotter, new FontEnRu(), 35, 70, 15);
     this.textPainterSmall = new TextPainter(plotter, new FontEnRu(), 22, 45, 5);
 }
Beispiel #2
0
        private async void InitAll()
        {
            this.plotter = new Plotter(this);
            await plotter.Init();

            await plotter.PenUp();

            this.painter          = new Painter(plotter, this);
            this.textPainter      = new TextPainter(plotter, new FontEnRu(), 35, 70, 15);
            this.textPainterSmall = new TextPainter(plotter, new FontEnRu(), 22, 45, 5);
        }
Beispiel #3
0
        public async Task Star()
        {
            const int corners = 9;
            const int step    = 4;
            const int r       = 145;

            logger.WriteLn("Drawing a star with {0} corners.".Fmt(corners), LogType.Info);

            var angle = 0.0;
            await plotter.PenUp();

            plotter.GoToXY(150 + r, 150);
            await plotter.PenDown();

            for (var i = 0; i < corners; i++)
            {
                angle += step * 2 * Math.PI / corners;
                plotter.GoToDiagonal(150 + (int)(r * Math.Cos(angle)), 150 + (int)(r * Math.Sin(angle)));
            }
            await plotter.PenUp();
        }