[gtk+/wip/baedert/gtkimageview: 534/625] I think both scale and angle are working...



commit c6ebf57831d7d7b8af4a110c35d8784406af7e46
Author: Timm Bäder <mail baedert org>
Date:   Sat Jan 16 19:58:39 2016 +0100

    I think both scale and angle are working...

 gtk/gtkimageview.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkimageview.c b/gtk/gtkimageview.c
index 05f2455..9f4001d 100644
--- a/gtk/gtkimageview.c
+++ b/gtk/gtkimageview.c
@@ -243,6 +243,9 @@ gtk_image_view_fix_anchor_rotate (GtkImageView *image_view,
   double hupper_delta_angle = hupper_delta - hupper_delta_scale;
   double vupper_delta_angle = vupper_delta - vupper_delta_scale;
 
+
+
+
   /* As a first step, fix the anchor point with regard to the
    * updated scale
    */
@@ -270,6 +273,17 @@ gtk_image_view_fix_anchor_rotate (GtkImageView *image_view,
                               vvalue + py_after - py);
   }
 
+
+
+  gtk_adjustment_set_value (priv->hadjustment,
+                            gtk_adjustment_get_value (priv->hadjustment) + hupper_delta_angle / 2.0);
+
+  gtk_adjustment_set_value (priv->vadjustment,
+                            gtk_adjustment_get_value (priv->vadjustment) + vupper_delta_angle / 2.0);
+
+
+
+
   double rotate_anchor_x = 0;
   double rotate_anchor_y = 0;
 
@@ -1272,7 +1286,7 @@ gtk_image_view_set_angle (GtkImageView *image_view,
     g_message ("New scale: %f", priv->scale);
 
   priv->angle = angle;
-  g_message ("New angle: %f", angle);
+  /*g_message ("New angle: %f", angle);*/
 
 
   priv->size_valid = FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]