public ILinearGradient Construct(LinearGradientBuilder builder)
 {
     return(new LinearGradient
     {
         Angle = builder.Angle,
         IsRepeating = builder.IsRepeating,
         Stops = new List <IGradientStop>(builder.Stops)
     });
 }
Ejemplo n.º 2
0
        public GradientBuilder AddLinearGradient(Action <LinearGradientBuilder> setup = null)
        {
            var builder = new LinearGradientBuilder();

            setup?.Invoke(builder);

            UseBuilder(builder);
            return(this);
        }
Ejemplo n.º 3
0
        public LinearGradientBuilder AddLinearGradient(double angle, bool isRepeating = false)
        {
            var builder = new LinearGradientBuilder
            {
                Angle       = angle,
                IsRepeating = isRepeating
            };

            UseBuilder(builder);
            return(builder);
        }