I’m planning to allow user drawing shapes and lines on image using mouse. If the background is solid, it’s quite easy to build the eraser tool (simply fill with background color). But how to make it with image as background?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not quite sure I follow. But if you want erase something that was drawn on top of an image then you can erase by drawing the image back. That’s easy to do if you use the TextureBrush class. I think you need the TextureBrush(Image, Rectangle) overload to create it. Pass the background image as the first argument, the bounding rectangle of that image as the second argument.