gesturerotate: Just return a double in get_angle_delta()

Whether the gesture is active or recognized should be checked before in
callers, or just not used naively.
This commit is contained in:
Carlos Garnacho
2014-05-26 14:29:17 +02:00
parent d05a9f9a7b
commit 8f7d5fb2c0
3 changed files with 10 additions and 17 deletions

View File

@ -93,8 +93,8 @@ drawing_area_draw (GtkWidget *widget,
cairo_save (cr);
if (gtk_gesture_rotate_get_angle_delta (GTK_GESTURE_ROTATE (rotate), &angle))
cairo_matrix_rotate (&matrix, angle);
angle = gtk_gesture_rotate_get_angle_delta (GTK_GESTURE_ROTATE (rotate));
cairo_matrix_rotate (&matrix, angle);
if (gtk_gesture_zoom_get_scale_delta (GTK_GESTURE_ZOOM (zoom), &scale))
cairo_matrix_scale (&matrix, scale, scale);