Exemple #1
0
        public GradientBrushDescription(
            ColorBlendDescription colorBlend, float angle, float opacity
            )
        {
            _blend      = null;
            _colorBlend = colorBlend;

            _angle = angle;

            _opacity            = opacity > 1? 1: opacity;
            _colorBlend.Opacity = _opacity;
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        // ========================================
        // 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;
        }
Exemple #4
0
 public GradientBrushDescription(
     Color color1, Color color2, BlendDescription blend
     )
     : this(color1, color2, blend, 90, 1)
 {
 }
Exemple #5
0
 public GradientBrushDescription(
     Color color1, Color color2, BlendDescription blend, float angle
     )
     : this(color1, color2, blend, angle, 1)
 {
 }