* just realized a bug already when reading over the commit log...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21666 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -82,6 +82,8 @@ class BRegion {
|
|||||||
|
|
||||||
clipping_rect _Convert(const BRect& rect) const;
|
clipping_rect _Convert(const BRect& rect) const;
|
||||||
clipping_rect _ConvertToInternal(const BRect& rect) const;
|
clipping_rect _ConvertToInternal(const BRect& rect) const;
|
||||||
|
clipping_rect _ConvertToInternal(
|
||||||
|
const clipping_rect& rect) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
long fCount;
|
long fCount;
|
||||||
|
|||||||
@@ -307,10 +307,12 @@ BDirectWindow::GetClippingRegion(BRegion *region, BPoint *origin) const
|
|||||||
UnlockDirect();
|
UnlockDirect();
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
}
|
}
|
||||||
region->fCount = fBufferDesc->clip_list_count;
|
region->fCount = fBufferDesc->clip_list_count;
|
||||||
region->fBounds = fBufferDesc->clip_bounds;
|
region->fBounds = region->_ConvertToInternal(fBufferDesc->clip_bounds);
|
||||||
for (uint32 c = 0; c < fBufferDesc->clip_list_count; c++)
|
for (uint32 c = 0; c < fBufferDesc->clip_list_count; c++) {
|
||||||
region->fData[c] = fBufferDesc->clip_list[c];
|
region->fData[c] = region->_ConvertToInternal(
|
||||||
|
fBufferDesc->clip_list[c]);
|
||||||
|
}
|
||||||
|
|
||||||
// adjust bounds by the given origin point
|
// adjust bounds by the given origin point
|
||||||
region->OffsetBy(-originX, -originY);
|
region->OffsetBy(-originX, -originY);
|
||||||
|
|||||||
@@ -502,3 +502,11 @@ BRegion::_ConvertToInternal(const BRect& rect) const
|
|||||||
(int)ceilf(rect.right) + 1, (int)ceilf(rect.bottom) + 1 };
|
(int)ceilf(rect.right) + 1, (int)ceilf(rect.bottom) + 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
clipping_rect
|
||||||
|
BRegion::_ConvertToInternal(const clipping_rect& rect) const
|
||||||
|
{
|
||||||
|
return (clipping_rect){ rect.left, rect.top,
|
||||||
|
rect.right + 1, rect.bottom + 1 };
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user