what I"m drawing now is this
http://output.jsbin.com/rosoq...
I will not write an example of the Bezier curve. I have found a random tutorial on the Internet.
https://github.com/hujiulong/.
arc directly uses the arcTo
function to send you a rounded rectangle path function
function roundRect(x, y, w, h, radius) {
this.moveTo(x, y + h - radius[3]);
this.arcTo(x, y, x + 1, y, radius[0]);
this.arcTo(x + w, y, x + w, y + 1, radius[1]);
this.arcTo(x + w, y + h, x - 1, y + h, radius[2]);
this.arcTo(x, y + h, x, y, radius[3]);
}
roundRect.call(ctx,0,0,100,100,[10,10,10,10]) // 10
problem description online found a section of canvas ball collision code, the code is great, but there is a problem is that when two small balls are crossed at the beginning, their trajectories are the same, supposed to be random, I don t know why th...
how to realize the circular progress bar with gradual change of color? now we can not achieve the effect by using canvas,createLinearGradient,. I don t know if there is any good way to achieve it, in Mini Program. ...
Press and drag the mouse, draw a glowing line with canvas, save the track, and then play the track. implementation idea: 1 press the mouse to draw a line, record the track with an array, and then play the track 2 to shadow the line . question: dra...