cssshadowvalue: Apply device scale to the offset when blurring text
Although the surface already has the device scale set, that doesn't apply to the offset which is in raw device units. So we need to scale the device offset explicitly. Fixes: https://gitlab.com/rastersoft/desktop-icons-ng/-/issues/119
This commit is contained in:
@ -485,7 +485,9 @@ make_blurred_pango_surface (cairo_t *existing_cr,
|
||||
x_scale * (ink_rect.width + 2 * clip_radius),
|
||||
y_scale * (ink_rect.height + 2 * clip_radius));
|
||||
cairo_surface_set_device_scale (surface, x_scale, y_scale);
|
||||
cairo_surface_set_device_offset (surface, -ink_rect.x + clip_radius, -ink_rect.y + clip_radius);
|
||||
cairo_surface_set_device_offset (surface,
|
||||
x_scale * (-ink_rect.x + clip_radius),
|
||||
y_scale * (-ink_rect.y + clip_radius));
|
||||
cr = cairo_create (surface);
|
||||
cairo_move_to (cr, 0, 0);
|
||||
_gtk_pango_fill_layout (cr, layout);
|
||||
|
Reference in New Issue
Block a user