[gtk+/gtk-style-context: 496/533] GtkStyleContext: store layout extents for animation purposes.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 496/533] GtkStyleContext: store layout extents for animation purposes.
- Date: Wed, 1 Dec 2010 02:47:32 +0000 (UTC)
commit 900f9941a58ba80deea725b554b23711936a76d9
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Nov 24 22:57:18 2010 +0100
GtkStyleContext: store layout extents for animation purposes.
gtk/gtkstylecontext.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index ba72fb7..61d3b7b 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -3252,6 +3252,7 @@ gtk_render_layout (GtkStyleContext *context,
{
GtkStyleContextPrivate *priv;
GtkThemingEngineClass *engine_class;
+ PangoRectangle extents;
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
g_return_if_fail (cr != NULL);
@@ -3259,6 +3260,14 @@ gtk_render_layout (GtkStyleContext *context,
priv = context->priv;
engine_class = GTK_THEMING_ENGINE_GET_CLASS (priv->theming_engine);
+ pango_layout_get_extents (layout, &extents, NULL);
+
+ store_animation_region (context,
+ x + extents.x,
+ y + extents.y,
+ extents.width,
+ extents.height);
+
_gtk_theming_engine_set_context (priv->theming_engine, context);
engine_class->render_layout (priv->theming_engine, cr, x, y, layout);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]