Example usage for com.itextpdf.text.pdf.draw DottedLineSeparator setGap

List of usage examples for com.itextpdf.text.pdf.draw DottedLineSeparator setGap

Introduction

In this page you can find the example usage for com.itextpdf.text.pdf.draw DottedLineSeparator setGap.

Prototype

public void setGap(float gap) 

Source Link

Document

Setter for the gap between the center of the dots of the dotted line.

Usage

From source file:se.billes.pdf.renderer.model.text.DottedFillPhrase.java

License:Open Source License

@Override
public void onRender(com.itextpdf.text.Paragraph paragraph) {
    DottedLineSeparator sep = new DottedLineSeparator();
    sep.setAlignment(Element.ALIGN_LEFT);
    sep.setGap(gap);
    sep.setLineColor(getBaseColor());//from  w  w w.  jav a  2  s.  c o m
    com.itextpdf.text.Font f = new com.itextpdf.text.Font(getBaseFont(), getFontSize());
    f.setColor(getBaseColor());
    Chunk separator = new Chunk(sep);
    separator.setFont(f);
    paragraph.add(separator);
}