mirror of
https://github.com/jtheoof/swappy.git
synced 2024-09-11 14:55:49 +03:00
refactor(render): use pango conversion function
This commit is contained in:
parent
c81d8982ff
commit
0fd82974cf
@ -21,10 +21,10 @@ static void convert_pango_rectangle_to_swappy_box(pango_rectangle_t rectangle,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
box->x = (double)rectangle.x / PANGO_SCALE;
|
box->x = pango_units_to_double(rectangle.x);
|
||||||
box->y = (double)rectangle.y / PANGO_SCALE;
|
box->y = pango_units_to_double(rectangle.y);
|
||||||
box->width = (double)rectangle.width / PANGO_SCALE;
|
box->width = pango_units_to_double(rectangle.width);
|
||||||
box->height = (double)rectangle.height / PANGO_SCALE;
|
box->height = pango_units_to_double(rectangle.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void render_text(cairo_t *cr, struct swappy_paint_text text) {
|
static void render_text(cairo_t *cr, struct swappy_paint_text text) {
|
||||||
|
Loading…
Reference in New Issue
Block a user