Implementing Painting and Erasing Functionality

I’m working on a digital painting project and running into a couple of design challenges. First, I’d like to create an artboard that’s constrained to the tan canvas area. I’m not sure how to set that up. Second, I need to implement a toggle for the paintbrush tool – clicking it should activate or deactivate the ability to paint. Finally, I want to add an eraser tool that, when selected, allows the user to erase portions of their drawing by dragging their finger over the canvas. Any tips on how to achieve these features?