How many ways to make an eraser and how to do that?

I am going to make a sketch board and it needs one eraser, I have made one but it’s not nice enough. Maybe you guys can make some awesome.

Looking forward you reply :grinning:.

Hi there,

Why don’t you post what you got so far, so you might get something that fit’s in you project. Otherwise you get nothing or you get something you’ll have hard time to fit to your project.

2 Likes

I totally agree :slight_smile: there are million ways to do it because erasing depends on the context. There is erase function but it may not serve what you want reference | p5.js

I agree.
especially when you have an eraser already, when you don’t tell us what you don’t like about it.

In theory, an eraser is just

  • a painting tool / pencil that draws with the background color.

When you want something more advanced you can

  • either have different layers, so you can erase only on one layer or
  • when you draw different items like lines, circles and rectangles and store them in an ArrayList you can delete one item from the list - that’s advanced but you can remove one circle without changing what’s underneath or above on the canvas

Chrisir

1 Like