internal void RemoveGradientFill() { this.gfReal = new SLGradientFill(this.listThemeColors, this.listIndexedColors); }
internal void FromFill(Fill f) { this.SetAllNull(); bool bFound = false; if (f.PatternFill != null) { this.pfReal = new SLPatternFill(this.listThemeColors, this.listIndexedColors); this.pfReal.FromPatternFill(f.PatternFill); this.UsePatternFill = true; bFound = pfReal.HasForegroundColor || pfReal.HasBackgroundColor || pfReal.HasPatternType; } else if (f.GradientFill != null) { this.gfReal = new SLGradientFill(this.listThemeColors, this.listIndexedColors); this.gfReal.FromGradientFill(f.GradientFill); this.UsePatternFill = false; bFound = (gfReal.listGradientStops.Count > 0) || gfReal.HasType || gfReal.Degree != null || gfReal.Left != null || gfReal.Right != null || gfReal.Top != null || gfReal.Bottom != null; } if (bFound) { HasBeenAssignedValues = true; } else { HasBeenAssignedValues = false; // must have either PatternFill or GradientFill // Default will be an empty PatternFill this.pfReal = new SLPatternFill(this.listThemeColors, this.listIndexedColors); this.pfReal.PatternType = PatternValues.None; this.UsePatternFill = true; RemoveGradientFill(); } }
internal SLGradientFill Clone() { SLGradientFill gf = new SLGradientFill(this.listThemeColors, this.listIndexedColors); gf.listGradientStops = new List<GradientStop>(); for (int i = 0; i < this.listGradientStops.Count; ++i) { gf.listGradientStops.Add((GradientStop)this.listGradientStops[i].CloneNode(true)); } gf.HasType = this.HasType; gf.vType = this.vType; gf.Degree = this.Degree; gf.Left = this.Left; gf.Right = this.Right; gf.Top = this.Top; gf.Bottom = this.Bottom; return gf; }