Beispiel #1
0
        public override IHairType CreateNew(string str)
        {
            GradientHair returnV = new GradientHair();

            string[] tokenList = str.Split(',');
            if (tokenList.Length < 2)
            {
                return(returnV);
            }
            returnV.color1 = new HSVColor(tokenList[0]);
            returnV.color2 = new HSVColor(tokenList[1]);
            if (tokenList.Length >= 3)
            {
                returnV.doRgbGradient = bool.Parse(tokenList[2]);
            }
            return(returnV);
        }
Beispiel #2
0
 public GradientHair(GradientHair rvalue)
 {
     color1        = rvalue.color1.Clone();
     color2        = rvalue.color2.Clone();
     doRgbGradient = rvalue.doRgbGradient;
 }