[SOLVED]Help: making a "brush"
Posted: Fri Sep 12, 2014 1:58 pm
Hello boys and girls!
I'm currently working on a project that I call "Helium", Helium is going to be a clone of Microsoft paint with brush that's 16x16 big.
And as you might have guessed I need some help, I have successfully managed to figure out how to draw a square and I have made it so that the square moves around by clicking (I'm a beginner at Löve and this is the first time I code something on my own).
I got things started by viewing a another thread that was similar to what I want to do: http://love2d.org/forums/viewtopic.php? ... een#p71772
This is what I need some help with:
1. I don't want to see the square in the corner (it's at 0,0 right now) I only want it to appear when I "draw" on screen.
2. I want to draw several squares on the screen so I can create an "art piece" and they keep their current position when I move on to another.
3. Also I have made a canvas (800x480) that I want to be contain within and I have a temporary UI (800x120) that I don't want you to doodle around on.
OPTIONAL:
I want to be able to draw continuously by holding down the mouse button and drag the mouse cursor up, down, left and right so I can make a straight line if I want
I hope I was clear with my explanation and please feel free to view my code
I'm currently working on a project that I call "Helium", Helium is going to be a clone of Microsoft paint with brush that's 16x16 big.
And as you might have guessed I need some help, I have successfully managed to figure out how to draw a square and I have made it so that the square moves around by clicking (I'm a beginner at Löve and this is the first time I code something on my own).
I got things started by viewing a another thread that was similar to what I want to do: http://love2d.org/forums/viewtopic.php? ... een#p71772
This is what I need some help with:
1. I don't want to see the square in the corner (it's at 0,0 right now) I only want it to appear when I "draw" on screen.
2. I want to draw several squares on the screen so I can create an "art piece" and they keep their current position when I move on to another.
3. Also I have made a canvas (800x480) that I want to be contain within and I have a temporary UI (800x120) that I don't want you to doodle around on.
OPTIONAL:
I want to be able to draw continuously by holding down the mouse button and drag the mouse cursor up, down, left and right so I can make a straight line if I want
I hope I was clear with my explanation and please feel free to view my code