drawString method
void
drawString(})
This draws a string.
Implementation
void drawString(
PdfFont font,
double size,
String s,
double x,
double y, {
double charSpace = 0,
double wordSpace = 0,
double scale = 1,
PdfTextRenderingMode mode = PdfTextRenderingMode.fill,
double rise = 0,
}) {
assert(() {
if (_page.pdfDocument.verbose) {
_buf.putComment('drawString x:$x y:$y size:$size "$s"');
}
return true;
}());
_page.addFont(font);
_buf.putString('BT ');
PdfNumList([x, y]).output(_buf);
_buf.putString(' Td ');
setFont(font, size,
charSpace: charSpace,
mode: mode,
rise: rise,
scale: scale,
wordSpace: wordSpace);
_buf.putString('[');
font.putText(_buf, s);
_buf.putString(']TJ ET\n');
}