private void SetBrush()
 {
     if (brush is SolidBrush)
     {
         mapBrushColor = ((SolidBrush)brush).Color;
         svgFillType   = SvgFillType.Solid;
     }
     else if (brush is LinearGradientBrush)
     {
         mapBrushColor       = ((LinearGradientBrush)brush).LinearColors[0];
         mapBrushSecondColor = ((LinearGradientBrush)brush).LinearColors[1];
         svgFillType         = SvgFillType.Gradient;
     }
     else if (brush is HatchBrush)
     {
         mapBrushColor = ((HatchBrush)brush).BackgroundColor;
         svgFillType   = SvgFillType.Solid;
     }
 }
Example #2
0
 private void SetBrush()
 {
     if (this.brush is SolidBrush)
     {
         this.chartBrushColor = ((SolidBrush)this.brush).Color;
         this.svgFillType     = SvgFillType.Solid;
     }
     else if (this.brush is LinearGradientBrush)
     {
         this.chartBrushColor       = ((LinearGradientBrush)this.brush).LinearColors[0];
         this.chartBrushSecondColor = ((LinearGradientBrush)this.brush).LinearColors[1];
         this.svgFillType           = SvgFillType.Gradient;
     }
     else if (this.brush is HatchBrush)
     {
         this.chartBrushColor = ((HatchBrush)this.brush).BackgroundColor;
         this.svgFillType     = SvgFillType.Solid;
     }
 }