public override void UpdateVariables(Dictionary <string, OverlayVariableBaseModel> variableDictionary) { LinearGradientBrush lgb = new LinearGradientBrush(); foreach (GradientColor gsPair in originalGradientStops) { GradientStop gs = new GradientStop(); Color gradColor = (Color)ColorConverter.ConvertFromString(VariableEvaluator.ReplaceVariables(gsPair.color, variableDictionary)); if (gsPair.transparent.HasValue && gsPair.transparent.Value) { gradColor.A = 0; } gs.Color = gradColor; if (gsPair.offset.HasValue) { gs.Offset = gsPair.offset.Value; } lgb.GradientStops.Add(gs); } lgb.StartPoint = GradientStart; lgb.EndPoint = GradientEnd; GradientBrush = lgb; }
public override void UpdateVariables(Dictionary <string, OverlayVariableBaseModel> variableDictionary) { ImageLocation = Path.Combine(OverlaySettings.Instance.Location.Directory.FullName, VariableEvaluator.ReplaceVariables(originalImageLocation, variableDictionary)); }
public override void UpdateVariables(Dictionary <string, OverlayVariableBaseModel> variableDictionary) { Text = VariableEvaluator.ReplaceVariables(originalText, variableDictionary); TextColor = GetColorBrush(VariableEvaluator.ReplaceVariables(originalColor, variableDictionary)); }