Пример #1
0
    private void DrawThumpUpper(SKCanvas canvas, float radius)
    {
        canvas.Save();

        _paint.Style = SKPaintStyle.Fill;

        _paint.Shader = SKShader.CreateLinearGradient(new SKPoint(radius.Scale(0.37f), 0),
                                                      new SKPoint(-radius.Scale(0.37f), radius.Scale(0.37f)),
                                                      BackgroundColor.ThumbGradientColor(IsEnabled).Reverse().ToArray(),
                                                      new float[] { 0f, 1f },
                                                      SKShaderTileMode.Clamp);


        canvas.DrawCircle(0, 0, radius.Scale(0.37f), _paint);

        DrawStroke(radius);

        canvas.Restore();
    }