关于Xamarin Skiasharp笔画的OnClick功能

如何在skiashark笔划上创建一个onclick函数?我创建了一个包含多个路径的圆形图:

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

例如绿线:

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)

我如何做到这一点,当你点击一个笔画,例如绿色笔画时,会发生什么?

回答(0)