[mutter] theme: Use cairo for drawing uncolorized IMAGEs
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] theme: Use cairo for drawing uncolorized IMAGEs
- Date: Wed, 15 Oct 2014 00:46:54 +0000 (UTC)
commit 7e12000d97586b272ce316cbaef0ef6795ded765
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Oct 28 22:02:18 2011 -0400
theme: Use cairo for drawing uncolorized IMAGEs
https://bugzilla.gnome.org/show_bug.cgi?id=662962
src/ui/theme.c | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 5f53c48..72ffa9e 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -3813,16 +3813,24 @@ meta_draw_op_draw_with_env (const MetaDrawOp *op,
env->object_height = gdk_pixbuf_get_height (op->data.image.pixbuf);
}
+ rx = parse_x_position_unchecked (op->data.image.x, env);
+ ry = parse_y_position_unchecked (op->data.image.y, env);
+
rwidth = parse_size_unchecked (op->data.image.width, env);
rheight = parse_size_unchecked (op->data.image.height, env);
- pixbuf = draw_op_as_pixbuf (op, style_gtk, info,
- rwidth, rheight);
-
- if (pixbuf)
+ if (op->data.image.colorize_spec == NULL)
+ {
+ draw_image (cr,
+ op->data.image.pixbuf,
+ op->data.image.fill_type,
+ op->data.image.alpha_spec,
+ rx, ry, rwidth, rheight);
+ }
+ else
{
- rx = parse_x_position_unchecked (op->data.image.x, env);
- ry = parse_y_position_unchecked (op->data.image.y, env);
+ pixbuf = draw_op_as_pixbuf (op, style_gtk, info,
+ rwidth, rheight);
gdk_cairo_set_source_pixbuf (cr, pixbuf, rx, ry);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]