From 820a647eb2ad5e1b424acd72a4cf7362cfda2e8a Mon Sep 17 00:00:00 2001 From: foswret Date: Fri, 8 May 2026 22:20:02 -0500 Subject: Shrink default month-grid size, render month art comfortably --- src/draw.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/draw.h') diff --git a/src/draw.h b/src/draw.h index 5955e1e..40ca609 100644 --- a/src/draw.h +++ b/src/draw.h @@ -10,6 +10,8 @@ struct dimensions { double day_width; /* day box width */ double day_height; /* day box height */ double margin; /* margin */ + double header_width; + double header_height; }; int fill_bg(cairo_t *c); @@ -21,8 +23,10 @@ struct RGB { }; struct month_info { + int month_position; int first_day; int num_of_days; + int minimum_rows; }; struct RGB hex_to_rgb(char *str); @@ -41,7 +45,7 @@ int draw_month (cairo_t *c, cairo_t *cd, cairo_surface_t *s, struct month_info * int day_of_week (int d, int m, int y); -int draw_month_title(cairo_t *c, struct dimensions *d, char *name); +int draw_month_title(cairo_t *c, struct dimensions *d, char *font_family, int font_size, char *name); PangoRectangle get_logical_extents (cairo_t *c, char *font_family, int font_size, char *text); @@ -51,4 +55,4 @@ int draw_image(cairo_t *c, char *path, double x, double y); int draw_month_art(cairo_t *c, struct dimensions *d, char *path); - +int construct_day_box(cairo_t *cd, int month, int day, int week_day); -- cgit v1.2.3