diff options
| author | foswret | 2026-05-12 19:02:50 -0500 |
|---|---|---|
| committer | foswret | 2026-05-12 19:02:50 -0500 |
| commit | 428216caffe8e04b1959b7171ad2de9ebb540c50 (patch) | |
| tree | 53779af9d004b46314c69ec8d4e428e252e9af20 /src/calp.c | |
| parent | 820a647eb2ad5e1b424acd72a4cf7362cfda2e8a (diff) | |
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
Diffstat (limited to 'src/calp.c')
| -rw-r--r-- | src/calp.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -2,12 +2,14 @@ #include <stdio.h> #include <stdlib.h> +#include <stdbool.h> #include <cairo/cairo-pdf.h> #include <pango/pangocairo.h> #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]); } |
