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

Support createConicGradient #2422

Open
1 task
jacobp100 opened this issue Aug 23, 2024 · 0 comments
Open
1 task

Support createConicGradient #2422

jacobp100 opened this issue Aug 23, 2024 · 0 comments

Comments

@jacobp100
Copy link

Issue or Feature

Steps to Reproduce

var Canvas = require('canvas');
var canvas = Canvas.createCanvas(200, 200);
var ctx = canvas.getContext('2d');

ctx.createConicGradent(...)

This is relatively new in canvas - https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createConicGradient

Apparently Cairo supports this via mesh gradients - https://lea.verou.me/blog/2015/06/conical-gradients-today/

Another reason was that Cairo, the graphics library used in Chrome and Firefox had no way of drawing a conical gradient. However, this changed a while ago, when they supported mesh gradients, of which conical gradients are a mere special case.

Your Environment

  • Version of node-canvas (output of npm list canvas or yarn list canvas):
  • Environment (e.g. node 20.9.0 on macOS 14.1.1):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant