mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
canvas: Do not draw arc/ellipse with small sweep (#37630)
While raqote does already passes this test, but small line is still visible and this PR will fix this. Vello will not work correctly without this.  Testing: `/html/canvas/element/path-objects/2d.path.arc.twopie.1.html` --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
parent
9543482f51
commit
e0af75f265
1 changed files with 4 additions and 0 deletions
|
@ -200,6 +200,10 @@ pub(crate) trait GenericPathBuilder<B: Backend> {
|
|||
|
||||
self.line_to(arc.from());
|
||||
|
||||
if sweep.radians.abs() < 1e-3 {
|
||||
return;
|
||||
}
|
||||
|
||||
arc.for_each_quadratic_bezier(&mut |q| {
|
||||
self.quadratic_curve_to(&q.ctrl, &q.to);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue