[gtk+/wip/pango-shadow-cache] xxx clip
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/pango-shadow-cache] xxx clip
- Date: Wed, 3 Sep 2014 17:29:41 +0000 (UTC)
commit cc457080340139e8e52075013b17824436db8071
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Sep 3 10:23:01 2014 -0700
xxx clip
gtk/gtkcssshadowvalue.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssshadowvalue.c b/gtk/gtkcssshadowvalue.c
index 154d903..9ce09bb 100644
--- a/gtk/gtkcssshadowvalue.c
+++ b/gtk/gtkcssshadowvalue.c
@@ -415,6 +415,7 @@ _gtk_css_shadow_value_paint_layout (const GtkCssValue *shadow,
PangoLayout *layout)
{
double x, y;
+ PangoRectangle ink_rect;
g_return_if_fail (shadow->class == >K_CSS_VALUE_SHADOW);
@@ -424,6 +425,10 @@ _gtk_css_shadow_value_paint_layout (const GtkCssValue *shadow,
cairo_translate (cr, x, y);
cairo_new_sub_path (cr);
+ pango_layout_get_pixel_extents (layout, NULL, &ink_rect);
+ cairo_rectangle (cr, ink_rect.x, ink_rect.y, ink_rect.width, ink_rect.height);
+ cairo_clip (cr);
+
cairo_translate (cr,
_gtk_css_number_value_get (shadow->hoffset, 0),
_gtk_css_number_value_get (shadow->voffset, 0));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]