How to clip the child windows with given rect
Posted: Thu Jun 30, 2011 10:48
Hi, all
I'm making a UI control that kind of like the GridLayoutContainer, but it could make constraints on the width/height of some columns or rows.
When the size of the cell is determined by client's specified value, I wanna clip the child window inside the cell.
My question is how to clip the a child window with the area of the cell it resides in. Or in another word, how to clip children windows with a given Rect?
I don't quite want to change the size of the children windows, by which I will have to remember the original size of them in case of the re-layouting.
Thanks in advance.
I'm making a UI control that kind of like the GridLayoutContainer, but it could make constraints on the width/height of some columns or rows.
When the size of the cell is determined by client's specified value, I wanna clip the child window inside the cell.
My question is how to clip the a child window with the area of the cell it resides in. Or in another word, how to clip children windows with a given Rect?
I don't quite want to change the size of the children windows, by which I will have to remember the original size of them in case of the re-layouting.
Thanks in advance.