SFML community forums
Help => Graphics => Topic started by: Blaxxun on October 22, 2019, 07:34:01 pm
-
Hello Forum,
I work on a little drawing tool.
Drawing works fine. But how do i erase with a shape?
I have a circle shape which is my brush.
If i set Alpha to zero. Nothing is drawn. Okay, makes sense.
But how can i use my "brush" to discard already drawn stuff??
Thanks!
-
Draw your transparent brush with sf::Blend::None rather than the default sf::Blend::Alpha. This way you'll copy transparency instead of applying it.
-
It works! Thank you! :)