ColorBlend.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CommonUI / System / Drawing / Advanced / ColorBlend.cs / 1305376 / ColorBlend.cs

                            //------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

namespace System.Drawing.Drawing2D { 
 
    using System.Diagnostics;
 
    using System;
    using System.Drawing;

    ///  
    /// 
    ///    Defines arrays of colors and positions used 
    ///    for interpolating color blending in a gradient. 
    /// 
    public sealed class ColorBlend { 
        Color[] colors;
        float[] positions;

        ///  
        /// 
        ///    Initializes a new instance of the  class. 
        ///  
        public ColorBlend() {
            colors = new Color[1]; 
            positions = new float[1];
        }

        ///  
        /// 
        ///     
        ///       Initializes a new instance of the  class with the specified number of 
        ///       colors and positions.
        ///     
        /// 
        public ColorBlend(int count) {
            colors = new Color[count];
            positions = new float[count]; 
        }
 
        ///  
        /// 
        ///    Represents an array of colors. 
        /// 
        public Color[] Colors {
            get {
                return colors; 
            }
            set { 
                colors = value; 
            }
        } 

        /// 
        /// 
        ///    Represents the positions along a gradient 
        ///    line.
        ///  
        public float[] Positions { 
            get {
                return positions; 
            }
            set {
                positions = value;
            } 
        }
 
    } 

} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

namespace System.Drawing.Drawing2D { 
 
    using System.Diagnostics;
 
    using System;
    using System.Drawing;

    ///  
    /// 
    ///    Defines arrays of colors and positions used 
    ///    for interpolating color blending in a gradient. 
    /// 
    public sealed class ColorBlend { 
        Color[] colors;
        float[] positions;

        ///  
        /// 
        ///    Initializes a new instance of the  class. 
        ///  
        public ColorBlend() {
            colors = new Color[1]; 
            positions = new float[1];
        }

        ///  
        /// 
        ///     
        ///       Initializes a new instance of the  class with the specified number of 
        ///       colors and positions.
        ///     
        /// 
        public ColorBlend(int count) {
            colors = new Color[count];
            positions = new float[count]; 
        }
 
        ///  
        /// 
        ///    Represents an array of colors. 
        /// 
        public Color[] Colors {
            get {
                return colors; 
            }
            set { 
                colors = value; 
            }
        } 

        /// 
        /// 
        ///    Represents the positions along a gradient 
        ///    line.
        ///  
        public float[] Positions { 
            get {
                return positions; 
            }
            set {
                positions = value;
            } 
        }
 
    } 

} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK