Xamarin Skiasharp笔触的OnClick功能

时间:2018-09-19 14:49:18

标签: c# xamarin skiasharp

如何在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 个答案:

没有答案