/// <summary>Creates/replaces the override entry for the given color layer property with the given evaluatable numbers.</summary> /// <param name="layerPropertyName">The name of an color layer property (e.g. "_PrimaryColor").</param> /// <param name="a">The evaluatable number that will be used as the alpha property for this color.</param> /// <param name="r">The evaluatable number that will be used as the red property for this color.</param> /// <param name="g">The evaluatable number that will be used as the green property for this color.</param> /// <param name="b">The evaluatable number that will be used as the blue property for this color.</param> public OverrideLogicBuilder SetDynamicColor(string layerPropertyName, Evaluatable <double> a, Evaluatable <double> r, Evaluatable <double> g, Evaluatable <double> b) { overrideProperties[layerPropertyName] = new OverrideDynamicValue(typeof(System.Drawing.Color), new Dictionary <string, IEvaluatable> { { "Alpha", a }, { "Red", r }, { "Green", g }, { "Blue", b } }); return(this); }
/// <summary> /// Interal helper function to simplify/shorten the public API methods. /// </summary> private OverrideLogicBuilder SetDynamic(Type type, string layerPropertyName, IEvaluatable evaluatable) { overrideProperties[layerPropertyName] = new OverrideDynamicValue(type, new Dictionary <string, IEvaluatable> { { "Value", evaluatable } }); return(this); }