Update cookies preferences

createRadialGradient - method of the CanvasCtx object

Creates the gradient object for radial/circular color gradient.
Object createRadialGradient(Long x0, Long y0, Long r0, Long x1, Long y1, Long r1)
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
This method is also functional in Web panels.
The ctx variable represents the drawing canvas (CanvasCtx). The setup is done on the "Draw" tab at the beginning of the script of drawing event onDraw as follows:
var ctx = pEvent.GetCtx(1);
JavaScriptSelect and copy to clipboard

var grd = ctx.createRadialGradient(75, 50, 5, 90, 60, 100);
ctx.addColorStop(0, "black");
ctx.addColorStop(1, "white");
ctx.fillStyle = grd;

Pm8.02.06: Created
PROMOTIC 9.0.28 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.