public SvgFilterGroup()
        {
            _filterId = SvgGuid.NewGuid();

            _filterContainer = new XElement("filter");
            _filterContainer.SetAttributeValue("id", _filterId);
        }
Beispiel #2
0
        public void Apply(Svg svg)
        {
            var filterId = SvgGuid.NewGuid();

            var blur = new XElement("feGaussianBlur");

            blur.SetAttributeValue("in", "SourceGraphic");
            blur.SetAttributeValue("stdDeviation", percentage * 100);

            var filterGroup = new SvgFilterGroup();

            filterGroup.SetFilter(blur);
            filterGroup.AddToSvg(svg);
        }