My question is simple: What is the difference between using pygame.draw
and pygame.gfxdraw
? I've looked on the pygame documentation, but no one has told what the difference between them is.
Just put the line of code for the line you draw in the while loop and it should draw the line. Also put your "pygame. display. flip()" at the end of your loop.
To draw a circle in your pygame project you can use draw. circle() function.
The draw
function is a bit more stable, and also a bit faster that gfxdraw
, although gfxdraw
has more options, not only along the lines of antialiasing, but also drawing shapes. pygame.draw
has only nine functions, whereas pygame.gfxdraw
has 22 options, which include all 9 of the options supplied by draw
. I recommend using gfxdraw
even though its is "experimental" because it has more capabilities.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With