Examples of rectangle()


Examples of com.lowagie.text.pdf.PdfContentByte.rectangle()

            PdfContentByte cb = writer.getDirectContent();
           
            // an example of a rectangle with a diagonal in very thick lines
            cb.setLineWidth(10f);
            // draw a rectangle
            cb.rectangle(100, 700, 100, 100);
            // add the diagonal
            cb.moveTo(100, 700);
            cb.lineTo(200, 800);
            // stroke the lines
            cb.stroke();
View Full Code Here

Examples of com.lowagie.text.pdf.PdfContentByte.rectangle()

      } catch (DocumentException e) {
        // TODO Auto-generated catch block
      }
    }
    if (recHeader != null) {
      cb.rectangle(recHeader.getLeft(), recHeader.getBottom(), recHeader.getWidth(), recHeader.getHeight());
      cb.setLineWidth(/*0.5f*/0f);
      //cb.stroke();
    }

    if (footerLogo != null) {
View Full Code Here

Examples of com.lowagie.text.pdf.PdfContentByte.rectangle()

        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }
    if (recFooter != null) {
      cb.rectangle(recFooter.getLeft(), recFooter.getBottom(), recFooter.getWidth(), recFooter.getHeight());
      cb.setLineWidth(/*0.5f*/0f);
      //cb.stroke();
    }

    cb.restoreState();
 
View Full Code Here

Examples of com.lowagie.text.pdf.PdfContentByte.rectangle()

        }
        else {
          cb.addTemplate(page, factor, 0, 0, factor, x1 + dx, y2[p] + dy);
        }
        cb.setRGBColorStroke(0xC0, 0xC0, 0xC0);
        cb.rectangle(x3 - 5f, y2[p] - 5f, x4 - x3 + 10f, y1[p] - y2[p] + 10f);
        for (float l = y1[p] - 19; l > y2[p]; l -= 16) {
          cb.moveTo(x3, l);
          cb.lineTo(x4, l);
        }
        cb.rectangle(x1 + dx, y2[p] + dy, rect.width() * factor, rect.height() * factor);
 
View Full Code Here

Examples of com.lowagie.text.pdf.PdfContentByte.rectangle()

        cb.rectangle(x3 - 5f, y2[p] - 5f, x4 - x3 + 10f, y1[p] - y2[p] + 10f);
        for (float l = y1[p] - 19; l > y2[p]; l -= 16) {
          cb.moveTo(x3, l);
          cb.lineTo(x4, l);
        }
        cb.rectangle(x1 + dx, y2[p] + dy, rect.width() * factor, rect.height() * factor);
        cb.stroke();
        System.out.println("Processed page " + i);
        p++;
        if (p == pages) {
          p = 0;
View Full Code Here

Examples of com.lowagie.text.pdf.PdfContentByte.rectangle()

        cb.addTemplate(tpl, document.right() - adjust, textBase);

        cb.saveState();
        // draw a Rectangle around the page
        cb.setLineWidth(1);
        cb.rectangle(30, 30, document.getPageSize().width() - 60, document.getPageSize().height() - 60);
        cb.stroke();
        cb.restoreState();
    }

    /**
 
View Full Code Here

Examples of com.lowagie.text.pdf.PdfPatternPainter.rectangle()

           
            // step 4: we add some content
            PdfContentByte cb = writer.getDirectContent();
            PdfTemplate tp = cb.createTemplate(400, 300);
            PdfPatternPainter pat = cb.createPattern(15, 15, null);
            pat.rectangle(5, 5, 5, 5);
            pat.fill();
            pat.sanityCheck();
           
            PdfSpotColor spc_cmyk = new PdfSpotColor("PANTONE 280 CV", new CMYKColor(0.9f, .2f, .3f, .1f));
            SpotColor spot = new SpotColor(spc_cmyk, 0.25f);
View Full Code Here

Examples of com.lowagie.text.pdf.PdfTemplate.rectangle()

            // stroke the lines
            t.stroke();
           
            // Fill a rectangle with CMYK alternate
            t.setColorFill(spc_g, 0.5f);
            t.rectangle(100, 125, 100, 100);
            t.fill();
            t.beginText();
            t.setFontAndSize(bf, 20f);
            t.setTextMatrix(1f, 0f, 0f, 1f, 10f, 10f);
            t.showText("Template text upside down");
View Full Code Here

Examples of com.lowagie.text.pdf.PdfTemplate.rectangle()

            t.beginText();
            t.setFontAndSize(bf, 20f);
            t.setTextMatrix(1f, 0f, 0f, 1f, 10f, 10f);
            t.showText("Template text upside down");
            t.endText();
            t.rectangle(0, 0, 499, 499);
            t.stroke();
            t.sanityCheck();
            cb.addTemplate(t, -1.0f, 0.00f, 0.00f, -1.0f, 550f, 550f);
           
            cb.sanityCheck();
View Full Code Here

Examples of com.lowagie.text.pdf.PdfTemplate.rectangle()

            pat.sanityCheck();
           
            PdfSpotColor spc_cmyk = new PdfSpotColor("PANTONE 280 CV", new CMYKColor(0.9f, .2f, .3f, .1f));
            SpotColor spot = new SpotColor(spc_cmyk, 0.25f);
            tp.setPatternFill(pat, spot, .9f);
            tp.rectangle(0, 0, 400, 300);
            tp.fill();
            tp.sanityCheck();
           
            cb.addTemplate(tp, 50, 50);
            PdfPatternPainter pat2 = cb.createPattern(10, 10, null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.