Skip to content

Commit

Permalink
Merge pull request #12976 from yuripourre/add-createRadialGradient
Browse files Browse the repository at this point in the history
Add createRadialGradient to ICanvas

Former-commit-id: 6976bceac68d2aff376d8428da0a6efb5d35b7ff
  • Loading branch information
sebavan authored Sep 13, 2022
2 parents c371988 + 00ac058 commit df0bc5d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/dev/core/src/Engines/ICanvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,18 @@ export interface ICanvasRenderingContext {
*/
createLinearGradient(x0: number, y0: number, x1: number, y1: number): ICanvasGradient;

/**
* Creates a linear gradient along the line given by the coordinates represented by the parameters.
* @param x0 The x-axis coordinate of the start circle.
* @param y0 The y-axis coordinate of the start circle.
* @param r0 The radius of the start circle. Must be non-negative and finite.
* @param x1 The x-axis coordinate of the end point.
* @param y1 The y-axis coordinate of the end point.
* @param r1 The radius of the end circle. Must be non-negative and finite.
* @returns ICanvasGradient A linear ICanvasGradient initialized with the two specified circles.
*/
createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): ICanvasGradient;

/**
* Resets the current transform to matrix composed with a, b, c, d, e, f.
* @param a Horizontal scaling. A value of 1 results in no scaling.
Expand Down

0 comments on commit df0bc5d

Please sign in to comment.