Fix clipping issue at bottom of keyboard

Closes #47.
This commit is contained in:
David Boddie
2019-07-11 23:04:29 +00:00
parent 791e454cb6
commit 8ad0192e55

View File

@ -162,9 +162,14 @@ create_keyboard_surface (EekRenderer *renderer)
&background); &background);
eek_element_get_bounds (EEK_ELEMENT(priv->keyboard), &bounds); eek_element_get_bounds (EEK_ELEMENT(priv->keyboard), &bounds);
keyboard_surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
ceil(bounds.width * priv->scale), /* Create a surface that encompasses the dimensions of the keyboard as well
ceil(bounds.height * priv->scale)); as the margin around the edge. */
keyboard_surface = cairo_image_surface_create (
CAIRO_FORMAT_ARGB32,
ceil(((bounds.x * 2) + bounds.width) * priv->scale),
ceil(((bounds.y * 2) + bounds.height) * priv->scale));
data.cr = cairo_create (keyboard_surface); data.cr = cairo_create (keyboard_surface);
data.renderer = renderer; data.renderer = renderer;