More and more users create SVG pictures to be used in HTML5 animations, or to replace classic linear presentation applications (like PREZI, but on SOZI with HTML5 compliance).
We have to create multilayer SVG pictures to manage animation.
But even if we create different layers in Draw, there are no more layers when it is exported to SVG format.
(We still have to use Inkscape which provides real multilayers SVG pictures)
Which w3.org standard svg elements provides "layers"?
In ODF, "The animation elements are based upon §3.5 and §12.5 of [SMIL20], and section §19.2 of [SVG]."
For details see section "15 SMIL Animations" in http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html
Can you please provide a standard conform svg document using "layers"? Inkscape "svg" <> standard svg.
Draw does not have animation and Impress has no layers. It is not clear, what do you mean.
Standard SVG does not implement specific "layers" but groups with <g>, and layers can be seen as groups.
I don't want to integrate animation in the SVG file, but to distinguish layers (groups) in order to animate then with a HTML5 page.
Inkscape can find his layers while opening his SVG files by :
DRAW could do the same :
Then, an application could detect these layers an create some animations by hiding, showing, moving groups, like SOZI does :
To me it looks like your request is not about "layers" but about groups.
I think, introducing an own namespace should not be done; svg is rich enough to do all needed things in standard svg. Namespace "draw" would be a bad choice anyway, because it can be confused with ODF.
Currently neither a page nor a group gets an identifier but only the individual shapes. I would support a request, that svg export should make the name of a group to an id-attribute of the <g>-element in svg. Such could be used in Impress too, where no user layers exists.
It would be possible to put the layer into a class attribute, but it does not work well, because a group in Draw can contain shapes from different layers. Therefore the layer-information would only be meaningful for a single shape, but not for a group.
Do you agree to take this bug report as request for an id-attribute for the <g>-element, which is generated for a group in Draw? If yes, the subject line should be changed accordingly.
Created attachment 120492 [details]
Draw file with 4 objects, and 1 custom layer
(In reply to Regina Henschel from comment #3)
> To me it looks like your request is not about "layers" but about groups.
Yes. The Draw layers have to be exported as groups.
> an own namespace should not be done
> Currently neither a page nor a group gets an identifier but only the
> individual shapes. I would support a request, that svg export should make
> the name of a group to an id-attribute of the <g>-element in svg. Such could
> be used in Impress too, where no user layers exists.
> It would be possible to put the layer into a class attribute, but it does
> not work well, because a group in Draw can contain shapes from different
Oh ! I didn't know. OK.
> Do you agree to take this bug report as request for an id-attribute for the
> <g>-element, which is generated for a group in Draw? If yes, the subject
> line should be changed accordingly.
In a first step, yes.
Is it enough to define "layers" ? Layers could be defined by :
- a SVG goup (OK)
- with an id (OK with the new request)
- and that is *a direct child of the root SVG element*.
In the current SVG export, you can find the first SVG Child group as :
<g id="id2" class="Master_Slide">
<g id="bg-id2" class="Background"/>
<g id="bo-id2" class="BackgroundObjects"/>
What is it for ?
And then the next (and last) SVG child group with the SlideGroup class as :
<g id="id1" class="Slide" clip-path="url(#presentation_clip_path)">
Is there always only ONE SlideGroup ?
Could the layers objects be separated in different SlideGroups with their own ID ?
You can have a look to an article about how Adobe Illustrator exports its layers :
(At the bottom of the page)
The description of the request is detailed enough now, therefore I set it to new. At least using the id attribute of the <g>-element in svg would be a useful enhancement.
I have no answer to your other questions.
(In reply to Regina Henschel from comment #7)
> The description of the request is detailed enough now, therefore I set it to
> new. At least using the id attribute of the <g>-element in svg would be a
> useful enhancement.
> I have no answer to your other questions.
I hope ID-ed groups (= layers) will be direct children of SVG element.
After working more on layers I think, my first idea to use the <g> element is not good. In Draw groups and layers are orthogonally to each others, because it is possible, that the elements in a group belong to different layers. You can group a shape together with a measure line, for example. Therefore I'll remove "group" from the subject.
But I have a different idea. The purpose of layers is only to have the properties "visible", "printable" and "locked". You can define css rules for each layer and use the class attributes on the elements.
*** Bug 144848 has been marked as a duplicate of this bug. ***