зеркало из https://github.com/mozilla/pjs.git
Bug 363458 - avoid trying to draw circles or ellipses with radius <= 0.
r+sr=roc
This commit is contained in:
Родитель
0b6a8ca466
Коммит
2569a4e3b7
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче