setFillColor method
Sets the fill color for drawing
Implementation
void setFillColor(PdfColor? color) {
var o = 0;
assert(() {
if (_page.pdfDocument.settings.verbose) {
o = _buf.offset;
_buf.putString(' ' * (_indent));
}
return true;
}());
if (color is PdfColorCmyk) {
PdfNumList(<double>[color.cyan, color.magenta, color.yellow, color.black])
.output(_page, _buf);
_buf.putString(' k ');
} else {
PdfNumList(<double>[color!.red, color.green, color.blue])
.output(_page, _buf);
_buf.putString(' rg ');
}
assert(() {
if (_page.pdfDocument.settings.verbose) {
_buf.putString(' ' * math.max(0, _commentIndent - _buf.offset + o));
_buf.putComment('setFillColor(${color?.toHex()})');
}
return true;
}());
}