예제 #1
0
        public HtmlBrushRenderResource(string tagName, SvgDefinitionContainer svgDefinitionContainer) :
            base(SvgDocument.CreateElement(tagName))
        {
            this.svgDefinitionContainer = svgDefinitionContainer;

            string elementName = $"{tagName}{svgDefinitionContainer.GetNextId()}";

            this.Uri = $"url(#{elementName})";
            this.HtmlElement.SetAttribute("id", elementName);
        }
        public HtmlGeometryRenderResource(IRenderElementFactory factory, RenderQueue renderQueue, SvgDefinitionContainer svgDefinitionContainer, SvgValueConverter converter) :
            base(SvgDocument.CreateElement("clipPath"))
        {
            this.factory                = factory;
            this.renderQueue            = renderQueue;
            this.svgDefinitionContainer = svgDefinitionContainer;
            this.converter              = converter;

            this.pathHtmlElement = SvgDocument.CreateElement("path");

            string elementName = $"clipPath{svgDefinitionContainer.GetNextId()}";

            this.Uri = $"url(#{elementName})";
            HtmlElement.SetAttribute("id", elementName);
            HtmlElement.AppendChild(pathHtmlElement);
        }