create draw.thicklines()
with tangentially angled ends to allow for joined up thick line sections (2388)
#1225
Labels
draw.thicklines()
with tangentially angled ends to allow for joined up thick line sections (2388)
#1225
Issue №2388 opened by diazdaiz at 2020-12-09 10:17:06
this is already mentioned in closed issue no. # 448 but i think they didn't really get what DaFluffyPotato actually point out. I just realize that when i try to draw a line with passed width argument, i actually get shear transform rectangle, the problem with thit is when you want to draw continuously line like for example sin wave with width. Here, i will show the result when i want to get a sin point that connect every 10 pixel, so we will get the idea of what i actually talking about:
when we run this, we will get:
and i will try to make it more clear why is it happening in the code below:
when we run this, we will get:
so, instead of get line with some width, we actually get shear transform rectangle. I actually expecting something like this
can we get update for drawing line function?, i actually might do creating a new draw line function where the idea is create connected plate with length is equal to the width of passed width line argument, like this:
but, i am afraid it will cause graphic performance, because i dont really understand how pygame draw something in screen
Comments
# # MightyJosip commented at 2020-12-11 10:01:43
I would be glad to do it (soon™) just the problem is that it would need to be new function (because draw.lines() has to remain the same)
It shouldn't, calculating what to draw is pretty fast (the slowest thing is actually setting that list of pixels in memory)
Now the biggest problem remains to be how should that new function even be called
# # MyreMylar commented at 2020-12-11 11:58:40
draw.thicklines() ?
On Fri, 11 Dec 2020, 10:02 Josip Komljenović, [email protected]
wrote:
# # diazdaiz commented at 2020-12-11 16:45:00
Thanks guys for replying, draw.thicklines(), sound good. Btw, i currently using polygon to draw thick line, and it working very well, i hope this algorithm can help you
Algorithm:
The text was updated successfully, but these errors were encountered: