drawAppearance method
void
drawAppearance(
- Context context,
- PdfAnnotBase bf,
- Matrix4 mat,
- Widget child, {
- PdfAnnotAppearance type = PdfAnnotAppearance.normal,
- PdfName? tag,
- String? name,
- bool selected = false,
Implementation
void drawAppearance(
Context context,
PdfAnnotBase bf,
Matrix4 mat,
Widget child, {
PdfAnnotAppearance type = PdfAnnotAppearance.normal,
PdfName? tag,
String? name,
bool selected = false,
}) {
final canvas = bf.appearance(
context.document,
type,
matrix: mat,
boundingBox: PdfRect(0, 0, box!.width, box!.height),
name: name,
selected: selected,
);
if (tag != null) {
canvas.markContentBegin(tag);
}
Widget.draw(
child,
offset: PdfPoint.zero,
canvas: canvas,
page: context.page,
constraints:
BoxConstraints.tightFor(width: box!.width, height: box!.height),
);
if (tag != null) {
canvas.markContentEnd();
}
}