public GradientBrushDescription( ColorBlendDescription colorBlend, float angle, float opacity ) { _blend = null; _colorBlend = colorBlend; _angle = angle; _opacity = opacity > 1? 1: opacity; _colorBlend.Opacity = _opacity; }
// ======================================== // constructor // ======================================== public GradientBrushDescription( Color color1, Color color2, BlendDescription blend, float angle, float opacity ) { _color1 = color1; _color2 = color2; _blend = blend; _colorBlend = null; _angle = angle; _opacity = opacity > 1? 1: opacity; }
public object Clone() { var ret = new ColorBlendDescription(); ret.Colors = new Color[Colors.Length]; Array.Copy(Colors, ret.Colors, Colors.Length); ret.Positions = new float[Positions.Length]; Array.Copy(Positions, ret.Positions, Positions.Length); ret.Opacity = Opacity; return(ret); }
public GradientBrushDescription(ColorBlendDescription colorBlend) : this(colorBlend, 90, 1) { }
public GradientBrushDescription(ColorBlendDescription colorBlend, float angle) : this(colorBlend, angle, 1) { }