Commit 46f8790f authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz
Browse files

renderer: Reduce reliance on knowing the transform

parent 3cdced0c
......@@ -100,7 +100,7 @@ eek_gtk_keyboard_real_draw (GtkWidget *self,
gtk_widget_get_scale_factor (self));
}
eek_renderer_render_keyboard (priv->renderer, priv->submission, cr, priv->keyboard);
eek_renderer_render_keyboard (priv->renderer, priv->renderer->widget_to_layout, priv->submission, cr, priv->keyboard);
return FALSE;
}
......
......@@ -194,6 +194,7 @@ render_button_label (cairo_t *cr,
// FIXME: Pass just the active modifiers instead of entire submission
void
eek_renderer_render_keyboard (EekRenderer *self,
struct transformation widget_to_layout,
struct submission *submission,
cairo_t *cr,
LevelKeyboard *keyboard)
......@@ -208,8 +209,8 @@ eek_renderer_render_keyboard (EekRenderer *self,
self->allocation_width, self->allocation_height);
cairo_save(cr);
cairo_translate (cr, self->widget_to_layout.origin_x, self->widget_to_layout.origin_y);
cairo_scale (cr, self->widget_to_layout.scale, self->widget_to_layout.scale);
cairo_translate (cr, widget_to_layout.origin_x, widget_to_layout.origin_y);
cairo_scale (cr, widget_to_layout.scale, widget_to_layout.scale);
squeek_draw_layout_base_view(keyboard->layout, self, cr);
squeek_layout_draw_all_changed(keyboard->layout, self, cr, submission);
......
......@@ -64,7 +64,7 @@ cairo_surface_t *eek_renderer_get_icon_surface(const gchar *icon_name,
gint size,
gint scale);
void eek_renderer_render_keyboard (EekRenderer *renderer, struct submission *submission,
void eek_renderer_render_keyboard (EekRenderer *renderer, struct transformation widget_to_layout, struct submission *submission,
cairo_t *cr, LevelKeyboard *keyboard);
void
eek_renderer_free (EekRenderer *self);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment