gesturezoom: Just return a double in get_scale_delta()

Checking whether the gesture is active is a responsibility of the caller.
This commit is contained in:
Carlos Garnacho
2014-05-26 14:32:59 +02:00
parent 8f7d5fb2c0
commit 9f8bd7a2bc
3 changed files with 10 additions and 15 deletions

View File

@ -96,8 +96,8 @@ drawing_area_draw (GtkWidget *widget,
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);
scale = gtk_gesture_zoom_get_scale_delta (GTK_GESTURE_ZOOM (zoom));
cairo_matrix_scale (&matrix, scale, scale);
cairo_set_matrix (cr, &matrix);
cairo_rectangle (cr, -100, -100, 200, 200);