Page 1 of 1

paint program help

Posted: Sat Nov 02, 2013 4:02 pm
by silverknight108
Hello everyone i am new to love and I am creating a paint program basicly it has a red,green and blue sqaures in the top corner if you click on one it changes the color of your pen this is how I planned it

create coloured squares - done
make it respond to a mouse click to change pen color - in progress
make you be able to click on emty space to draw -not done

please help is there any place on the wiki that might help.Also I heard on the wiki that you can not do anything with graphics outside function love.draw
and I need to make an event in mouse event that uses graphics to change pen color

Re: paint program help

Posted: Sat Nov 02, 2013 4:54 pm
by seeker14491
You can do things such as change the drawing color outside of love.draw. You just have to do the actual drawing in love.draw.

I'm no expert, but for a painting program I would use canvases, although they don't work on really old/weak computers.

https://www.love2d.org/wiki/canvas

Re: paint program help

Posted: Sat Nov 02, 2013 5:11 pm
by micha
We talked about a paint program in this thread here. Maybe that helps.

If not, please upload a .love-file of the code you have. That way we can help you much more specific.

Re: paint program help

Posted: Mon Nov 04, 2013 3:50 am
by iPoisonxL
I just made a table that holds every pixel with a 0-12 value for each color.