Beispiel #1
0
        public wGradient(List <System.Drawing.Color> GradientColors, List <double> GradientParameters, wDomain GradientLocation, wDomain GradientFocus, double GradientRadius)
        {
            ColorSet.Clear();
            ParameterSet = GradientParameters;

            for (int i = 0; i < GradientColors.Count; i++)
            {
                ColorSet.Add(new wColor(GradientColors[i]));
            }

            Radius   = GradientRadius;
            Location = GradientLocation;
            Focus    = GradientFocus;
            Mode     = GradientMode.Radial;
        }
Beispiel #2
0
        public wGradient(List <System.Drawing.Color> GradientColors, wDomain GradientLocation, wDomain GradientFocus, double GradientRadius, GradientSpace Extents)
        {
            ColorSet.Clear();

            ParameterSet.Clear();
            for (int i = 0; i < GradientColors.Count; i++)
            {
                ColorSet.Add(new wColor(GradientColors[i]));
                ParameterSet.Add((1.0 / GradientColors.Count) * (double)i);
            }

            Radius   = GradientRadius;
            Location = GradientLocation;
            Focus    = GradientFocus;
            FillMode = Extents;

            Mode = GradientMode.Radial;
        }