Spade (was Paint.JAVA)

scene2d would be great here. :smiley:

You should have seen what it was like before I optimised it. :stuck_out_tongue:

In other news: I merged the PluginManager, so now you can make/use plugins, if you know how (I’ll have to look at the code/ask Longor the specifics on how to make a plugin). I’ll make a wiki for it sometime soon.

ALSO: No, I am not using OpenGL

Paint.JAVA is Novice-Pixel-Art-Friendly!

Also, I’m working on some plugin tutorials at the wiki.

(Thank you very much for the plugin manager Longor1996, you saved me lots of time.)

(EDIT: Oh crap. I forgot to detail the top of his helmet. Too lazy to fix ;))

Looks great! Will this have a windows version?

The jar works fine under windows, if that’s what you mean.

The plugin-manager was merged?
Now thats good news.

Okay, so some facts about it: (Should be the same even after the merge)

  • Plugins are Jar-Files (or folders, but thats the unfinished thing!)

  • Plugins need a info-file inside them called ā€œplugin.infoā€. (Used to speed up the loading process)

  • Plugins must extend the class ā€œPluginā€ from the Paint.JAVA application jar-file.

  • The main-class of the plugin is identified solely by the ā€œextends Pluginā€ and the ā€œplugin.infoā€ file in the plugins jar-file.

  • The main-class also has to be inside a package, (ā€œpackage XXXā€ is the most minimum needed) or else the main-class cant be found.

  • Longor1996

Edit: Realized some stuff was changed by heroesgrave. Lets download the source and expand it even more!
Edit: Even more changes.
[s]Edit: You broke the system @heroesgrave. It doesnt work anymore.

And here is why:
Plugins are loaded by loading their main-class from the jar-file and calling its constructur.
In the system I made, the constructor is empty, so I can just call the ā€œnewInstanceā€-method of the class object, and the plugin is succesfully loaded.
What you did (accidentally without knowing), is that you put in a constructor into the Plugin-class, which killed the system, because it can no longer call the empty constructor, since there is none if you define any constructor but not the empty one.

The fix?

This:


try
{
	Plugin newPluginInstance = pluginClass.newInstance();
	this.loadedPlugins.add(newPluginInstance);
	System.out.println("[PluginManager] Plugin " + newPluginInstance.name + " loaded.");
}
catch(ReflectiveOperationException e1)
{
	e1.printStackTrace();
}

Has to be changed into this:


try
{
	Plugin newPluginInstance = pluginClass.getConstructor(String.class).newInstance(jarName);
	this.loadedPlugins.add(newPluginInstance);
	System.out.println("[PluginManager] Plugin " + newPluginInstance.name + " loaded.");
}
catch(ReflectiveOperationException e1)
{
	e1.printStackTrace();
}

Thats why reflection is dangerous to use. It can blow up into your face at every moment, including when you at least expect it.
I fixed it in my local copy.
Just copy the posted code and replace it, and it will work correctly again.[/s]

Edit: He fixed it.

Edit:
Oh look! Its another pull request!
And it contains a plugin viewer for the plugin-manager!

Please dont refactor the code too much this time, its a lot of hassle to correct my workspace when you make commits.
(I am using the GitHub client. You make changes, I see them and eclipse includes them instantly, causing errors without end!)

Have a nice day!

  • Longor1996

Ah. Sorry about the refactoring. I’ll try not to change too much this time.

But just one thing:

Just because the super-class has a string constructor doesn’t mean the actual plugin has to.
For example, the constructor:


public MyPlugin()
{
    super("My Plugin");
}

Is completely valid, and works with the old code, as it has no arguments.

However, perhaps I should add a default constructor that simply sets the name to ā€œUnnamed Pluginā€ to avoid confusion.

Apart from that, I don’t think I’ll need any other major changes.

I’ll have a look at the plugin viewer shortly.

Just posting to bump, and to say that this project is not dead.

It’s just that there is a lot of work going on through Github (Two contributors other than me - Yay!), and it’s not worth posting every little feature or update.

Anyway, here’s a general update on what’s going on:

  • Plugins are supported (although I need to update the tutorial on how they work).
  • Supports left/right click for different colours.
  • Just recently (a few minutes ago) added support for quick entering of hex-colour-codes.
  • One of the other contributors is working on an easier way to implements tools using Graphics2D.
  • Every now and then, I add in a new tool or image operation, most of the time as I need them for my pixel art.
  • Selection, moving, copying/pasting etc. has had a little bit of work done on it, but is still quite a way off. The main issue at the moment is the selection.
  • There is a pixel grid. I think this was added a while ago, but I can’t remember if I properly announced it.

EDIT: GitHub Link so you don’t have to scroll to the first post. Also contains download links.

Great to know! I’m quite excited for this project to be ā€œdoneā€.

Have any features in plan for non-digital-art support? Like the ā€œSoften Portraitā€ function in Paint.NET? If those features came in, I would be using this right now.

  • Jev

I think really now the only stuff that would be neat was polishing this project off with a nice Gui a few extra tools cropping support (if it doesnt have it already havent seen the project in a while) It would be a great replacement for paint.net. Does it support custom exports? I think that would be really useful allowing support for python images.

Nice. I just downloaded it and I’m impressed. I think the menu bars are a bit too bloated.

This needs to have an eraser tool.

Should I go and implement that one?
I think I can try! :slight_smile:

  • Longor1996

Ive been using this quite a bit, it’s really a great project.
Some features that would be cool to see :
~Marquee tool, (copy/paste/flip)
~Crop, maybe even crop to selected marquee area

Done!

I sent you a Pull-Request @HeroesGraveDev!

The new save-system allows for 4 formats now:

  • PNG
  • BMP
  • JPG
  • GIF (No Animations!)

EDIT:
Another Pull-Request!

This time it is:

  • Added new ImageExporter for ā€˜BIN - Raw Binary Image Data Format’.
  • Added new ImageExporter for ā€˜TGA - Tagged Image File Format’.
  • Added custom ImageImporter system.
  • Added new ImageImporter for ā€˜BIN - Raw Binary Image Data Format’.
  • Added a ā€˜Unsafe’ utility class, which includes a fallback in the (rare?) case Unsafe is not avaible.
  • Moved ImageExporter into the correct package.
  • Added simple error message dialogue to the Image save operation.
  • Put my name into the copyright notice in the files I created/modified.
  • Fixed some mistakes from the last pull request, and some bugs.
  • Fixed a FATAL mistake in the image loading routine!

Edit:
I am in a serios coding mood right now!
Have another pull-request!

This time including:

  • Refactored Image Import/Export classes. (Now they all got their own classes)
  • Added a new fancy compressed binary image exporter (ZBIN instead of BIN).
  • Added new ImageOps: RotateRightBy90°, Flip vertically, Flip Horizontally, White Noise, Simplex Noise, Simple Blur, Simple Sharpen
  • Added ICONS. Lots of them! (Some are still missing though)
  • Generated a nice and fancy javadoc for the entire project.
    - Fixed a FATAL bug in the TGA exporter!

Have a nice day!

  • Longor1996

After 3 days of hard work, Paint.JAVA v0.9 is ready!

Latest download: Here, as always.
Github: https://github.com/HeroesGrave/Paint.JAVA

I decided to draw bright transparent scribbles everywhere before writing Paint.JAVA, so here’s a screenshot.

Features:

New Drawing System. Saves memory and CPU time while still being fully functional. You probably won’t notice a difference, but I’m just telling you that I was working on something over the last few days. :wink:

Layers. These are quite different to most other image-editing programs. While others use a list of layers, Paint.JAVA organises them into a tree structure. I must warn you that layer manipulation is not fully functional yet, so I recommend keeping all your layers in the first level (under ā€œBaseā€), otherwise you will have some trouble rearranging them. F6 opens the layer manager. The controls should be easy enough to work out.

One thing to look out for is that undo/redo is layer-specific. If you draw something on a layer and want to undo it, you have to go back to that layer. Think of it as each layer being treated as a separate image, but in the same document.

A few minor changes to Brush and Eraser.

Proper transparency! I’ve copied Paint.NET on this one. Transparent colour in the same layer replaces, Transparent colour in a different layer blends.

Known Problems:

Can’t resize/rotate due to problems with the new drawing system. Make sure your image is the right dimensions first.

I think I broke the TGA exporter.

There is no layered export format. All your layers will be merged when saving, but will remain in place in the application. I’m going to work on a new format to support layered image exporting/importing.

I do not recommend using this build for much serious work.
By all means, test it, or the bugs will slip through to v1.0.
It is perfectly capable of doing pixel art, but some features are missing that could make things hard for you.
But if you are wanting to do proper work with it, wait for v1.0 in a few days.

Oops. There was a bug with loading images.

Fixed!

(To show how silly it was: The code I had to change)

syncs the fork and starts going trough the code, adding stuff, and looking for bugs while doing so

I already found some very minor mistakes in the code.
There are mistakes in the code that are so minor that they don’t actually need to be removed.

Have a nice day!

  • Longor1996

Dev builds are now available here in case anyone is interested.

I think I’m starting to understand this Git stuff.

Edit: For an idea of what’s going on with the project, this is your best source of information. I’m using the issues page as both normally as a bug tracker, but also as a TODO list.

Very nice project!

Well, I just noticed Github had a Traffic monitor, so I decided to see what was linking to the project.

#1 was Reddit’s /r/opensource. Someone posted it 2 weeks ago and I didn’t notice. Unfortunately, the comments were the classic ā€œThe developer should use GIMPā€.

#2 was JGO.

#3 was some Japanese website. I translated the page with Google:

#4 was Github, #5 was Google. #6 was Facebook. The rest weren’t notable.