From b3903bcc7ff06e81a6565294aa9ef844104a3c05 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Tue, 22 Jun 2010 10:10:24 +0900 Subject: [PATCH] libeek: draw rotated section with GTK UI --- eek/eek-gtk-keyboard.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eek/eek-gtk-keyboard.c b/eek/eek-gtk-keyboard.c index f82cb079..3b19ca54 100644 --- a/eek/eek-gtk-keyboard.c +++ b/eek/eek-gtk-keyboard.c @@ -23,6 +23,7 @@ * @short_description: #EekKeyboard that can be converted into a #GtkWidget */ #include +#include #ifdef HAVE_CONFIG_H #include "config.h" @@ -222,12 +223,15 @@ prepare_keyboard_pixmap_section_callback (EekElement *element, { DrawingContext *context = user_data; EekBounds bounds; + gint angle; eek_element_get_bounds (element, &bounds); + angle = eek_section_get_angle (EEK_SECTION(element)); cairo_save (context->cr); cairo_translate (context->cr, bounds.x, bounds.y); + cairo_rotate (context->cr, angle * M_PI / 180); eek_container_foreach_child (EEK_CONTAINER(element), prepare_keyboard_pixmap_key_callback, context);