public SvgDefinitionContainer(RenderQueue renderQueue)
        {
            this.renderQueue = renderQueue;

            HtmlElement = SvgDocument.CreateElement("svg");
            HtmlElement.Style.SetProperty("overflow", "hidden");
            HtmlElement.Style.Width  = "0px";
            HtmlElement.Style.Height = "0px";

            definitionsElement = SvgDocument.CreateElement("defs");
            HtmlElement.AppendChild(definitionsElement);
        }
Esempio n. 2
0
        public WebApplicationHost()
        {
            RenderQueue                   renderQueue                   = new RenderQueue();
            HtmlValueConverter            htmlValueConverter            = new HtmlValueConverter();
            SvgValueConverter             svgValueConverter             = new SvgValueConverter();
            SvgDefinitionContainer        svgDefinitionContainer        = new SvgDefinitionContainer(renderQueue);
            ImageElementContainer         imageElementContainer         = new ImageElementContainer();
            EmbeddedResourceObjectFactory embeddedResourceObjectFactory = new EmbeddedResourceObjectFactory(htmlValueConverter);

            HtmlRenderElementFactory htmlRenderElementFactory = new HtmlRenderElementFactory(renderQueue, htmlValueConverter, imageElementContainer, embeddedResourceObjectFactory, svgValueConverter, svgDefinitionContainer);

            PresentationSourceFactory = new PresentationSourceFactory(htmlRenderElementFactory, htmlValueConverter, imageElementContainer, svgDefinitionContainer);
            TaskScheduler             = new TaskScheduler();
            TextMeasurementService    = new TextMeasurementService(htmlValueConverter);
        }