diff options
| author | foswret | 2026-05-05 12:19:15 -0500 |
|---|---|---|
| committer | foswret | 2026-05-05 12:19:15 -0500 |
| commit | f0c9538a77c942ac96aebe52319f3e127be230ee (patch) | |
| tree | 783dbdb76eeb1a39eb335a3fb2c2cb6d0bc9313e /src/calp.c | |
| parent | 567b98381670eb96264fb8ae3621595ebfba1c5b (diff) | |
implement sloppy month art rendering, positioning mechanisms must be improved
Diffstat (limited to 'src/calp.c')
| -rw-r--r-- | src/calp.c | 22 |
1 files changed, 10 insertions, 12 deletions
@@ -35,9 +35,6 @@ int main (void) { int num_of_months = 12; extern int days_in_month[12]; - // TBD: Add ability to choose filename - char *filename; - filename = "output.pdf"; // Create dimensions struct to hold measurements struct dimensions dim; @@ -55,6 +52,10 @@ int main (void) { } + // TBD: Add ability to choose filename + char filename[20]; + snprintf(filename, sizeof(filename), "%d.pdf", year); + //filename = "output.pdf"; // Initialization // -------------- @@ -83,16 +84,8 @@ int main (void) { // Construction // ------------ // Print dimensions, for debugging - //print_dimensions(&dim); - - // Draw all months - //struct RGB color; + print_dimensions(&dim); - //color = hex_to_rgb("81bbd3"); - - //printf("red: %f\n", color.r); - //printf("green: %f\n", color.g); - //printf("blue: %f\n", color.b); // Range of months to be rendered (Default: Full calendar year, 12 months) int first_month = 0; @@ -111,6 +104,11 @@ int main (void) { set_color(paper, BLACK); draw_month_title(paper, &dim, months[i]); + char path[20]; + + snprintf(path, 20, "assets/%d.png", i + 1); + + draw_month_art(paper, &dim, path); draw_month(paper, cd, day, &month, &dim); draw_month_grid(paper, &month, &dim); |
