public void PresAttSettingNew() { SvgStyleableElement elm = Util.GetXmlElement("<title />", "", "title") as SvgStyleableElement; Assert.IsNull(elm.GetPresentationAttribute("stroke")); elm.SetAttribute("stroke", "red"); Assert.AreEqual(CssValue.GetCssValue("red", false).CssText, elm.GetPresentationAttribute("stroke").CssText); }
public void PresAttUpdating() { SvgStyleableElement elm = Util.GetXmlElement("<title fill='black' />", "", "title") as SvgStyleableElement; Assert.AreEqual(CssValue.GetCssValue("black", false).CssText, elm.GetPresentationAttribute("fill").CssText); elm.SetAttribute("fill", "red"); Assert.AreEqual(CssValue.GetCssValue("red", false).CssText, elm.GetPresentationAttribute("fill").CssText); }
public void TestColorFill() { elm.SetAttribute("fill", "red"); GdiSvgPaint paint = new GdiSvgPaint(elm, "fill"); Brush brush = paint.GetBrush(getGp()); Assert.AreEqual(typeof(SolidBrush), brush.GetType()); Assert.IsTrue(isSameColor(Color.Red, ((SolidBrush)brush).Color)); }