fixed a bug with drawing ellipses and invalidating the correct area for stroking paths, taking the stroke width into account

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12483 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2005-04-27 23:17:39 +00:00
parent dd55678524
commit 50581a7c0a
2 changed files with 7 additions and 3 deletions

View File

@ -391,7 +391,7 @@ DisplayDriverPainter::FillEllipse(const BRect &r, const DrawData *d)
fPainter->SetDrawData(d);
float xRadius = r.Width() / 2.0;
float yRadius = r.Width() / 2.0;
float yRadius = r.Height() / 2.0;
BPoint center(r.left + xRadius,
r.top + yRadius);
@ -567,7 +567,7 @@ DisplayDriverPainter::StrokeEllipse(const BRect &r, const DrawData *d)
fPainter->SetDrawData(d);
float xRadius = r.Width() / 2.0;
float yRadius = r.Width() / 2.0;
float yRadius = r.Height() / 2.0;
BPoint center(r.left + xRadius,
r.top + yRadius);

View File

@ -1379,7 +1379,11 @@ Painter::_StrokePath(VertexSource& path) const
fOutlineRasterizer->add_path(path);
#endif
return _Clipped(_BoundingBox(path));
BRect touched = _BoundingBox(path);
float penSize = ceilf(fPenSize);
touched.InsetBy(-penSize, -penSize);
return _Clipped(touched);
}
// _FillPath