As Stephan pointed out, I accidently misread the previous max_c() construct.
Apparently, there was an integer overflow of some kind with BePYRO, but this version if safe as well, and should look much better. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17716 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -856,10 +856,11 @@ Painter::DrawEllipse(BRect r, bool fill) const
|
||||
BPoint center(r.left + xRadius, r.top + yRadius);
|
||||
|
||||
int32 divisions = (int32)((xRadius + yRadius + 2 * fPenSize) * PI / 2);
|
||||
if (divisions > 12)
|
||||
if (divisions < 12)
|
||||
divisions = 12;
|
||||
if (divisions < 1)
|
||||
divisions = 1;
|
||||
// TODO: arbitrarily set upper limit - should be tested...
|
||||
if (divisions > 32768)
|
||||
divisions = 32768;
|
||||
|
||||
if (fill) {
|
||||
agg::ellipse path(center.x, center.y, xRadius, yRadius, divisions);
|
||||
|
||||
Reference in New Issue
Block a user