When I try to draw quick scribble lines using canvas' DrawLine block, the curves of the scribble are not smooth. The distance between PrevX/Y and CurrentX/Y is very big (in 10s of millimeters) and thus, the curves appear as a polygon rather than a smooth curve. I am not sure why the distance between two consecutive points is so big. I have also tried to add a DrawCircle along with DrawLine in the Canvas Dragged block. This has smoothened the line edges but at the turning points this not curved, rather there are sharp angular turns.
This bug is troubling me a lot. I am trying to build a drawing app. But, these polygon shaped lines look very annoying. Please help.
Hi Patryk, I didnt get you. The way to draw curve is using drawline. The Points are scattered and dont join as a single curve. Please share an example block code, if you can. Thanks
Dear dora_paz, I am not sure how fast are you drawing. Please look at my scribbles, The above one is slower and is much smoother as compared to lower one. I drew the lower curve faster and the curve got distorted. The lesser the linewidth the uglier it looks.
Please see if you have any solution to that. I cant expect my app users to always draw slower.
It doesn't look good by points. I don't think you can help it. Canva is too slow, with fast movements it won't have time to read all the intermediate points and then it draws straight lines.
Yes Patryk. I understand this point. But my points are appearing bit too farther. Any way to make sure that canvas picks closer points to draw a line. Thanks.
It will not pick any closer points because it cannot "see" them in fast movements. But do you need such fast movements? With normal drawing, it is fine. Quick movements are scratching, and when you crinkle, the shape is probably not important;)
Responsive is the default in app inventor. With fast movements, both responsive and fixed it creates straight lines. Straight lines appear jagged only in fixed mode.
In my little tryout of a doodle app, the curves are not completely smooth, but close enough.
If you really, really! need very smooth curves, you should keep a list of the points you go through on the canvas and use Bezier curves through these points. In JavaScript there are enough examples for this which you could use as an example, or write an extension, or maybe someone wrote one that you could use.
But my advice would be: live with it. If that is not an option, learn Java.