Пример #1
0
        public void SetGradient(GradientBrush gradientBrush)
        {
            _dirty = true;

            _gradientProvider?.Dispose();
            _gradientProvider = GradientProvidersContainer.Resolve(
                gradientBrush.GetType());
            _gradientProvider?.SetGradient(gradientBrush);

            InvalidateSelf();
        }
Пример #2
0
        public void SetGradient(GradientBrush gradientBrush)
        {
            _dirty = true;

            _gradientProvider?.Dispose();
            _gradientProvider = GradientProvidersContainer.Resolve(
                gradientBrush.GetType());
            _gradientProvider?.SetGradient(gradientBrush);

            SetNeedsDisplay();
        }
Пример #3
0
        public void SetBorder(double strokeWidth, Color strokeColor, GradientBrush gradientBrush)
        {
            _dirty       = true;
            _strokeWidth = (float)strokeWidth;
            _strokeColor = strokeColor.ToUIColor();

            _strokeGradientProvider?.Dispose();
            _strokeGradientProvider = GradientProvidersContainer.Resolve(
                gradientBrush.GetType());
            _strokeGradientProvider?.SetGradient(gradientBrush);

            SetNeedsDisplay();
        }
Пример #4
0
        public void SetBorderGradient(GradientBrush gradientBrush)
        {
            _dirty = true;

            _strokeGradientProvider?.Dispose();
            _strokeGradientProvider = GradientProvidersContainer.Resolve(
                gradientBrush.GetType());
            _strokeGradientProvider?.SetGradient(gradientBrush);

            InvalidateSelf();

            if (_strokeGradientProvider == null || !_strokeGradientProvider.HasGradient)
            {
                return;
            }

            _strokePaint.Color = Color.White.ToAndroid();
        }
 public static void Init()
 {
     PathProvidersContainer.Init();
     GradientProvidersContainer.Init();
 }