[f-spot: 3/41] do something with the zoom



commit 75c9f64d536f8595d7c4ddd12763dcc37f62247b
Author: Stephane Delcroix <stephane delcroix org>
Date:   Sat Jun 6 17:48:23 2009 +0200

    do something with the zoom

 src/Widgets/ImageView.cs |   25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)
---
diff --git a/src/Widgets/ImageView.cs b/src/Widgets/ImageView.cs
index 2028cbe..03d2918 100644
--- a/src/Widgets/ImageView.cs
+++ b/src/Widgets/ImageView.cs
@@ -30,6 +30,7 @@ namespace FSpot.Widgets
 
 		public ImageView () : base (null, null)
 		{
+			transparent_color = this.Style.BaseColors [(int)Gtk.StateType.Normal];
 		}
 
 		public Pixbuf Pixbuf {
@@ -63,18 +64,36 @@ namespace FSpot.Widgets
 			set { throw new NotImplementedException ();} 
 		}
 
+		double zoom;
+		public double Zoom {
+			get { return zoom; }
+			set { 
+				if (value < MIN_ZOOM || value > MAX_ZOOM)
+					return;
+				zoom = value;
+				EventHandler eh = ZoomChanged;
+				if (eh != null)
+					eh (this, EventArgs.Empty);
+			}
+		}
 
+		[Obsolete ("use the Zoom Property")]
 		public void GetZoom (out double zoomx, out double zoomy)
 		{
-			throw new NotImplementedException ();	
+			zoomx = zoomy = Zoom;
 		}
 
+		[Obsolete ("use the Zoom Property, or ZoomAboutPoint method")]
 		public void SetZoom (double zoom_x, double zoom_y)
 		{
-			throw new NotImplementedException ();	
+			Zoom = zoom_x;
+		}
+
+		public void ZoomAboutPoint (double zoom_increment, int x, int y)
+		{
 		}
 		
-		Gdk.Color transparent_color = this.Style.BaseColors [(int)Gtk.StateType.Normal];
+		Gdk.Color transparent_color;
 		public Gdk.Color TransparentColor {
 			get { return transparent_color; }
 			set { transparent_color = value; }



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