jsPDF
jsPDF copied to clipboard
.setFillColor() overwritten by calling .text()
I have read and understood the contribution guidelines.
With the following code the rect fill is black. If I remove the .text call it is red as expected.
const doc = new jsPDF()
doc.setFillColor(255, 0, 0)
doc.text('hello', 10, 10)
doc.rect(90, 10, 10, 10, 'F')
doc.output('pdfobjectnewwindow')
I'm presuming this behaviour isn't intended? I can't see anything in the docs about it.