As a side effect, this sets the leading parameter in the text state.
124125126127128129130131132133134
cb.setFontAndSize(bf, 1); cb.setTextMatrix(270f, 0f, 0f, 270f, 20f, 100f); cb.setGrayFill(0.9f); cb.showText("ABC"); cb.setPatternFill(p); cb.moveTextWithLeading(0.0f, 0.0f); cb.showText("ABC"); cb.endText(); cb.setPatternFill(p); // draw a circle. Similar to rectangle
152153154155156157158159160161162
cb.setFontAndSize(bf, 1); cb.setTextMatrix(270f, 0f, 0f, 270f, 20f, 100f); cb.setGrayFill(0.9f); cb.showText("ABC"); cb.setPatternFill(p1); cb.moveTextWithLeading(0.0f, 0.0f); cb.showText("ABC"); cb.endText(); // draw a circle cb.setPatternFill(p1);