We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
how can I specify the direction of linear gradient?
the example @ http://libcanvas.github.com/ui/gradients.html goes from top left corner to bottom right corner. I'd like to have a vertical gradient.
The text was updated successfully, but these errors were encountered:
It is easy - just set two points instead of rectangle. Something like that:
ctx.fill(this.shape, ctx .createLinearGradient( this.shape.from, this.shape.bottomLeft ) .addColorStop({ '0.0' : 'white', '0.3' : 'blue', '0.5' : 'yellow', '0.7' : 'green', '1.0' : 'red' }) );
Sorry, something went wrong.
No branches or pull requests
Hi,
how can I specify the direction of linear gradient?
the example @ http://libcanvas.github.com/ui/gradients.html goes from top left corner to bottom right corner. I'd like to have a vertical gradient.
The text was updated successfully, but these errors were encountered: