gimp r26766 - trunk/app/paint-funcs



Author: neo
Date: Mon Aug 25 18:43:24 2008
New Revision: 26766
URL: http://svn.gnome.org/viewvc/gimp?rev=26766&view=rev

Log:
moved scale_region() to the top of the file


Modified:
   trunk/app/paint-funcs/scale-region.c

Modified: trunk/app/paint-funcs/scale-region.c
==============================================================================
--- trunk/app/paint-funcs/scale-region.c	(original)
+++ trunk/app/paint-funcs/scale-region.c	Mon Aug 25 18:43:24 2008
@@ -164,6 +164,38 @@
                                                 const gint     byte);
 
 
+
+void
+scale_region (PixelRegion           *srcPR,
+              PixelRegion           *dstPR,
+              GimpInterpolationType  interpolation,
+              GimpProgressFunc       progress_callback,
+              gpointer               progress_data)
+{
+  /* Copy and return if scale = 1.0 */
+  if (srcPR->h == dstPR->h && srcPR->w == dstPR->w)
+    {
+      copy_region (srcPR, dstPR);
+      return;
+    }
+
+  if (srcPR->tiles == NULL && srcPR->data != NULL)
+    {
+      scale_region_buffer (srcPR, dstPR, interpolation,
+                           progress_callback, progress_data);
+      return;
+    }
+
+  if (srcPR->tiles != NULL && srcPR->data == NULL)
+    {
+      scale_region_tile (srcPR, dstPR, interpolation,
+                         progress_callback, progress_data);
+      return;
+    }
+
+  g_assert_not_reached ();
+}
+
 static void
 scale_determine_levels (PixelRegion *srcPR,
                         PixelRegion *dstPR,
@@ -763,37 +795,6 @@
     }
 }
 
-void
-scale_region (PixelRegion           *srcPR,
-              PixelRegion           *dstPR,
-              GimpInterpolationType  interpolation,
-              GimpProgressFunc       progress_callback,
-              gpointer               progress_data)
-{
-  /* Copy and return if scale = 1.0 */
-  if (srcPR->h == dstPR->h && srcPR->w == dstPR->w)
-    {
-      copy_region (srcPR, dstPR);
-      return;
-    }
-
-  if (srcPR->tiles == NULL && srcPR->data != NULL)
-    {
-      scale_region_buffer (srcPR, dstPR, interpolation,
-                           progress_callback, progress_data);
-      return;
-    }
-
-  if (srcPR->tiles != NULL && srcPR->data == NULL)
-    {
-      scale_region_tile (srcPR, dstPR, interpolation,
-                         progress_callback, progress_data);
-      return;
-    }
-
-  g_assert_not_reached ();
-}
-
 static void
 decimate_gauss (TileManager  *srcTM,
                 const gint    x0,



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