|
Author |
Topic: Simple Painter (Read 3319 times) |
|
Kevin Pfeiffer Guest
|
Re: Simple Painter
« Reply #2 on: Jan 16th, 2004, 1:31am » |
|
> Added some features and sped some things up. > http://www.robotican.org/cells/p5/cells.jsp I got "Applet failed" But it's late and maybe the browser (Konqueror) is as tired as I am... -K
|
|
|
|
rgovostes
|
Re: Simple Painter
« Reply #4 on: Jan 16th, 2004, 6:14pm » |
|
zach: that link doesn't seem to work for me. Squillis: If one moves the mouse too quickly, it leaves gaps in the drawing. Here are some suggestions for fixing this: 1. Draw lines from point to point, using the Bresenham line algoritthm. 2. Use an array of booleans for quickly changing whether or not you've drawn on a square in the grid. When the mouse button is released, go through each square marked as 'true' and fill it with color. 3. Let the user draw a 1x1 line (the 'pencil tool' found in most graphic apps), and connect points drawn by it with Processing's built in line-drawing functions. When the mouse button is released, find every square that was drawn in and fill it with color. 4. Have all drawings occur on a small, 1:1 picture in Processing, then blow it up to whatever dimensions you need it. You could also look into Bresenham's circle drawing algorithm for doing circles.
|
« Last Edit: Jan 16th, 2004, 6:16pm by rgovostes » |
|
|
|
|
Squillis
|
Re: Simple Painter
« Reply #5 on: Jan 17th, 2004, 4:53am » |
|
Thanks for the feedback. So, after every loop if the cell has changed, mark true all the cells in between start and finish even if it's only one cell? If that's the case, wouldn't diagonals drawn quickly would become two cells thick by default? Thanks again. I'm new to all this and just coming up with what I can. All suggestions are welcome. :] Edit: I might need to explain my approach. I'm using a Cell object because each cell will contain both color and href information to be stored in a database.
|
« Last Edit: Jan 17th, 2004, 4:56am by Squillis » |
|
|
|
|
grrrr
|
Re: Simple Painter, fill, save?
« Reply #6 on: Oct 26th, 2004, 7:32pm » |
|
i did something more raw, visitors can draw over my drawing: http://grrrr.net/feat_you/you_2.html now i would like to add a fill-tool and a way to submit the drawings (as png or gif) to my server did anybody do something simlar? i like cells of mine but cant find the fill-tool (the other links dont work)
|
« Last Edit: Nov 25th, 2004, 5:59pm by grrrr » |
|
|
|
|
grrrr
|
Arrrrgh2 Painter
« Reply #8 on: Nov 25th, 2004, 5:49pm » |
|
thank you for the flood-tool... now my applet has 3colors and 3tools(pencil, flood, invert) see at: http://grrrr.net/feat_you/you_1.html but im still not skilled enough to build a save-to-server-button
|
|
|
|
Squillis
|
Re: Simple Painter
« Reply #9 on: Mar 14th, 2005, 7:34am » |
|
Sorry about the dead links. Tomcat was killing my little 400mhz server. This is the last version I have. http://robotican.org/pixel_test/cells_of_mine/ Oh, and check out the bucket tool in this version. It's much shorter than the above link, and it appears to work.
|
« Last Edit: Mar 14th, 2005, 7:46am by Squillis » |
|
|
|
|
|