Paint Editor
This editor isn’t finished yet but is being worked on.
The first alpha is just the beginning and right now you can only draw in green.
Next versions:
Different Colours/Colors
Fill
Shapes
Menu
Saving
Paint Editor
This editor isn’t finished yet but is being worked on.
The first alpha is just the beginning and right now you can only draw in green.
Next versions:
Different Colours/Colors
Fill
Shapes
Menu
Saving
Just by looking at the screenshot, I’m going to take a guess:
You’re grabbing the mouse position every update and storing it in a list.
You then loop through the list and draw a dot at the positions.
Am I correct? If I am, you should draw a line connecting each point so that you don’t have a bunch of dots.
Here is a demo:
http://www.java-gaming.org/user-generated-content/members/251719/painteditoralpha1-0.jar
As I said before you can only draw in green more updates will be coming.
Controls:
Mouse Click and Drag to draw (You can use both left click and right click for better drawing)
You didn’t say if I was correct or not, so I took the liberty of reverse-engineering your jar file to see the sauce.
private Point[] points = new Point[10000];
This isn’t a good way of making a paint program. What happens when I fill up all the points? The array doesn’t even correlate to any pixel on the screen. When/if you expand this program, you’ll see what I mean.
Keep working at it. Look at how Paint.JAVA is done.
Oh wow, no a fixed array is not a good idea. By default, you should have a paintbrush as the default tool, not a point tool. Take the advice of vBrain and create lines, and then you can expand it to support brush sizes by drawing more lines next to the first.
If I were doing it, I would create an array of pixels equivalent to the size of the canvas.
Thank You for the advice.