Viewport and get visible rect in child component


#1

Hi Jules,

 

Is there a way to get the visible portion of a component in a viewport in the child component wirthout

asking for the viewport ?

The widget doesn't know it is a viewport

 

Right now I'm using the getClipBounds of the Graphics but it could be smaller in case of a partial redraw.

 

Thanks,


#2

You could convert the bounds of the child component into the parent's coord space, and then clip it to the parent's bounds? Doing that operation recursively would be a more general way of getting the visible area.


#3

Good idea.

Thanks !