michaelrsweet / pdfio

PDFio is a simple C library for reading and writing PDF files.
https://www.msweet.org/pdfio
Apache License 2.0
199 stars 44 forks source link

Use floating-point arguments in pdfioContentSetDashPattern #25

Closed zacii7 closed 3 years ago

zacii7 commented 3 years ago

In the function bool pdfioContentSetDashPattern(pdfio_stream_t *st, int phase, int on, int off);,

There is no reason to restrict the phase, on and off parameters to int; all 3 parameters should accept double as input

michaelrsweet commented 3 years ago

OK, the examples in the PDF spec are all integers but after reading it I guess they can be real numbers, too. (and of course you can just use pdfioStreamPrintf to embed arbitrary PDF content...)

michaelrsweet commented 3 years ago

[master 22c245f] Update pdfioContentSetDashPattern to accept doubles (Issue #25)