z-index absolute or relative to containing group?

Friedrich W. H. Kossebau kossebau at kde.org
Fri Mar 16 22:19:53 GMT 2012


Hi,

see $subject, is the z-index of items absolute or relative to the containing 
group?

I could not find anything relevant on the webs. Has this been discussed 
before? If not, were could this be discussed?

All I found in the OpenDocument 1.2 spec is this, but it does not talk about 
this problem:
--- 8< ---
19.231 draw:z-index

The draw:z-index attribute defines a rendering order for shapes in a document 
instance. Shapes are rendered in the order in which they appear in the 
document in the absence of this attribute.
--- 8< ---

Calligra seems to do the z-index hierarchically, i.e. each group does the z-
index internally, then places the whole group into the global order by the z-
index of the group, recursively. LibreOffice Draw seems to do the same.

So is this behaviour as implemented actually complementing the spec and 
defining what is correct?

Reason is that xfig only uses the z-index (depth in xfig terms) for real 
objects, but not for compound objects. So single objects in different 
compounds can be intertwined in the z-order.

And the more I think about it having this option to intertwin elements of 
different compounds in the z-order makes more sense than to automatically 
group them also in the z-order, which limits what is possible.
After all that is what layers are for, or can be used for, to subgroup objects 
in the z-order, no?

Usecase I think of are e.g. predefined composed elements from a gallery which 
get set together: like placing a tool under the arm of a person, between body 
and arm, where the tool and the person vector images are from a gallery. Would 
be nice to keep both compositions, but being able to layer the tool image 
intertwined with the person compound.

And 10.3.15 does not mention this property of draw:g as well. Hm, too bad, 
just see that draw:g has also a property draw:z-index, which only makes sense 
if groups are kind of a sublayer :( Bah.

Cheers
Friedrich



More information about the calligra-devel mailing list