quadraticCurveTo - method of object CanvasCtx

The method adds additional point for the Bézier quadratic curve. A quadratic Bézier curve requires two points. The first point is a control point that is used in the quadratic Bézier calculation. The second point is the ending point of the curve. The base point of the curve is the last point entered. If a point doesn't exist, then the beginPath() and moveTo() methods are used to define a base point.
quadraticCurveTo(cpx As Long, cpy As Long, x As Long, y As Long) As Object
ctx.quadraticCurveTo(cpx, cpy, x, y);
cpx(Long) The x-coordinate of the Bézier curve point
cpy(Long) The y-coordinate of the Bézier curve point
x(Long) The x-coordinate of the ending point
y(Long) The y-coordinate of the ending point
The method creates a path. Therefore before this method is called the beginPath method should be called. For the rendering itself the stroke or fill method is used.
The method can also be called in the graphic item events for Web panels.
See also:
The ctx variable represents the drawing canvas (CanvasCtx). The setup is done on Draw page at the beginning of the script of drawing event onDraw as follows:
var ctx = pEvent.GetCtx(1);
JavaScriptSelect and copy to clipboard

ctx.moveTo(20, 20);
ctx.quadraticCurveTo(20, 100, 200, 20);
JavaScriptSelect and copy to clipboard

ctx.moveTo(75, 25);
ctx.quadraticCurveTo(25, 25, 25, 62.5);
ctx.quadraticCurveTo(25, 100, 50, 100);
ctx.quadraticCurveTo(50, 120, 30, 125);
ctx.quadraticCurveTo(60, 120, 65, 100);
ctx.quadraticCurveTo(125, 100, 125, 62.5);
ctx.quadraticCurveTo(125, 25, 75, 25);
PROMOTIC 8.3.30 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice