DarwinNE / FidoCadJ

FidoCadJ is a free user-friendly vector graphic editor for MacOSX, Linux, Windows and Android with a library of electronic symbols.
http://darwinne.github.io/FidoCadJ/
GNU General Public License v3.0
113 stars 40 forks source link

All my changes and implementations #240

Closed manufino closed 4 weeks ago

manufino commented 1 month ago

Sorry for combining all the commits into a single pull request, but I believe you'll be able to work through it regardless. If not, let me know, and we'll find a solution.

I merged with your project and tried to compile and run it, and everything seems to work fine. I had to modify the scripts for compilation since I changed the package names.

I hope I didn't forget anything. Happy reading!

manufino commented 1 month ago

Unfortunately, some commits are interconnected, meaning they depend on each other. I'll try to improve with the next pulls, especially regarding code formatting.

DarwinNE commented 4 weeks ago

Hi, I hope I could review every change. Globally, it is an amazing work! I haven't studied the code for the selection in detail, what I saw made sense, but I think I will do it while trying it out. The only thing that you should change is to keep the editing code (as well as the primitives, etc) as separated as possible from the graphical subsystem (AWT, Graphics2D, Graphics, etc.) If you want to draw a rectangle and in the existing code of the class, you see references to GraphicInterfaces and none to AWT or Graphics/Graphics2D, probably you should search for the equivalent method in the GraphicInterface (or associated interfaces). This allowed to reuse all this generic code for the Swing and the Android application. Even if I do not develop anymore the Android application, I still think that keeping the generic code separated from the graphical implementation makes sense.

manufino commented 4 weeks ago

I understand, it's definitely the ideal solution. It would also allow for an almost "painless" transition to JavaFX in the future. I'll work on fixing these issues.

Have you had a chance to download and test the compiled files from my fork?

Let me know if everything works well on Mac too.

DarwinNE commented 4 weeks ago

Have you had a chance to download and test the compiled files from my fork?

Not yet, I will check and correct things in a greater detail after merging the pull request.

manufino commented 4 weeks ago

@DarwinNE can you see the new commits I've made? I should have resolved everything; I've also integrated other things I did in the meantime.

DarwinNE commented 4 weeks ago

Nice work! There is still some dependency from AWT that can be removed:

Furthermore, there is a redundancy between the classes SelectionRectangle and RectangleG in the graphic package. Would it be better to only keep RectangleG, by integrating the additional code provided by SelectionRectangle?

manufino commented 4 weeks ago

@DarwinNE, I’m done.

DarwinNE commented 4 weeks ago

Amazing work, thank you!

DarwinNE commented 4 weeks ago

I restored the https://github.com/DarwinNE/FidoCadJ/blob/master/bin/fidocadj/export/glyphlist.txt file that is required for the PDF export.