Bug 363458 - avoid trying to draw circles or ellipses with radius <= 0.

r+sr=roc
This commit is contained in:
tor%cs.brown.edu 2006-12-11 23:21:01 +00:00
Родитель 0b6a8ca466
Коммит 2569a4e3b7
2 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -153,5 +153,6 @@ nsSVGCircleElement::ConstructPath(cairo_t *aCtx)
GetAnimatedLengthValues(&x, &y, &r, nsnull);
cairo_arc(aCtx, x, y, r, 0, 2*M_PI);
if (r > 0.0f)
cairo_arc(aCtx, x, y, r, 0, 2*M_PI);
}

Просмотреть файл

@ -161,9 +161,11 @@ nsSVGEllipseElement::ConstructPath(cairo_t *aCtx)
GetAnimatedLengthValues(&x, &y, &rx, &ry, nsnull);
cairo_save(aCtx);
cairo_translate(aCtx, x, y);
cairo_scale(aCtx, rx, ry);
cairo_arc(aCtx, 0, 0, 1, 0, 2 * M_PI);
cairo_restore(aCtx);
if (rx > 0.0f && ry > 0.0f) {
cairo_save(aCtx);
cairo_translate(aCtx, x, y);
cairo_scale(aCtx, rx, ry);
cairo_arc(aCtx, 0, 0, 1, 0, 2 * M_PI);
cairo_restore(aCtx);
}
}