[gtk+/wip/blur: 7/8] shadow: add blur to icon-shadow (spinner)
- From: Andrea Cimitan <acimitan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/blur: 7/8] shadow: add blur to icon-shadow (spinner)
- Date: Wed, 18 Apr 2012 15:03:50 +0000 (UTC)
commit 654553cc706d6e21e7e2b631ac9521e530c58fb1
Author: Andrea Cimitan <andrea cimitan canonical com>
Date: Mon Apr 16 13:22:18 2012 +0100
shadow: add blur to icon-shadow (spinner)
gtk/gtkcssshadowvalue.c | 36 ++++++++++++++++++++++++++++++------
1 files changed, 30 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkcssshadowvalue.c b/gtk/gtkcssshadowvalue.c
index e6ff1dd..7296caf 100644
--- a/gtk/gtkcssshadowvalue.c
+++ b/gtk/gtkcssshadowvalue.c
@@ -432,12 +432,36 @@ _gtk_css_shadow_value_paint_spinner (const GtkCssValue *shadow,
cairo_save (cr);
- cairo_translate (cr,
- _gtk_css_number_value_get (shadow->hoffset, 0),
- _gtk_css_number_value_get (shadow->voffset, 0));
- _gtk_theming_engine_paint_spinner (cr,
- radius, progress,
- _gtk_css_rgba_value_get_rgba (shadow->color));
+ if (_gtk_css_number_value_get (shadow->radius, 0) > 0)
+ {
+ cairo_t *blur_cr;
+ cairo_surface_t *surface;
+
+ _gtk_css_shadow_value_blur_surface_create (shadow, cr,
+ &blur_cr, &surface);
+
+ /* Create the path on the surface to blur. */
+ cairo_translate (blur_cr,
+ _gtk_css_number_value_get (shadow->hoffset, 0),
+ _gtk_css_number_value_get (shadow->voffset, 0));
+ _gtk_theming_engine_paint_spinner (blur_cr,
+ radius, progress,
+ _gtk_css_rgba_value_get_rgba (shadow->color));
+
+ _gtk_css_shadow_value_blur_surface_paint (shadow, cr, surface);
+
+ cairo_destroy (blur_cr);
+ cairo_surface_destroy (surface);
+ }
+ else
+ {
+ cairo_translate (cr,
+ _gtk_css_number_value_get (shadow->hoffset, 0),
+ _gtk_css_number_value_get (shadow->voffset, 0));
+ _gtk_theming_engine_paint_spinner (cr,
+ radius, progress,
+ _gtk_css_rgba_value_get_rgba (shadow->color));
+ }
cairo_restore (cr);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]