z-index absolute or relative to containing group?
C. Boemann
cbo at boemann.dk
Fri Mar 16 22:27:04 GMT 2012
On Friday 16 March 2012 23:19:53 Friedrich W. H. Kossebau wrote:
> 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
> _______________________________________________
> calligra-devel mailing list
> calligra-devel at kde.org
> https://mail.kde.org/mailman/listinfo/calligra-devel
Hi
Yes calligra generally does as you say. I know because i recently implemented
the other way, because textshapes needs that (not really related to set order
just an implementation detail). I had the same thoughts you had but thorsten
told me calligra is right.
so I let him explain when he wakes up in 6-7 hours
More information about the calligra-devel
mailing list