Merge pull request #2959 from karolisr/feature/cast_arc_to_f64_before_drawing
Avoids artifacts when drawing small arcs by casting `f32` to `f64`.
This commit is contained in:
commit
ac511f5f68
1 changed files with 2 additions and 1 deletions
|
|
@ -115,7 +115,8 @@ impl Builder {
|
||||||
|
|
||||||
let _ = self.raw.move_to(arc.sample(0.0));
|
let _ = self.raw.move_to(arc.sample(0.0));
|
||||||
|
|
||||||
arc.for_each_quadratic_bezier(&mut |curve| {
|
arc.cast::<f64>().for_each_quadratic_bezier(&mut |curve| {
|
||||||
|
let curve = curve.cast::<f32>();
|
||||||
let _ = self.raw.quadratic_bezier_to(curve.ctrl, curve.to);
|
let _ = self.raw.quadratic_bezier_to(curve.ctrl, curve.to);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue