public DummySvgConverterProperties() { rendererFactory = new DummySvgNodeFactory(); mediaDeviceDescription = new MediaDeviceDescription(""); baseUri = ""; resourceResolver = new ResourceResolver(""); }
public virtual void FaultyMapperTest() { NUnit.Framework.Assert.That(() => { fact = new DefaultSvgNodeRendererFactory(new DefaultSvgNodeRendererFactoryTest.FaultyTestMapper()); } , NUnit.Framework.Throws.InstanceOf <Exception>()) ; }
public virtual void CustomMapperTest() { fact = new DefaultSvgNodeRendererFactory(new DefaultSvgNodeRendererFactoryTest.LocalTestMapper()); iText.StyledXmlParser.Jsoup.Nodes.Element element = new iText.StyledXmlParser.Jsoup.Nodes.Element(iText.StyledXmlParser.Jsoup.Parser.Tag .ValueOf("test"), ""); IElementNode tag = new JsoupElementNode(element); ISvgNodeRenderer rend = fact.CreateSvgNodeRendererForTag(tag, null); NUnit.Framework.Assert.IsTrue(rend is DummyProcessableSvgNodeRenderer); }
/// <summary>Load in configuration, set initial processorState and create/fill-in context of the processor</summary> /// <param name="converterProps">that contains configuration properties and operations</param> internal virtual void PerformSetup(INode root, ISvgConverterProperties converterProps) { processorState = new ProcessorState(); if (converterProps.GetRendererFactory() != null) { rendererFactory = converterProps.GetRendererFactory(); } context = new SvgProcessorContext(converterProps); cssResolver = new SvgStyleResolver(root, context); new SvgFontProcessor(context).AddFontFaceFonts(cssResolver); //TODO RND-1042 namedObjects = new Dictionary<String, ISvgNodeRenderer>(); cssContext = new SvgCssContext(); }
public virtual iText.Svg.Processors.Impl.SvgConverterProperties SetRendererFactory(ISvgNodeRendererFactory rendererFactory) { this.rendererFactory = rendererFactory; return(this); }
/// <summary> /// Creates a new /// <see cref="SvgConverterProperties"/> /// instance. /// </summary> /// <remarks> /// Creates a new /// <see cref="SvgConverterProperties"/> /// instance. /// Instantiates its members, IResourceRetriever and ISvgNodeRendererFactory, to its default implementations. /// </remarks> public SvgConverterProperties() { this.resourceRetriever = new DefaultResourceRetriever(); this.rendererFactory = new DefaultSvgNodeRendererFactory(); }
/// <summary>Creates a SvgConverterProperties object.</summary> /// <remarks>Creates a SvgConverterProperties object. Instantiates its members, ICssResolver and ISvgNodeRenderer, to its default implementations. /// </remarks> public SvgConverterProperties() { this.rendererFactory = new DefaultSvgNodeRendererFactory(); }
public virtual void SetUp() { fact = new DefaultSvgNodeRendererFactory(new DummySvgNodeMapper()); }