So I am working on this drawing tool for 8 bit games. It is a school assignment. And I pretty much have it figured out. I just wanted to add a last feature which is turning off the grid that is is used to draw the pixels before you save it, but I have not accomplished it. I figured it out on the void setup but since I have everything on the void draw it does not seem to work. Any suggestions are more than welcome, here is the code for the program and at the end is my temporary solution that when incorporated did not work:
text(" Use the Grid to draw Mario press 's' to save \n press 'c' on the color palette to get color \n mouse click on the center of \n each square to draw a pixel", 200, 100);
Is it possible to save an specific from the canvas as an image? I know you can save the whole screen as an image with the function save(, but what if I just want to save an specific area of it.
I am trying to make a drawing tool for pixel images, so I want to have a color palette(Image) so that when you hover on it in a certain position and press the 'c" key it takes the color from that pixel and puts in in a color variable, and then draw a square with the color acquired from that pixel, but have the chance of doing it many times. I haven't gotten it to work totally, at least it runs the application but doesn't pick a color specifically. Any help will be much appreciate it.