During the last three months of Google Summer of Code, as a Student Developer, I worked on an extremly helpful tool for the app Pocket Paint (https://play.google.com/store/apps/details?id=org.catrobat.paintroid&hl=de_AT&gl=US) which is a image manipulation app by Catrobat (https://catrobat.org/).
The main work of my GSoC 2022 project was to implement a new tool, called "clipping tool" which is present in nearly every image manipulation program and facilitates the usage of the app.
With this new tool the user is able to mark an area and when applying the tool or switching to another tool with a marked area already drawn, everything except the marked area will be erased. The path for the marked area can have any color but depending on the tool color, the path either has a white contour (when black is the current tool color) or black otherwise.
In order to have an actual closed area to properly clip I decided to do the same as i.e. Photoshop and just draw a last line from the last coordinate (where the user released the finger) to the initial coordinate to have an actual closed marked area to clip. I did not find out yet why sometimes the line is an actual line and sometimes the patheffect of the toolpaint actually applies and a dashed line will be drawn.
I made some case distinctions in order to make the usage of the tool easy and predictable.
The three cases are:
- When marked area is already drawn and user tries to draw another area the old area will just be deleted and the new area will be drawn on the canvas.
- When marked area is drawn and user presses undo, the marked area will just be deleted.
- When marked area is drawn and applied and user presses undo, the bitmap before clipping will be displayed, as the path command for the marked area will be deleted from the undo/redo list, also color changes will not be undo/redo-able as discussed with the product owner of the app.
Here are some demos to see how using the tool looks like:
PR of clipping tool: https://github.com/Catrobat/Paintroid/pull/1125/files Issue: https://jira.catrob.at/browse/PAINTROID-432
After finishing the main task of this years GSoC 2022 I also did several code reviews for other members of Paintroid:
- Issue: https://jira.catrob.at/browse/PAINTROID-388 - PR: Catrobat/Paintroid#1116
- Issue: https://jira.catrob.at/browse/PAINTROID-394 - PR: Catrobat/Paintroid#1042
- Issue: https://jira.catrob.at/browse/PAINTROID-406 - PR: Catrobat/Paintroid#1124
- Issue: https://jira.catrob.at/browse/PAINTROID-416 - PR: Catrobat/Paintroid#1128
- Issue: https://jira.catrob.at/browse/PAINTROID-445 - PR: Catrobat/Paintroid#1130
I also implemented another really helpful extension for Paintroid which allows the user to add more layers (100 to be exact) than the original 4 layers and reorder, merge or move them via drag and drop.
Further details on the implementation can be found on the link below.
PR: Catrobat/Paintroid#1136 Issue: https://jira.catrob.at/browse/PAINTROID-420
Last but not least I gave myself a try to fix some bugs but as I was not able to reproduce those bugs and also no member was able to, I decided to rather do some more code reviews as there were a lot of tickets in the "ready for review" category on Jenkins.
To conclude this page I want to point out that the project as a whole is amazing and I truly enjoyed working on it.
As I was already a part of this project before GSoC 2022, I knew all of the members and would like to thank everyone participating in this awesome open-source project.
Special thanks to my GSoC 2022 mentor Michael Herold as well as Catrobat for giving me the opportunity to extend my knowledge base and show off my love for programming and especially open-source projects and of course to Google for providing such awesome project for motivated and committed developers.
In case you want to connect with my via social media, here is the link to my Linkedin profile: https://www.linkedin.com/in/michael-tiefnig-b764481b3/