Implement additional methods in path::Builder

This commit is contained in:
Héctor Ramón Jiménez 2020-02-14 02:23:41 +01:00
parent df90c478e2
commit 76df374624
2 changed files with 76 additions and 18 deletions

View file

@ -94,14 +94,7 @@ impl canvas::layer::Drawable for LocalTime {
let radius = frame.width().min(frame.height()) / 2.0;
let offset = Vector::new(center.x, center.y);
let clock = canvas::Path::new(|path| {
path.arc(canvas::path::Arc {
center,
radius,
start_angle: 0.0,
end_angle: 2.0 * std::f32::consts::PI,
})
});
let clock = canvas::Path::new(|path| path.circle(center, radius));
frame.fill(
&clock,