public GradientBrushDescription( ColorBlendDescription colorBlend, float angle, float opacity ) { _blend = null; _colorBlend = colorBlend; _angle = angle; _opacity = opacity > 1? 1: opacity; _colorBlend.Opacity = _opacity; }
public object Clone() { var ret = new BlendDescription(); ret.Factors = new float[Factors.Length]; Array.Copy(Factors, ret.Factors, Factors.Length); ret.Positions = new float[Positions.Length]; Array.Copy(Positions, ret.Positions, Positions.Length); return(ret); }
// ======================================== // 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 GradientBrushDescription( Color color1, Color color2, BlendDescription blend ) : this(color1, color2, blend, 90, 1) { }
public GradientBrushDescription( Color color1, Color color2, BlendDescription blend, float angle ) : this(color1, color2, blend, angle, 1) { }