USER STORY: As a user, I want to use premade graphics (e.g. wireframe UI elements, network components) which look good and behave properly when resized.
PROBLEM: Custom Shapes (like these:http://lautman.net/mark/coo/index.html) can be defined and contain variables and handles to make them react to resizes or user customization. However, they can have only an outline and a fill color. As far as I am concerned, it is not possible to e.g. define a scrollbar shape, which has a gray background but a orange scroll handle.
ALTERNATIVES: Normal cliparts/ the gallery come to mind, but these shapes/graphics don't have variables nor handles.
Steps to Reproduce:
1. Try to create a custom shape with elements with different fill colors
it is not possible
it is possible
User Profile Reset: No
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
(In reply to jan d from comment #0)
> Steps to Reproduce:
> 1. Try to create a custom shape with elements with different fill colors
This report is about a fairly esoteric subject and that single repro step does not really do justice to the complexity involved.
The creation of custom shapes is described in these articles:
I took a look at Mark Lautman's "GUI Elements and Controls".
The scrollbar is defined like this in the content.xml:
<draw:custom-shape draw:name="Scrollbar" draw:style-name="UIBlack" draw:text-style-name="P1" draw:layer="layout" svg:width="4cm" svg:height="0.6cm" svg:x="10cm" svg:y="12.5cm">
<draw:enhanced-geometry svg:viewBox="0 0 1000 150" draw:type="NonPrimitive" draw:modifiers="870" draw:enhanced-path="M 0 0 L ?f0 0 ?f0 150 0 150 F Z N M 150 0 L 150 150 F Z N M $0 0 L $0 150 F Z N M 40 75 L 100 40 100 110 Z N M ?f1 75 L ?f2 40 ?f2 110 Z N">
<draw:equation draw:name="f0" draw:formula="$0+150"/>
<draw:equation draw:name="f1" draw:formula="$0+100"/>
<draw:equation draw:name="f2" draw:formula="$0+40"/>
<draw:handle draw:handle-position="$0 0" draw:handle-range-x-minimum="150"/>
We can see that all the elements of the shape are drawn in one path definition.
"Z" means "Close subpath by drawing a line to the beginning point of subpath."
"N" means "End subpath".
To use different fill colors for the scrollbar background and buttons, we would have to use separate draw:custom-shape elements. However, the problem appears to be that the handle and equations cannot be shared by different shapes.
Regina: what do you think about this? Wouldn't this involve changing the ODF spec?
Btw. thanks for educating me, Jan: I had no idea this was even possible. The use for GUI elements is really intriguing and I have to show this to the LibreOffice design team.
Thanks for the more ODF-oriented and still easy to understand description of the issue.
> The use for GUI elements is really intriguing
Yes, it is. I use Libre Office Draw at my work as well as draw.io (which is open source, too)
In ODF 1.2 it is not possible. Even the lighten and darken areas you know from shapes in PowerPoint, are not possible in ODF.
https://issues.oasis-open.org/browse/OFFICE-2049 is on the agenda in the TC.
Currently LibreOffice writes additional commands in the path in the own namespace drawooo for lighten and darken. I would prefer, to have a more general solution, which would allow color blending on an individual subpath.
This is a valid enhancement request.