re-add the tick marks

This commit is contained in:
Savanni D'Gerinel 2023-08-09 10:58:23 -04:00
parent 28192ff8d7
commit 6fb7749642
2 changed files with 4 additions and 4 deletions

View File

@ -55,7 +55,7 @@ impl PieChart {
pub fn draw(self, context: &Context) {
println!("drawing: {} {}", self.width, self.height);
let radius = self.width.min(self.height) as f64 / 2. * 0.9;
let radius = self.width.min(self.height) as f64 / 2.;
let center_x = (self.width / 2) as f64;
let center_y = (self.height / 2) as f64;

View File

@ -252,7 +252,7 @@ impl TransitClock {
move |_, context, width, height| {
let center_x = width as f64 / 2.;
let center_y = height as f64 / 2.;
let radius = width.min(height) as f64 / 2.;
let radius = width.min(height) as f64 / 2. * 0.9;
if let Some(ref info) = *s.imp().info.borrow() {
let full_day = Duration::days(1).num_seconds() as f64;
let sunrise = info.sunrise - NaiveTime::from_hms_opt(0, 0, 0).unwrap();
@ -280,8 +280,8 @@ impl TransitClock {
context.set_source_rgb(0., 0., 0.);
context.translate(center_x, center_y);
context.rotate(tick as f64 * (PI / 12.));
context.move_to(center_x, center_y);
context.line_to(center_x + 10., center_y);
context.move_to(radius, 0.);
context.line_to(radius - 10., 0.);
let _ = context.stroke();
context.identity_matrix();
});