Esempio n. 1
0
 public void Draw()
 {
     ctx.BeginPathAsync();
     ctx.ArcAsync(x, y, radius, 0, Math.PI * 2, false);
     ctx.FillStyleAsync(color);
     ctx.FillAsync(FillRule.NonZero);
 }
Esempio n. 2
0
 public void Draw()
 {
     ctx.SaveAsync();
     ctx.GlobalAlphaAsync(alpha);
     ctx.BeginPathAsync();
     ctx.ArcAsync(x, y, radius, 0, Math.PI * 2, false);
     ctx.FillStyleAsync(color);
     ctx.FillAsync(FillRule.NonZero);
     ctx.RestoreAsync();
 }
Esempio n. 3
0
        protected async Task LineAsync(IEnumerable <StylusPoint> points)
        {
            var enumerator = points.GetEnumerator();

            if (enumerator.MoveNext())
            {
                var point = enumerator.Current;
                await _batch.BeginPathAsync();

                await _batch.MoveToAsync(point.X, point.Y);

                while (enumerator.MoveNext())
                {
                    point = enumerator.Current;
                    await _batch.LineToAsync(point.X, point.Y);
                }

                await _batch.StrokeAsync();
            }
        }