Refactor text rendering

This commit is contained in:
o9000
2017-06-05 15:20:16 +02:00
parent b50f5ecf3e
commit 59c3761455
5 changed files with 292 additions and 159 deletions

View File

@@ -263,6 +263,39 @@ int relayout_with_constraint(Area *a, int maximum_size);
int compute_desired_size(Area *a);
int container_compute_desired_size(Area *a);
void area_compute_text_geometry(Area *area,
const char *line1,
const char *line2,
PangoFontDescription *line1_font_desc,
PangoFontDescription *line2_font_desc,
int *line1_height_ink,
int *line1_height,
int *line1_width,
int *line2_height_ink,
int *line2_height,
int *line2_width);
int text_area_compute_desired_size(Area *area,
const char *line1,
const char *line2,
PangoFontDescription *line1_font_desc,
PangoFontDescription *line2_font_desc);
gboolean resize_text_area(Area *area,
const char *line1,
const char *line2,
PangoFontDescription *line1_font_desc,
PangoFontDescription *line2_font_desc,
int *line1_posy,
int *line2_posy);
void draw_text_area(Area *area,
cairo_t *c,
const char *line1,
const char *line2,
PangoFontDescription *line1_font_desc,
PangoFontDescription *line2_font_desc,
int line1_posy,
int line2_posy,
Color *color);
int left_border_width(Area *a);
int right_border_width(Area *a);
int left_right_border_width(Area *a);