5 Commits

Author SHA1 Message Date
alafr
f65ab0052f Fix whitespace, split long line and...
... keep 'grad.transform' so that the old api continues working as before
2016-11-30 09:46:13 +02:00
alafr
c892bc348b Fix issues with opacity gradients
When there is opacity ≠ 1 specified, the gradient is drawn and masked on a "Tiling Pattern". The tiling has BBox, XStep & YStep values equal to the dimensions of the page, to avoid any clipping or tiling repetition. Patterns are unaffected by the "Current Transformation Matrix" so the clipping rectangle is always aligned with the page borders (SMasks and Groups don't have this property). Problems could possibly happen if a gradient is embedded on multiple pages (this doesn't work anyway) of different size.

This pull request resolves the following issues:
- Fix use of opacity gradients with fillAndStroke (#214)
- Fix the reuse of the same gradient after transformations
- Fix clipping of some gradients with opacity
- Add 'transform' function to the gradient object
2016-11-28 11:03:57 +02:00
Devon Govett
f8a40dba76 Make PDFDocument a node stream 2014-03-23 17:11:48 -07:00
Devon Govett
1305a9592a Switch to 2 space indentation 2014-03-23 12:25:09 -07:00
Devon Govett
2493e0c34c Add gradient support (both linear and radial). Closes #95. 2013-05-12 20:29:53 -07:00