[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: koffice/libs/flake/tests
From: Thomas Zander <zander () kde ! org>
Date: 2009-09-24 6:56:35
Message-ID: 200909240856.35808.zander () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Thursday 24. September 2009 06.00.46 Thorsten Zachmann wrote:
> What is the purpose of the if in the zIndex() function.
In flake shapes can have a parent and shapeContainers can have many children.
This means its a hierarchy of shapes. Or a tree, for those more visually
inclined.
The zOrder is used to sort relative to the parent. So you get a tree that
has its leaves sorted.
Moving a leaf from one parent to another will thus affect its effective z-
order, as you would expect. Again, for the visually inclined, if you have 3
shapes that are colored squares, then together they can be grouped to become
one. The group is container of the KoShapeGroup and it holds the 3 children.
It is impossible to sort something inbetween those 3 shapes. So, any shape
that is not also part of the group is either completely above or completely
below the 3 child shapes.
The 'if' has the comment; // we can't be under our parent.
Which illustrates this is the reason for it being there. I don't know if
this is the best solution, but its one that seemed to have worked so far.
If someone makes a patch that effectively removes that line I think we'll
have to do a lot of testing to make sure all code still works according to
the above design.
--
Thomas Zander
["signature.asc" (application/pgp-signature)]
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic