/** * render image area to PDF * * @param area the image area to render */ public void RenderImageArea(ImageArea area) { int x = this.currentXPosition + area.getXOffset(); int y = this.currentYPosition; int w = area.getContentWidth(); int h = area.GetHeight(); this.currentYPosition -= h; FonetImage img = area.getImage(); PdfXObject xobj = this.pdfCreator.AddImage(img); CloseText(); currentStream.FillImage(x, y, w, h, xobj); this.currentXPosition += area.getContentWidth(); }
/** * render image area to PDF * * @param area the image area to render */ public void RenderImageArea(ImageArea area) { int x = this.currentXPosition + area.getXOffset(); int y = this.currentYPosition; int w = area.getContentWidth(); int h = area.GetHeight(); this.currentYPosition -= h; FonetImage img = area.getImage(); PdfXObject xobj = this.pdfDoc.AddImage(img); CloseText(); currentStream.Write("ET\nq\n" + PdfNumber.doubleOut(((float)w) / 1000f) + " 0 0 " + PdfNumber.doubleOut(((float)h) / 1000f) + " " + PdfNumber.doubleOut(((float)x) / 1000f) + " " + PdfNumber.doubleOut(((float)(y - h)) / 1000f) + " cm\n" + "/" + xobj.Name.Name + " Do\nQ\nBT\n"); this.currentXPosition += area.getContentWidth(); }