fixed the clipping bug I was talking in my previous checkin.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12898 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Binary file not shown.
@@ -501,6 +501,7 @@ void Layer::rebuild_visible_regions(const BRegion &invalid,
|
||||
// intersect maximum wanted region with the invalid region
|
||||
BRegion common;
|
||||
set_user_regions(common);
|
||||
|
||||
common.IntersectWith(&invalid);
|
||||
// if the resulted region is not valid, this layer is not in the catchment area
|
||||
// of the region being invalidated
|
||||
@@ -514,6 +515,11 @@ void Layer::rebuild_visible_regions(const BRegion &invalid,
|
||||
{
|
||||
// we have something to include to our fullVisible. It may already be in
|
||||
// there, but we'll never know.
|
||||
|
||||
// TODO: further analyze the next 2 lines.
|
||||
fFullVisible.Exclude(&invalid);
|
||||
fVisible.Exclude(&invalid);
|
||||
|
||||
fFullVisible.Include(&common);
|
||||
}
|
||||
else
|
||||
@@ -585,6 +591,8 @@ void Layer::clear_visible_regions()
|
||||
void Layer::PrintToStream() const
|
||||
{
|
||||
printf("-> %s\n", fName);
|
||||
fVisible.PrintToStream();
|
||||
fFullVisible.PrintToStream();
|
||||
for (Layer *child = VirtualBottomChild(); child;
|
||||
child = VirtualUpperSibling())
|
||||
child->PrintToStream();
|
||||
|
||||
@@ -118,7 +118,7 @@ void clsMainWindow::test1()
|
||||
c.red = rand()/256;
|
||||
c.green = rand()/256;
|
||||
c.blue = rand()/256;
|
||||
Layer *lay12 = new Layer(BRect(170,20,290,150), "lay21",
|
||||
Layer *lay12 = new Layer(BRect(170,20,290,150), "lay12",
|
||||
B_FOLLOW_NONE,
|
||||
B_FULL_UPDATE_ON_RESIZE, c);
|
||||
lay1->AddLayer(lay12);
|
||||
@@ -126,7 +126,7 @@ void clsMainWindow::test1()
|
||||
c.red = rand()/256;
|
||||
c.green = rand()/256;
|
||||
c.blue = rand()/256;
|
||||
Layer *lay13 = new Layer(BRect(20,20,100,100), "lay31",
|
||||
Layer *lay13 = new Layer(BRect(20,20,100,100), "lay13",
|
||||
B_FOLLOW_LEFT | B_FOLLOW_BOTTOM,
|
||||
0, c);
|
||||
lay12->AddLayer(lay13);
|
||||
|
||||
Reference in New Issue
Block a user