diff options
Diffstat (limited to 'src/draw.h')
| -rw-r--r-- | src/draw.h | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -14,15 +14,28 @@ struct dimensions { int fill_bg(cairo_t *c); +struct RGB { + double r; + double g; + double b; +}; + +struct month_info { + int first_day; + int num_of_days; +}; + +struct RGB hex_to_rgb(char *str); + int draw_text (cairo_t *c, double x, double y, char *font_family, int font_size, char *text); int calculate_dimensions(double pw, double ph, struct dimensions *d); int print_dimensions(struct dimensions *d); -//int draw_month_grid (cairo_t *c, struct dimensions *d); +int draw_month_grid (cairo_t *c, struct month_info *m, struct dimensions *d); -int draw_month (cairo_t *c, cairo_t *cd, cairo_surface_t *s, struct dimensions *d, int days_in_month, int start_day); +int draw_month (cairo_t *c, cairo_t *cd, cairo_surface_t *s, struct month_info *m, struct dimensions *d); int day_of_week (int d, int m, int y); @@ -30,6 +43,4 @@ int draw_month_title(cairo_t *c, struct dimensions *d, char *name); PangoRectangle get_logical_extents (cairo_t *c, char *font_family, int font_size, char *text); -int calculate_minimum_rows(int first_day, int num_of_days, struct dimensions *d); - - +int calculate_minimum_rows(struct month_info *m, struct dimensions *d); |
