fixes for Stroke and FillPolygon

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14818 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2005-11-10 13:14:24 +00:00
parent 97078ce5e6
commit fabffa3867
+3 -2
View File
@@ -2543,7 +2543,7 @@ BView::StrokePolygon(const BPoint *ptArray, int32 numPoints, BRect bounds,
bool closed, ::pattern pattern)
{
if (!ptArray
|| numPoints <= 2
|| numPoints <= 1
|| fOwner == NULL)
return;
@@ -2579,7 +2579,8 @@ BView::FillPolygon(const BPolygon *polygon, ::pattern pattern)
_UpdatePattern(pattern);
if (fOwner->fLink->StartMessage(AS_FILL_POLYGON,
polygon->fCount * sizeof(BPoint) + sizeof(int32)) == B_OK) {
polygon->fCount * sizeof(BPoint) + sizeof(BRect) + sizeof(int32)) == B_OK) {
fOwner->fLink->Attach<BRect>(polygon->Frame());
fOwner->fLink->Attach<int32>(polygon->fCount);
fOwner->fLink->Attach(polygon->fPts, polygon->fCount * sizeof(BPoint));
} else {