Bug 55367 - Rotated view of the canvas (view is rotated, not image contents)

First version of display rotation, inspired by gimp-painter.
The rotation always happens around the image's center.

The only "UI" for rotating is currently shift+middle-drag and
shift+space-drag. Control constrains the angle to 15 degrees
and is currently the only way to go back to "no rotation".
This commit is contained in:
Michael Natterer
2013-04-19 16:22:19 +02:00
parent f45e7c26be
commit b3a9a6a3e3
15 changed files with 568 additions and 36 deletions

View File

@ -70,6 +70,10 @@ struct _GimpDisplayShell
gdouble scale_x; /* horizontal scale factor */
gdouble scale_y; /* vertical scale factor */
gdouble rotate_angle;
cairo_matrix_t *rotate_transform;
cairo_matrix_t *rotate_untransform;
gdouble monitor_xres;
gdouble monitor_yres;
gboolean dot_for_dot; /* ignore monitor resolution */
@ -176,6 +180,8 @@ struct _GimpDisplayShell
gboolean scrolling;
gint scroll_last_x;
gint scroll_last_y;
gboolean rotating;
gdouble rotate_drag_angle;
gpointer scroll_info;
GimpDrawable *mask;