USER STORY: As an advanced user, I want to create custom shapes shapes to efficiently create drawings (and/or share them with others)
CURRENT BEHAVIOR: Creation of custom shapes demands to
1. unzip an odg
2. edit the content.xml
3. zip odg.
4. open the odg
For getting feedback on each change. This is rather tedious, in particular when learning to create shapes and or if minor visual adjustments are needed.
Although custom shapes will only be created by a fraction of users, they can be used by many and can strengthen the ecosystem (some drawing/diagramming applications do have many useful libraries to use for special usecases, e.g. electronics, planning networks or UI wireframing)
POSSIBLE IMPROVED BEHAVIOR:
* One could expose the content.xml source and allow this to be edited, much like an HTML can be edited in Browser’s dev tools
* Make reloading a file easier (to get around closing Draw, reopening)
* Make accessing the content.xml easier (to get around the zip/unzip part)
Since it will only make sense for some users, these functions could be enabled via some sort of dev-mode or an extension.
Did you try to use the Gallery ? You can add your own objects, e.g in SVG format, in the Gallery and create an extension to make it available to others.
Best regards. JBF
Thanks for your advice. I was probably not specific enough; with "custom shapes" I was referring to shapes that use formulas, handles etc. so the properties you can't create (as far as I am concerned) in the GUI.
I adjusted the title to be more descriptive.
Please, could describe some example?
Best regards. JBF
> Please, could describe some example?
Sure. So build-in shapes of that kind are most of the block arrows: They use a (yellow) handle to allow adjustment of the arrow shape. Internally, they use code like:
<draw:handle draw:handle-position="$0 $1" draw:handle-range-x-minimum="0" …
… draw:enhanced-path="M 21600 ?f0 L ?f1 ?f0 …
to allow that.
Such custom shapes can also be created by users, like these: http://lautman.net/mark/coo/index.html
see, for example, the GUI elements in http://lautman.net/mark/coo/GUI_Elements.odg
There is a shape named "progress bar" which progress bar length can be adjusted via a yellow handle. This is very useful, since without that one would need to move these manually after entering the group etc.
All the custom handles and behavior needed to be calculated (to find the right points) and written by hand using the unzip/edit/zip/reopen workflow.
…Does the example help in understanding this better?
That's definitely needed. Either as code editor or by some visual means.
(In reply to Heiko Tietze from comment #6)
> That's definitely needed. Either as code editor or by some visual means.
I'd love to be able to do this visually. But as an easy and very helpful fix, I think a code editor already helps *a lot*. I can imagine that browser based dev tools might provide some useful patterns of interaction.
related: "More shapes for LibreOffice draw are needed" https://bugs.documentfoundation.org/show_bug.cgi?id=87892
Related: "Custom Shapes, how to print variable value or show variable value to debug" https://bugs.documentfoundation.org/show_bug.cgi?id=106101
Adding my vote for easier custom shape creation. Users should be able to draw the shape then select and drag it to a gallery (e.g. "My Shapes"). Coming from Visio, I was surprised that Draw had no straight forward way to create user defined shapes.
(In reply to jan d from comment #0)
> USER STORY: As an advanced user, I want to create custom shapes shapes to
> efficiently create drawings (and/or share them with others)
> CURRENT BEHAVIOR: Creation of custom shapes demands to
> 1. unzip an odg
> 2. edit the content.xml
> 3. zip odg.
> 4. open the odg
You can use the flat file format fodg, then unzip and zip are not needed.
Even with odg-format you need not really unzip, but modern packer allow to enter the package. Then edit the content.xml and close the editor. The packer ask you to update the package.
I have collected some ways to work on https://wiki.documentfoundation.org/Documentation/ODF_Markup
But I agree an editor, that can be uses with a shape, that currently rendered would be good. LO has the "Edit Points" tool for Bézier curves, but custom shapes have no tool add all.