The Daily Click ::. Projects ::. Window-Licker's PaintBrush
 

Project: Window-Licker's PaintBrush
Project Started: 16th April, 2010 Last Update: 11th May, 2010
Project Owner: MBK Project Members:
Project Type: Pixel Editor Project Progress:

Dotting the "eye"
Posted 11th May 10, by MBK  
Connect the dots drawing line problem has been solved!

Now the line looks toward the earliest created dot, meaning that you do not have to wait for the line to be complete before continuing to draw.

There is still a minor problem with this method however. The line will continue to draw continuously through all the dots, meaning that even though you stop drawing dots (end the current line) and start to draw more dots (begin the next line), it will not currently differentiate between lines, consequently it will draw a line from the end of the one to the beginning of the other.

I have to figure out a way to tell the line to stop once the pen is lifted so to speak.
Currently it's as if you were drawing with a pen and made a line, then lift the pen and begin to draw another line elsewhere but the first line continues to magically spread ink to the second line connecting the two.

If anyone has a good idea how to tackle this, please let me know.

Posted by Jon Lambert 12th May, 2010

Maybe have the last dot in a line be tagged with a special value or flag, so that the drawer will know that it has reached the end of the line and can be coded to skip automatically to the next dot, then draw from there. If you're recording the position of th brush by any means other than creating individual objects, then you would just tag that recording with a certain character and have each value parsed by String Parser to see if it has that character, then go from there.
 
Posted by MBK 13th May, 2010

You know, I didn't realise this before but, this little anomoly is what makes the drawing tool special.
If I take it out, it'll be like a regular drawing tool almost, but you see the lines being drawn after you've drawn them, so it's actually sorta slower in a way.

So, I've decided to keep it as it is (it's perfect for drawing eyes with eyelids and stars quickly), and I'll keep trying to come up with an interesting main drawing tool.

I'm thinking some sort of Ink flows out the pen concept, but so far I haven't been able to get it right. This is why I need a Falling Sand tutorial.

Your advice sounds good btw, but I don't get how you'd know when the line ends, as the last dot will usually have a different alterable value each time.
(I reversed the way spread works to get the line to look at the closest dot so the last is not always 0 or 1) ... plus I have no idea about parsing strings, I tend to use simple tricks instead of the usual methods.

I haven't recorded any positions yet either, but I do plan to record the dot positions and the order that they were placed in somehow, then use how the spread values usually work to have an eraser make a line in reverse between dots to delete the visible lines, and add in a stop/start so you can reverse a few lines back then begin drawing again. I guess I always do things the hard way.

 


 



Project Forums


Favourite

Advertisement

Worth A Click