Beispiel #1
0
        public void TestApplyStyle()
        {
            var document  = new SvgDocument();
            var rectangle = new SvgRectangle()
            {
                X      = 0f,
                Y      = 0f,
                Width  = 10f,
                Height = 10f,
            };

            rectangle.AddStyle("fill", "blue", 0);
            document.Children.Add(rectangle);
            document.FlushStyles(true);

            Assert.IsInstanceOf(typeof(SvgColourServer), rectangle.Fill);
            Assert.AreEqual(((SvgColourServer)rectangle.Fill).Colour, Color.Blue);
        }