Пример #1
0
 protected PDFGraphics(PDFWriter writer, PDFSize size, IPDFResourceContainer container)
 {
     this._writer   = writer;
     this._pageSize = size;
     this._rsrc     = container;
     this._extState = new PDFExternalGraphicsState(container, writer);
 }
Пример #2
0
 public PDFExternalGraphicsState(IPDFResourceContainer container, PDFWriter writer)
 {
     _states    = new Stack <StateInfo>();
     _identity  = new StateInfo(1.0, 1.0);
     _container = container;
     _writer    = writer;
 }
Пример #3
0
        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);
        }
Пример #4
0
        public string MapPath(string source)
        {
            IPDFResourceContainer parentRegister = this.GetParentResourceRegister();

            if (null == parentRegister)
            {
                return(source);
            }
            else
            {
                return(parentRegister.MapPath(source));
            }
        }
Пример #5
0
        /// <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);
        }
Пример #6
0
 public PDFResourceList(IPDFResourceContainer container, bool includeProcSet = true)
 {
     this._container      = container;
     this._includeProcSet = includeProcSet;
 }