From 924ca70a4006abbffc8f43f27c4f64c8fc517a08 Mon Sep 17 00:00:00 2001 From: foswret Date: Fri, 22 May 2026 11:52:34 -0500 Subject: draw_month_grid() doesn't use dimension struct anymore. create generate extents structs for month, paper, and day --- src/draw.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/draw.h') diff --git a/src/draw.h b/src/draw.h index 9de1ed0..274fd29 100644 --- a/src/draw.h +++ b/src/draw.h @@ -33,6 +33,15 @@ month_info { int minimum_rows; }; +struct +extents { + double x; + double y; + double width; + double height; +}; + + struct RGB hex_to_rgb(char *str); @@ -48,8 +57,11 @@ calculate_dimensions(double pw, double ph, struct dimensions *d); int print_dimensions(struct dimensions *d); +//int +//draw_month_grid(cairo_t *c, struct month_info *m, struct dimensions *d); + int -draw_month_grid(cairo_t *c, struct month_info *m, struct dimensions *d); +draw_month_grid (cairo_t *c, struct month_info *m, struct extents *me, struct extents *de); int draw_month(cairo_t *c, cairo_t *cd, cairo_surface_t *s, struct month_info *m, struct dimensions *d); @@ -64,7 +76,7 @@ PangoRectangle get_logical_extents(cairo_t *c, char *font_family, int font_size, char *text); int -calculate_minimum_rows(struct month_info *m, struct dimensions *d); +calculate_minimum_rows(struct month_info *m); int construct_day_box(cairo_t *cd, int month, int day, int week_day); -- cgit v1.2.3