Ejemplo n.º 1
0
        public void TestSetColor()
        {
            SvgColor color = _createColor("rgb(12,234 , 121)");

            color.SetColor(SvgColorType.RgbColor, "#ff00ff", "");
            Assert.AreEqual("rgb(255,0,255)", color.CssText);

            color.SetColor(SvgColorType.CurrentColor, null, null);
            Assert.AreEqual("currentColor", color.CssText);
        }
Ejemplo n.º 2
0
        public void TestColorType()
        {
            SvgColor color = _createColor("rgb(12,234 , 121)");

            Assert.AreEqual(SvgColorType.RgbColor, color.ColorType);

            color = _createColor("currentColor");
            Assert.AreEqual(SvgColorType.CurrentColor, color.ColorType);

            color.SetColor(SvgColorType.RgbColor, "rgb(80%, 50%, 12)", null);
            Assert.AreEqual(SvgColorType.RgbColor, color.ColorType);

            color.SetColor(SvgColorType.RgbColorIccColor, "rgb(80%, 50%, 12)", "icc-color(somename)");
            Assert.AreEqual(SvgColorType.RgbColorIccColor, color.ColorType);
        }