summaryrefslogtreecommitdiff
path: root/eel
diff options
context:
space:
mode:
Diffstat (limited to 'eel')
-rw-r--r--eel/eel-graphic-effects.c14
-rw-r--r--eel/eel-graphic-effects.h3
2 files changed, 17 insertions, 0 deletions
diff --git a/eel/eel-graphic-effects.c b/eel/eel-graphic-effects.c
index f25cbb6f..2405a296 100644
--- a/eel/eel-graphic-effects.c
+++ b/eel/eel-graphic-effects.c
@@ -108,6 +108,20 @@ eel_create_spotlight_pixbuf (GdkPixbuf* src)
return dest;
}
+cairo_surface_t *
+eel_create_spotlight_surface (cairo_surface_t* src, int scale)
+{
+ GdkPixbuf *pixbuf;
+ cairo_surface_t *dest;
+
+ pixbuf = gdk_pixbuf_get_from_surface (src, 0, 0,
+ cairo_image_surface_get_width (src),
+ cairo_image_surface_get_height (src));
+ dest = gdk_cairo_surface_create_from_pixbuf (pixbuf, scale, NULL);
+ g_object_unref (pixbuf);
+
+ return dest;
+}
/* the following routine was stolen from the panel to darken a pixbuf, by manipulating the saturation */
diff --git a/eel/eel-graphic-effects.h b/eel/eel-graphic-effects.h
index 3a9027fe..d71fffcb 100644
--- a/eel/eel-graphic-effects.h
+++ b/eel/eel-graphic-effects.h
@@ -32,6 +32,9 @@
/* return a lightened pixbuf for pre-lighting */
GdkPixbuf *eel_create_spotlight_pixbuf (GdkPixbuf *source_pixbuf);
+/* return a lightened surface for pre-lighting */
+cairo_surface_t *eel_create_spotlight_surface (cairo_surface_t *source_surface,
+ int scale);
/* return a darkened pixbuf for selection hiliting */
GdkPixbuf *eel_create_darkened_pixbuf (GdkPixbuf *source_pixbuf,