/** * Construct a new HtmlPipelineContext object */ public HtmlPipelineContext(CssAppliers cssAppliers) { this.queue = new LinkedList <StackKeeper>(); this.memory = new Dictionary <String, Object>(); this.cssAppliers = cssAppliers; if (this.cssAppliers == null) { this.cssAppliers = new CssAppliersImpl(new XMLWorkerFontProvider()); } }
/** * Create a clone of this HtmlPipelineContext, the clone only contains the * initial values, not the internal values. Beware, the state of the current * Context is not copied to the clone. Only the configurational important * stuff like the LinkProvider (same object), ImageProvider (new * {@link AbstractImageProvider} with same ImageRootPath) , * TagProcessorFactory (same object), acceptUnknown (primitive), charset * (Charset.forName to get a new charset), autobookmark (primitive) are * copied. */ virtual public object Clone() { CssAppliers cloneCssApliers = this.cssAppliers.Clone(); HtmlPipelineContext newCtx = new HtmlPipelineContext(cloneCssApliers); if (this.imageProvider != null) { newCtx.SetImageProvider(imageProvider); } if (null != this.charset) { newCtx.CharSet(Encoding.GetEncoding(this.charset.CodePage)); } newCtx.SetPageSize(new Rectangle(this.pageSize)).SetLinkProvider(this.linkprovider) .SetRootTags(new List <String>(this.roottags)).AutoBookmark(this.autoBookmark) .SetTagFactory(this.tagFactory).SetAcceptUnknown(this.acceptUnknown); return(newCtx); }
/** * Construct a ParagraphCssApplier. * */ public ParagraphCssApplier(CssAppliers appliers) { this.appliers = appliers; }
public void SetCssAppliers(CssAppliers cssAppliers) { this.cssAppliers = cssAppliers; }