Answer the question
In order to leave comments, you need to log in
How to partially clear a surface in pygame?
Hello!
I created a small drawing tool on pygame, but I still didn’t understand how to implement an eraser, since a full fill surface
doesn’t suit me (as well as changing its A-channel), I can’t figure out how to remove ALREADY drawn on a surface
sprite, maybe it’s something worth replacing?
All sprites are in pygame.sprite.Group()
Render with .draw(surface)
(I tried to remove sprites from the group using . remove (current Sprite)
, but it did not help my situation)
Please tell me the solution to this problem, perhaps links to the documentation that I missed.
Answer the question
In order to leave comments, you need to log in
You can't delete it, you can only paint it with something else, for example, the background color
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question