Skip to content

Commit

Permalink
Svg builder: use f64 arcs when approximating with quadratic beziers
Browse files Browse the repository at this point in the history
  • Loading branch information
SkiFire13 authored and nical committed Jul 15, 2024
1 parent 3ac2829 commit 3dc1c5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/path/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,8 @@ impl<Builder: PathBuilder> WithSvg<Builder> {
self.builder.line_to(arc_start, &self.attribute_buffer);
}

arc.for_each_quadratic_bezier(&mut |curve| {
arc.cast::<f64>().for_each_quadratic_bezier(&mut |curve| {
let curve = curve.cast::<f32>();
self.builder
.quadratic_bezier_to(curve.ctrl, curve.to, &self.attribute_buffer);
self.current_position = curve.to;
Expand Down

0 comments on commit 3dc1c5a

Please sign in to comment.