-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Canvas 2.9.1: Context.createLinearGradient not working #2043
Comments
Can you provide a complete, reproducible example please? |
@zbjornson this following single block of code produces two different result with 2 different version (check 2 attachments).
Canvas 2.9.1Canvas 2.9.0 |
I'm getting the correct (gradient, not solid black) behavior in 2.8.0, and 2.9.1. I also don't see any changes that would be likely to have caused this. This is the code I used: const canvas = createCanvas(200, 200);
const ctx = canvas.getContext("2d");
const gradientFrom = "rgba(53,83,192,0.9)"
const gradientTo = "rgba(58,69,110,0.5)"
const gradient = ctx.createLinearGradient(0, 0, 0, 400)
gradient.addColorStop(0, gradientFrom)
gradient.addColorStop(1, gradientTo)
ctx.fillStyle = gradient;
ctx.fillRect(0, 0, 200, 200); Are you still encountering this issue? |
Closing without more info, but will reopen if you're still encountering this. |
Issue or Feature
2.9.1
from2.8.0
. The background just fell back toblack
. Gradient background still working fine with2.9.0
Your Environment
The text was updated successfully, but these errors were encountered: