Canvas2D: Add createConicGradient() method


Add createConicGradient() which informs to use createConicalGradient().
Ideally Canvas2D could be compatible with both HTML canvas and Quick
Canvas, but unfortunately that isn't really possible. Main problems are
that angle direction is different (counter-clockwise vs. clockwise) and
parameter order also (x, y, angle) vs. (angle, x, y). Supporting both
would require inverting gradient stops positions, which would be quite
hacky.

So agree that Canvas2D uses non-standard createConicalGradient(), which
naming matches with Quick Canvas and implementation matches to Canvas
Painter QCanvasConicalGradient constructor.

Also, fix degrees to radians.

Task-number: QTBUG-132267
Change-Id: I4a6b9c740ac78639efb48fda334ed7308d8d687a
Reviewed-by: Owais Akhtar <owais.akhtar@qt.io>
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
commit53c0e0f168451ce7204f3175d9e8f88715875e1b
parentdc45d0485e2453db50c281d2a496a7a00632eb04
authorKaj Grönholm <kaj.gronholm@qt.io>
committerKaj Grönholm <kaj.gronholm@qt.io>
commit timeTue, 28 Apr 2026 14:21:47 +0000