From 428216caffe8e04b1959b7171ad2de9ebb540c50 Mon Sep 17 00:00:00 2001 From: foswret Date: Tue, 12 May 2026 19:02:50 -0500 Subject: switch from pkg-config to pkgconf, pull in MagickWand library, move image-related functions to image.h, create resize_image(), get_image_width() and get_image_height --- src/calp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/calp.c') diff --git a/src/calp.c b/src/calp.c index 2d155cc..3f81aff 100644 --- a/src/calp.c +++ b/src/calp.c @@ -2,12 +2,14 @@ #include #include +#include #include #include #include "draw.h" #include "date.h" #include "color.h" +#include "image.h" // Metric #define A4_WIDTH 210 @@ -51,7 +53,7 @@ int main (void) { days_in_month[1]++; } - int verbose_output = 1; + int verbose_output = 0; // TBD: Add ability to choose filename @@ -109,7 +111,6 @@ int main (void) { month.num_of_days = days_in_month[i]; month.month_position = i; month.minimum_rows = calculate_minimum_rows(&month, &dim); - printf("month.minimum_rows: %d\n", month.minimum_rows); dim.header_width = dim.paper_width - (dim.margin * 2.0); dim.header_height = dim.paper_height - (dim.margin * 3.0) - (month.minimum_rows * dim.day_height); @@ -123,13 +124,12 @@ int main (void) { set_color(ch, BLACK); draw_month_title(ch, &dim, "Sans", 40, months[i]); - printf("header width: %f\n", dim.header_width); - printf("header height: %f\n", dim.header_height); - char path[20]; snprintf(path, 20, "assets/%d.png", i + 1); + prepare_month_art(path, &dim); + if (verbose_output) { printf("Drawing month \'%s\'\n", months[i]); } -- cgit v1.2.3