drawTextBox method
void
drawTextBox(
- PdfDocument document,
- String text,
- PdfVisualFont font,
- PdfRect bounds, {
- PdfColor? color,
Implementation
void drawTextBox(
PdfDocument document,
String text,
PdfVisualFont font,
PdfRect bounds, {
PdfColor? color,
}) {
final resolved = font.resolve(document);
final y = bounds.bottom + bounds.height - font.ascent(document);
saveContext();
if (color != null) {
setFillColor(color);
}
drawString(resolved, font.size, text, bounds.left, y);
restoreContext();
}