Simplify "blank background" code.

This commit is contained in:
Daiki Ueno
2011-03-08 06:04:41 +09:00
parent d8e691d3f5
commit 163e005561
2 changed files with 3 additions and 19 deletions

View File

@ -138,12 +138,7 @@ eek_gtk_keyboard_real_draw (GtkWidget *self,
background.green, background.green,
background.blue, background.blue,
background.alpha); background.alpha);
cairo_rectangle (cr, cairo_paint (cr);
0.0,
0.0,
allocation.width,
allocation.height);
cairo_fill (cr);
eek_renderer_render_keyboard (priv->renderer, cr); eek_renderer_render_keyboard (priv->renderer, cr);

View File

@ -177,12 +177,7 @@ create_keyboard_surface (EekRenderer *renderer)
background.green, background.green,
background.blue, background.blue,
background.alpha); background.alpha);
cairo_rectangle (data.cr, cairo_paint (data.cr);
0.0,
0.0,
cairo_image_surface_get_width (keyboard_surface),
cairo_image_surface_get_height (keyboard_surface));
cairo_fill (data.cr);
cairo_set_source_rgba (data.cr, cairo_set_source_rgba (data.cr,
foreground.red, foreground.red,
@ -464,14 +459,8 @@ render_key (EekRenderer *self,
cr = cairo_create (outline_surface); cr = cairo_create (outline_surface);
/* blank background */ /* blank background */
eek_element_get_bounds (EEK_ELEMENT(key), &bounds);
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.0); cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.0);
cairo_rectangle (cr, cairo_paint (cr);
0.0,
0.0,
bounds.width * priv->scale,
bounds.height * priv->scale);
cairo_fill (cr);
eek_renderer_render_key_outline (self, cr, key, 1.0, 0); eek_renderer_render_key_outline (self, cr, key, 1.0, 0);
cairo_destroy (cr); cairo_destroy (cr);