maoschanz / drawing

Simple image editor for Linux
https://maoschanz.github.io/drawing/
GNU General Public License v3.0
783 stars 100 forks source link

Support SVG Format #122

Open AymenStudios opened 4 years ago

AymenStudios commented 4 years ago

Problem

Suggested solution

Possible drawbacks

Possible alternatives

maoschanz commented 4 years ago

(A not-described solution fixing a non-existent problem, with no drawbacks or alternatives? 🤔)

I think everything related to shapes/pencil/text/line could be exported as SVG (example of SVG export with the same underlying library), but the other tools (cropping, scaling, blurring, saturation, and selection) are manipulating some GdkPixbuf.Pixbuf objects, which are raster graphics data structures. It's actually a very common format within GNOME technologies, and it's used for copying and pasting, it's also how the app loads files, how it saves files, how it export files, etc.

So i don't know what to do, i'll let that opened, but implementing this would require rewriting 60% of the entire app so you shouldn't expect any progress for like 1 or 2 years lol

YalandHong commented 4 years ago

If Drawing is designed to be "a simple drawing application similar to MS Paint", then supporting SVG is not really important. There're lots of developed and well-known apps on Linux for editing vector graphics.

I still want Drawing to keep its simplicity.

maoschanz commented 4 years ago

FYI there are various intermediate steps between not understanding SVG at all and being an SVG editor: creating a classic raster image by importing an SVG file for example. And even a full SVG files editing and saving support wouldn't change the ergonomics of the app.

Anyway my answer was:

So i don't know what to do, i'll let that opened, but implementing this would require rewriting 60% of the entire app so you shouldn't expect any progress for like 1 or 2 years lol

maoschanz commented 1 year ago

creating a classic raster image by importing an SVG file for example

well, this already works

i haven't done anything

any other svg support is out of scope

pedropaulosuzuki commented 2 months ago
* [ ]  add SVG to the "open" and "import" dialogs' file filters

654 should take care of that. I personally didn't test if importing an SVG file creates a raster correctly, but I'm trusting you on that one.

pedropaulosuzuki commented 2 months ago

I think everything related to shapes/pencil/text/line could be exported as SVG (example of SVG export with the same underlying library), but the other tools (cropping, scaling, blurring, saturation, and selection) are manipulating some GdkPixbuf.Pixbuf objects, which are raster graphics data structures.

For cropping and scaling we could change the shape/line/text coordinates and/or size directly. Saturation we could change the object color directly or something. Not sure about blur tho.