public void DrawGaugeArea(SKCanvas canvas, ChartInput input, float radius, int cx, int cy, float strokeWidth) { using (var paint = new SKPaint { Style = SKPaintStyle.Stroke, StrokeWidth = strokeWidth, Color = input.Color.WithAlpha(LineAreaAlpha), IsAntialias = true, }) { canvas.DrawCircle(cx, cy, radius, paint); } }
public void DrawGauge(SKCanvas canvas, ChartInput input, float radius, int cx, int cy, float strokeWidth) { using (var paint = new SKPaint { Style = SKPaintStyle.Stroke, StrokeWidth = strokeWidth, StrokeCap = SKStrokeCap.Round, Color = input.Color, IsAntialias = true, }) { using (SKPath path = new SKPath()) { var sweepAngle = AnimationProgress * 360 * (Math.Abs(input.Value) - AbsoluteMinimum) / ValueRange; path.AddArc(SKRect.Create(cx - radius, cy - radius, 2 * radius, 2 * radius), StartAngle, sweepAngle); canvas.DrawPath(path, paint); } } }