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, ...@@ -100,7 +100,7 @@ eek_gtk_keyboard_real_draw (GtkWidget *self,
gtk_widget_get_scale_factor (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; return FALSE;
} }
......
...@@ -194,6 +194,7 @@ render_button_label (cairo_t *cr, ...@@ -194,6 +194,7 @@ render_button_label (cairo_t *cr,
// FIXME: Pass just the active modifiers instead of entire submission // FIXME: Pass just the active modifiers instead of entire submission
void void
eek_renderer_render_keyboard (EekRenderer *self, eek_renderer_render_keyboard (EekRenderer *self,
struct transformation widget_to_layout,
struct submission *submission, struct submission *submission,
cairo_t *cr, cairo_t *cr,
LevelKeyboard *keyboard) LevelKeyboard *keyboard)
...@@ -208,8 +209,8 @@ eek_renderer_render_keyboard (EekRenderer *self, ...@@ -208,8 +209,8 @@ eek_renderer_render_keyboard (EekRenderer *self,
self->allocation_width, self->allocation_height); self->allocation_width, self->allocation_height);
cairo_save(cr); cairo_save(cr);
cairo_translate (cr, self->widget_to_layout.origin_x, self->widget_to_layout.origin_y); cairo_translate (cr, widget_to_layout.origin_x, widget_to_layout.origin_y);
cairo_scale (cr, self->widget_to_layout.scale, self->widget_to_layout.scale); cairo_scale (cr, widget_to_layout.scale, widget_to_layout.scale);
squeek_draw_layout_base_view(keyboard->layout, self, cr); squeek_draw_layout_base_view(keyboard->layout, self, cr);
squeek_layout_draw_all_changed(keyboard->layout, self, cr, submission); 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, ...@@ -64,7 +64,7 @@ cairo_surface_t *eek_renderer_get_icon_surface(const gchar *icon_name,
gint size, gint size,
gint scale); 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); cairo_t *cr, LevelKeyboard *keyboard);
void void
eek_renderer_free (EekRenderer *self); 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