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

List:       koffice-devel
Subject:    Re: Notes on koffice unit tests
From:       Thomas Zander <zander () kde ! org>
Date:       2007-02-12 0:44:37
Message-ID: 200702120144.37756.zander () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Monday 12 February 2007 00:45, Jaham wrote:
> Don't know what you mean by shapeConnection. You probably mean the shape
> containers?
> Please correct me if i am wrong, but i understand it that only shapes
> without a parent (top level shapes) are painted from the shape manager, all
> child shapes are painted from their parents respectively. That would fix
> the painting of hidden shapes, because painting is done hierarchically.
>
> > If you are interrested in the details; the unit test has more.
>
> Your comments inside the test code say that unclipped shapes should be
> painted by the shape manager, clipped ones from the shapes parent
> container. So uncommenting lines 97,98 in KoShapeContainer.cpp will fix the
> first painting test. But that will not fix the painting of hidden shapes.
> For that case the shape manager has to go up all nesting levels of a
> particular shape to see if the shape is visible or not. My proposal from
> above would solve that already.
>
> What do you think?

Your solution would work, but for one little detail :)

Say, I have a text-shape that is a column of text.
An image is suppost to move when the parent moves, so its a child-shape.
The image is positioned just right of the columns of text.  So its not clipped 
as its suppost to be shown outside the text-shape.

Now; if I call 'repaint' on the image-shape the shapeManager will get a call 
with a cliprect of the image-shape.
The image-shape is never painted by the shapeManager in your solution, only 
its parent.  But the parent does not intersect the cliprect and thus will 
never be painted.

I like your solution better then the current one.
So, if you could perhaps alter the shapeManager to _always_ call the paint if 
the class is a KoShapeContainer that would solve it.
Additionally, adding some code to the KoShapeContainer that honours the 
cliprect would be needed so the children would not be painted if that were 
unneeded.


Hope that makes sense :)

And thanks for looking into this!
-- 
Thomas Zander

[Attachment #5 (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