-
-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add image and clipboard paste support via GDClip #115
base: main
Are you sure you want to change the base?
Conversation
Sorry for the delay, but I finally got around to setup CI infrastructure for GDClip. Let me know if there is a change you want me to make. |
1585df4
to
e5bb78d
Compare
9ef9b1d
to
d851173
Compare
I had forgotten to update interaction with (super) EraserTool on ImageStroke. Should be fixed now. |
Quick question: I read "SvgExporter" - is that to actually make it possible to copy-paste strokes from Lorien to, for example, Inkscape? That was a feature I was about to suggest after finishing my keybindings-PR. If it is already done, however, that changes stuff, and will make me super-duper happy, of course :-) |
@MrApplejuice SVG export support is already in v0.5.0 and accessible from hamburger menu -> Export. fad4ea9 just embeds images in the svg file. |
Ah thanks, for clarification! Maybe I will propose a copy-pasta in SVG format later then. I would find it super-handy to be able to easily exchange stuff among different types of vector-graphics editors. I find Lorien way more convenient for "quick doodles" but then sometimes the doodles outgrow Lorien and I need to go to something more advanced. The indirect way of Export is a bit cumerbsome for fast progress. That said: Nice PR. Pasting images will make the sketching-process a lot easier again! :-) |
fad4ea9
to
e602df4
Compare
This commit introduces image support via ImageStroke and image-paste support via GDClip GDNative library. ImageStroke extends Sprite to track visibility of images and to cooperate with SelectionTool. All SelectionTool features are supported (including selection, movement, copy, paste, duplication, and deletion), but note that SelectionTool copy does not copy to clipboard. Save/load feature supports images as well, but the new save format will not be compatible with prior versions of Lorien without image support. Note: Images are compressed to reduce file size and improve save/load times. SvgExporter will export images as base64-encoded PNGs
e602df4
to
46429cf
Compare
Latest changes include moving paste action to a new thread so that main thread is not blocked. |
This pull request introduces image support and partial clipboard support to resolve the main objective of #100. Image resizing or transform is not yet supported.
Notable changes:
Additional Tasks:
Disable image paste feature if gdclip library cannot be foundPre-Release builds can be found here: https://github.com/hansemro/Lorien/releases