Example usage for com.lowagie.text.pdf PdfTemplate setColorStroke

List of usage examples for com.lowagie.text.pdf PdfTemplate setColorStroke

Introduction

In this page you can find the example usage for com.lowagie.text.pdf PdfTemplate setColorStroke.

Prototype

public void setColorStroke(Color color) 

Source Link

Document

Sets the stroke color.

Usage

From source file:tufts.vue.PresentationNotes.java

License:Educational Community License

private static PdfTemplate drawLines(PdfWriter writer) {
    PdfContentByte cb2 = writer.getDirectContent();
    //cb.cr//from  www  .  jav  a  2  s .c  om
    PdfTemplate tp2 = cb2.createTemplate(SlideSizeX + 40, SlideSizeY);
    tp2.setColorStroke(Color.gray);
    //tp2.setColorFill(Color.gray);
    int x = 30;
    for (int i = 1; i < 9; i++) {
        tp2.moveTo(0, x);
        tp2.lineTo(SlideSizeX + 40, x);
        tp2.stroke();
        x += 20;
    }

    return tp2;
}