public Brush ScaleValue(Brush value, double factor) { value = BrushAnimationInputTransformer.Transform(value); return(GetAnimationHelperForBrush(value) .ScaleValue(value, factor)); }
public Brush InterpolateValue(Brush from, Brush to, double progress) { BrushAnimationInput transformedInput = BrushAnimationInputTransformer.Transform(from, to); from = transformedInput.From; to = transformedInput.To; return(GetAnimationHelperForBrush(from) .InterpolateValue(from, to, progress)); }
public Brush SubtractValues(Brush a, Brush b) { BrushAnimationInput transformedInput = BrushAnimationInputTransformer.Transform(a, b); a = transformedInput.From; b = transformedInput.To; return(GetAnimationHelperForBrush(a) .SubtractValues(a, b)); }
/// <summary> /// Adds the values of the two specified brushes /// and returns a new brush, which represents the addition's /// result. /// </summary> /// <param name="a">the first brush.</param> /// <param name="b">The second brush.</param> /// <returns> /// The result of the addition. /// </returns> protected override sealed Brush AddValues(Brush a, Brush b) { BrushAnimationInput transformedInput = BrushAnimationInputTransformer.Transform(a, b); a = transformedInput.From; b = transformedInput.To; BrushAnimationValidator.ValidateBrushes(a, b); return(BrushAnimationHelper.Instance.AddValues(a, b)); }
/// <summary> /// Scales the specified <see cref="Brush"/> by the specified <paramref name="factor"/>. /// </summary> /// <param name="value">The <see cref="Brush"/> to be scaled.</param> /// <param name="factor">The factor by which the brush should be scaled.</param> /// <returns>A new <see cref="Brush"/>, which represents the scaling's result.</returns> protected override sealed Brush ScaleValue(Brush value, double factor) { value = BrushAnimationInputTransformer.Transform(value); return(BrushAnimationHelper.Instance.ScaleValue(value, factor)); }