Ejemplo n.º 1
0
        public GradientBrushDescription(
            ColorBlendDescription colorBlend, float angle, float opacity
            )
        {
            _blend      = null;
            _colorBlend = colorBlend;

            _angle = angle;

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