public void Draw() { ctx.BeginPathAsync(); ctx.ArcAsync(x, y, radius, 0, Math.PI * 2, false); ctx.FillStyleAsync(color); ctx.FillAsync(FillRule.NonZero); }
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(); }
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(); } }