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

Add createRadialGradient to ICanvas #12976

Merged
merged 1 commit into from
Sep 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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