I am trying to create a simple rounded vertex of a rectangle. I was able to use the method bezierCurveToto create the cap, but I had to play with the values of the control point y to get the correct height of the curve. If I have a width and I know that the height I want the curve to go through is their formula to find the values of the control point y? I now have a function
c.moveTo(130,55);
c.bezierCurveTo(130,-18,0,-18,0,55);
-18 is what I needed to set for y values in order to approximate the curve through y = 0.
source
share