[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Notes on koffice unit tests
From:       Jan Hambrecht <jaham () gmx ! net>
Date:       2007-02-12 11:20:38
Message-ID: 45D04D86.6090802 () gmx ! net
[Download RAW message or body]

Thomas Zander wrote:
> On Monday 12 February 2007 11:45, Jan Hambrecht wrote:
>> Indeed. For that to work correctly we need a bottom up approach. So the
>> shape manager has to do all the painting.
>> First sort all shapes by z-order, then for each shape it has to go up
>> the nesting hierarchy to check if the shape is visible or clipped. If
>> the shape or one of its parents or grandparents is not visible the shape
>> is not painted.
> Sounds good as well.
> 
>> If the shape is clipped or one of its parents or 
>> grandparents is clipped the shape manager has to compose the resulting
>> cliprect from the top parent to its own direct parent and use that for
>> drawing the shape.
> 
> I'd rather see that be moved to the KoShapeContainer (well, its already 
> there ;)
> So if the shape is clipped; let the container paint it.
> this is a lot cheaper for painting a series of shapes so it doesn't have to 
> compose the cliprect multiple times.
> This makes sense to me since painting of any clipped-child will always need to 
> paint the container as well since that is painted underneath the child.
> 

But as Thorsten points out, that will not follow the z-index rendering 
order. And the clipped shapes parent container can be clipped as well, 
ad infinitum.

For example:

Container
|
--Clipped Container
   |
   --Clipped Container
     |
     --Clipped Shape

You want to draw the clipped shape, see it is clipped, let its parent 
paint the shape. But the parent is clipped as well, so the grandparent 
has to do the painting, ...


_______________________________________________
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