Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.PdfGState


            table.getDefaultCell().setBorderWidth(0);
            table.addCell(p);
            table.getDefaultCell().setHorizontalAlignment(Element.ALIGN_RIGHT);
            table.addCell(new Phrase(new Chunk(headerImage, 0, 0)));
            // initialization of the Graphic State
            gstate = new PdfGState();
            gstate.setFillOpacity(0.3f);
            gstate.setStrokeOpacity(0.3f);
            // initialization of the template
            tpl = writer.getDirectContent().createTemplate(100, 100);
            tpl.setBoundingBox(new Rectangle(-20, -20, 100, 100));
View Full Code Here


            pictureBackdrop(gap, 500 - 200 - gap, cb);
            pictureBackdrop(200 + 2 * gap, 500 - 200 - gap, cb);
           
            pictureCircles(gap, 500, cb);
            cb.saveState();
            PdfGState gs1 = new PdfGState();
            gs1.setFillOpacity(0.5f);
            cb.setGState(gs1);
            pictureCircles(200 + 2 * gap, 500, cb);
            cb.restoreState();

            PdfTemplate tp = cb.createTemplate(200, 200);
            cb.saveState();
            pictureCircles(0, 0, tp);
            PdfTransparencyGroup group = new PdfTransparencyGroup();
            tp.setGroup(group);
            tp.sanityCheck();
            cb.setGState(gs1);
            cb.addTemplate(tp, gap, 500 - 200 - gap);
            cb.restoreState();

            tp = cb.createTemplate(200, 200);
            cb.saveState();
            PdfGState gs2 = new PdfGState();
            gs2.setFillOpacity(0.5f);
            gs2.setBlendMode(PdfGState.BM_SOFTLIGHT);
            tp.setGState(gs2);
            tp.sanityCheck();
            pictureCircles(0, 0, tp);
            tp.setGroup(group);
            cb.addTemplate(tp, 200 + 2 * gap, 500 - 200 - gap);
View Full Code Here

     * @param y
     * @param cb
     * @throws Exception
     */
    public static void pictureCircles(float x, float y, PdfContentByte cb) throws Exception {
      PdfGState gs = new PdfGState();
      gs.setBlendMode(PdfGState.BM_SOFTLIGHT);
      gs.setFillOpacity(0.7f);
      cb.setGState(gs);
        cb.setColorFill(Color.gray);
        cb.circle(x + 70, y + 70, 50);
        cb.fill();
        cb.circle(x + 100, y + 130, 50);
View Full Code Here

TOP

Related Classes of com.lowagie.text.pdf.PdfGState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.