Promotic
WikipediaLinkedInYoutubeTwitterFacebook

createRadialGradient - method of object CanvasCtx

Description:
Creates the gradient object for radial/circular color gradient.
Syntax:
createRadialGradient(x0 As Long, y0 As Long, r0 As Long, x1 As Long, y1 As Long, r1 As Long) As Object
Calling:
var grd = ctx.createRadialGradient(x0, y0, r0, x1, y1, r1);
Parameters:
x0(Long) The x-coordinate of the starting circle of the gradient
y0(Long) The y-coordinate of the starting circle of the gradient
r0(Long) The radius of the starting circle
x1(Long) The x-coordinate of the ending circle of the gradient
y1(Long) The y-coordinate of the ending circle of the gradient
r1(Long) The radius of the ending circle
Note:
The method can also be called in the graphic item events for Web Panels.
Example:
var grd = ctx.createRadialGradient(75, 50, 5, 90, 60, 100);
grd.addColorStop(0, "black");
grd.addColorStop(1, "white");
ctx.fillStyle = grd;
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice