Package com.lowagie.text.pdf

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


        cb.saveState();
      // border for the complete table
        cb.setLineWidth(2);
        cb.setRGBColorStroke(255, 0, 0);
        cb.rectangle(widths[0], heights[heights.length - 1], widths[widths.length - 1] - widths[0], heights[0] - heights[heights.length - 1]);
        cb.stroke();
       
        // border for the header rows
        if (headerRows > 0) {
            float headerHeight = heights[0];
            for (int k = 0; k < headerRows; ++k)
View Full Code Here


            float headerHeight = heights[0];
            for (int k = 0; k < headerRows; ++k)
                headerHeight += heights[k];
            cb.setRGBColorStroke(0, 0, 255);
            cb.rectangle(widths[0], heights[headerRows], widths[widths.length - 1] - widths[0], heights[0] - heights[headerRows]);
            cb.stroke();
        }
        cb.restoreState();
       
        cb = canvases[PdfPTable.BASECANVAS];
        cb.saveState();
View Full Code Here

                        widths[col], heights[line + 1], widths[col + 1], heights[line]);
                cb.setRGBColorStrokeF((float)Math.random(), (float)Math.random(), (float)Math.random());
                // horizontal borderline
                cb.moveTo(widths[col], heights[line]);
                cb.lineTo(widths[col + 1], heights[line]);
                cb.stroke();
                // vertical borderline
                cb.setRGBColorStrokeF((float)Math.random(), (float)Math.random(), (float)Math.random());
                cb.moveTo(widths[col], heights[line]);
                cb.lineTo(widths[col], heights[line + 1]);
                cb.stroke();
View Full Code Here

                cb.stroke();
                // vertical borderline
                cb.setRGBColorStrokeF((float)Math.random(), (float)Math.random(), (float)Math.random());
                cb.moveTo(widths[col], heights[line]);
                cb.lineTo(widths[col], heights[line + 1]);
                cb.stroke();
            }
        }
        cb.restoreState();
    }
   
View Full Code Here

    float y1 = height[0];
    float y2 = height[height.length - 1];
    PdfContentByte canvas = canvases[PdfPTable.LINECANVAS];
    canvas.setRGBColorStroke(0x00, 0x00, 0xFF);
    canvas.rectangle(x1, y1, x2 - x1, y2 - y1);
    canvas.stroke();
    canvas.resetRGBColorStroke();
  }

  /**
   * @see com.lowagie.text.pdf.PdfPCellEvent#cellLayout(com.lowagie.text.pdf.PdfPCell,
View Full Code Here

    float y1 = position.getTop() - 2;
    float y2 = position.getBottom() + 2;
    PdfContentByte canvas = canvases[PdfPTable.LINECANVAS];
    canvas.setRGBColorStroke(0xFF, 0x00, 0x00);
    canvas.rectangle(x1, y1, x2 - x1, y2 - y1);
    canvas.stroke();
    canvas.resetRGBColorStroke();
  }

  /**
   * Example originally written by Wendy Smoak to generate a Table with
View Full Code Here

  public void cellLayout(PdfPCell cell, Rectangle position,
      PdfContentByte[] canvases) {
    PdfContentByte cb = canvases[PdfPTable.TEXTCANVAS];
    cb.moveTo(position.getLeft(), position.getBottom());
    cb.lineTo(position.getRight(), position.getTop());
    cb.stroke();
  }

  /**
   * General example using cell events.
   *
 
View Full Code Here

                    cb.fill();
            }
            break;
        case STROKE:
            if (traces > 0)
                cb.stroke();
            break;
        default: // drawType==CLIP
            if (traces == 0)
                cb.rectangle(0, 0, 0, 0);
            if (points.getWindingRule() == PathIterator.WIND_EVEN_ODD)
View Full Code Here

      cb.moveTo(document.left(),  document.top()-150);
       
      cb.lineTo((document.right() - document.left())/2,  document.top() -150);
       
      cb.stroke();
     
   

    // Write some iText poems
    for (int i = 0; i < 30; i++) {
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.