Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing gradient stop (regression) #1045

Closed
alafr opened this issue Nov 2, 2019 · 1 comment
Closed

Missing gradient stop (regression) #1045

alafr opened this issue Nov 2, 2019 · 1 comment
Labels

Comments

@alafr
Copy link
Collaborator

alafr commented Nov 2, 2019

Bug Report

The last gradient stop is missing in PDF files produced with PDFKIT v0.10.0, in gradients with more than 2 stops. It was working fine before the coffeescript to javascript conversion.

Description of the problem

Version 0.10.0 (wrong)
image

Version 0.8.3 (correct)
image

Code sample

let doc = new PDFDocument({compress:false});

// Create a linear gradient
let grad1 = doc.linearGradient(0, 0, 300, 0);
grad1.stop(0, 'green')
.stop(0.5, 'red')
.stop(1, 'green');

doc.rect(0, 0, 300, 300)
.fill(grad1);

Your environment

  • pdfkit version: 0.10.0 standalone
  • Node version:
  • Browser version (if applicable):
  • Operating System:
@alafr alafr added the bug label Nov 2, 2019
@alafr alafr changed the title Missing label stop (regression) Missing gradient stop (regression) Nov 2, 2019
@blikblum
Copy link
Member

Fixed by 4d8de91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants