/// <summary> /// Dispose the object /// </summary> public void Dispose() { if (_chart != null) { _chart.Dispose(); } _chart = null; _line = null; if (_fill != null) { _fill.Dispose(); } _fill = null; }
/// <summary> /// Creates a fill overlay with BlendMode = Over /// </summary> public void Create() { if (Fill == null) { Fill = new ExcelDrawingFill(_pictureRelationDocument, NameSpaceManager, TopNode, _path, SchemaNodeOrder); if (Fill._fillTypeNode == null) { Fill.Style = eFillStyle.NoFill; } } if (!ExistNode($"{_path}/@blend")) { Blend = eBlendMode.Over; } }
private void TransformColorFill(ExcelDrawingFill fill, ExcelChartStyleColorManager color, int colorIndex, int numberOfItems) { switch (fill.Style) { case eFillStyle.PatternFill: TransformColor(fill.PatternFill.BackgroundColor, color, colorIndex, numberOfItems); TransformColor(fill.PatternFill.ForegroundColor, color, colorIndex, numberOfItems); break; case eFillStyle.BlipFill: if (fill.BlipFill.Effects.Duotone != null) { TransformColor(fill.BlipFill.Effects.Duotone.Color1, color, colorIndex, numberOfItems); TransformColor(fill.BlipFill.Effects.Duotone.Color2, color, colorIndex, numberOfItems); } break; default: TransformColorFillBasic(fill, color, colorIndex, numberOfItems); break; } }
internal virtual void UpdateXml() { SetPositionAndSizeForControl(); if (ControlType == eControlType.CheckBox || ControlType == eControlType.RadioButton) { var c = (ExcelControlWithColorsAndLines)this; if (c.Fill.Style != eVmlFillType.NoFill) { var fill = new ExcelDrawingFill(_drawings, NameSpaceManager, TopNode, _topPath + "/xdr:spPr", SchemaNodeOrder); if (c.Fill.Style == eVmlFillType.Solid) //Set solid fill for drawing. { var color = c.Fill.Color.GetColor(); if (!color.IsEmpty) { fill.Color = color; } fill.Transparancy = (int)c.Fill.Opacity - 100; } } } }