OnClick function on Xamarin Skiasharp stroke

Viewed 260

How to make an onclick function on a skiashark stroke? I have made a circle graph with multiple paths:

https://i.stack.imgur.com/ngiz6.jpg

For example the green line:

SKPaint paint4 = new SKPaint
{
    Style = SKPaintStyle.Stroke,
    IsAntialias = true,
    Color = Color.FromHex("#5bd363").ToSKColor(),                   // Overlay Colour of Radial Gauge
    StrokeWidth = progressUtils.getFactoredWidth(radialGaugeWidth + 15), // Overlay Width of Radial Gauge
    StrokeCap = SKStrokeCap.Butt                                  // Round Corners for Radial Gauge
};

SKPath path4 = new SKPath();
path4.AddArc(rect, (360 / 24) * 9.25f + 90, (float)sweepAngleSlider3.Value);
canvas.DrawPath(path4, paint4)

How do I make it so that when you click on a stroke, for example the green one, something happens?

0 Answers
Related