protected PDFGraphics(PDFWriter writer, PDFSize size, IPDFResourceContainer container) { this._writer = writer; this._pageSize = size; this._rsrc = container; this._extState = new PDFExternalGraphicsState(container, writer); }
public PDFExternalGraphicsState(IPDFResourceContainer container, PDFWriter writer) { _states = new Stack <StateInfo>(); _identity = new StateInfo(1.0, 1.0); _container = container; _writer = writer; }
public static PDFGraphics Create(PDFWriter writer, bool ownswriter, IPDFResourceContainer rsrc, DrawingOrigin origin, PDFSize size, PDFContextBase context) { if (origin == DrawingOrigin.BottomLeft) { throw new ArgumentException(Errors.GraphicsOnlySupportsTopDownDrawing, "origin"); } PDFGraphics g = new PDFGraphics(writer, size, rsrc); g.OwnsWriter = ownswriter; g.Context = context; return(g); }
public string MapPath(string source) { IPDFResourceContainer parentRegister = this.GetParentResourceRegister(); if (null == parentRegister) { return(source); } else { return(parentRegister.MapPath(source)); } }
/// <summary> /// Overrides the base implementation to registed the image data as a resource on the current container /// </summary> /// <param name="context"></param> /// <param name="set"></param> /// <param name="fullstyle"></param> protected override void DoRegisterArtefacts(PDFLayoutContext context, PDFArtefactRegistrationSet set, Style fullstyle) { IPDFResourceContainer resources = this.GetResourceContainer(); if (null == resources) { throw RecordAndRaise.NullReference(Errors.ResourceContainerOfComponnetNotFound, "Image", this.ID); } PDFImageXObject xobj = this.GetImageObject(context, fullstyle); if (null != xobj) { resources.Register(xobj); } base.DoRegisterArtefacts(context, set, fullstyle); }
public PDFResourceList(IPDFResourceContainer container, bool includeProcSet = true) { this._container = container; this._includeProcSet = includeProcSet; }