Use of the arcTo function of the canvas object-, canvasarcto
(-1) Environment Description
My browser is chrome49.
(1) detailed introduction
$ (Function () {var context = lol. getContext ("2d"); context. beginPath (); context. moveTo (100,10); context. arcTo (220,10, 220,110,100); context. stroke (); context. closePath ();})
The start point is not specified in the arcTo function. It can be understood as the end point of the previous sub-path,
Context. moveTo (); specifies the start point
The line between x1, y1 and the starting point A, x1, y1 and x2, y2 forms an area. The circle drawn by the r specified radius is tangent to A and B.
Without changing the direction of line A, you can change the RADIUS or the X axis coordinates.
A straight line is drawn between the start point and the cut point when the start point is left or the start point is right.
If the direction B of the line does not change, modify the value of y2 so that x2 and y2 are located above the cut point or below the cut point, and the end point of the arc is the cut point.
Coordinates can not be placed in the canvas!