From fabffa3867afc269b8a056179a9675e095e1f3f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Thu, 10 Nov 2005 13:14:24 +0000 Subject: [PATCH] fixes for Stroke and FillPolygon git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14818 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/View.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/View.cpp b/src/kits/interface/View.cpp index 95e2eab216..7c33e4899b 100644 --- a/src/kits/interface/View.cpp +++ b/src/kits/interface/View.cpp @@ -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(polygon->Frame()); fOwner->fLink->Attach(polygon->fCount); fOwner->fLink->Attach(polygon->fPts, polygon->fCount * sizeof(BPoint)); } else {