small optimze for StretchBlt 
now do only getpixel ones instead call hole time on getpixel for the color value when it stretch to biger BMP
the hole stretchblt need to be optimze this code are geting it working bit faster and it is reference implementation
Modified: trunk/reactos/subsys/win32k/dib/dib16bpp.c
Modified: trunk/reactos/subsys/win32k/dib/dib1bpp.c
Modified: trunk/reactos/subsys/win32k/dib/dib24bpp.c
Modified: trunk/reactos/subsys/win32k/dib/dib32bpp.c
Modified: trunk/reactos/subsys/win32k/dib/dib4bpp.c
Modified: trunk/reactos/subsys/win32k/dib/dib8bpp.c

Modified: trunk/reactos/subsys/win32k/dib/dib16bpp.c
--- trunk/reactos/subsys/win32k/dib/dib16bpp.c	2005-05-31 22:06:18 UTC (rev 15709)
+++ trunk/reactos/subsys/win32k/dib/dib16bpp.c	2005-05-31 23:58:14 UTC (rev 15710)
@@ -627,6 +627,8 @@
    int DesY;
    int color;
    int zoomX;
+   int zoomY;
+   int count;
 
   DPRINT("DIB_16BPP_StretchBlt: Source BPP: %u, srcRect: (%d,%d)-(%d,%d), dstRect: (%d,%d)-(%d,%d)\n",
      BitsPerFormat(SourceSurf->iBitmapFormat), SourceRect->left, SourceRect->top, SourceRect->right, SourceRect->bottom,
@@ -641,13 +643,16 @@
 	zoomX = DesSizeX / SrcSizeX;
     if (zoomX==0) zoomX=1;
 
+	zoomY = DesSizeY / SrcSizeY;
+    if (zoomY==0) zoomY=1;
+
     switch(SourceSurf->iBitmapFormat)
     {
             case BMF_1BPP:
 		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
- 		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+ 		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{				
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -665,19 +670,25 @@
 					
 					if (sx > SourceRect->right) break;
 
-				    if(DIB_1BPP_GetPixel(SourceSurf, sx, sy) == 0)
+				     if(DIB_1BPP_GetPixel(SourceSurf, sx, sy) == 0)
 					{
-					 if (zoomX>1) 
-						DIB_16BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, 0));
-					else
-					    DIB_16BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, 0));		
+						for (count=DesY;count<DesY+zoomY;count++)
+						{
+						 if (zoomX>1) 
+						   DIB_16BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, 0));
+						 else
+						   DIB_16BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, 0));
+						}					 
 					 
 					 } else {
-                       if (zoomX>1) 
-							DIB_16BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, 1));
-						else
-							DIB_16BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, 1));		
 
+						for (count=DesY;count<DesY+zoomY;count++)
+						{
+						 if (zoomX>1) 
+						   DIB_16BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, 1));
+						 else
+						   DIB_16BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, 1));
+						}					 
                      }					
 					}
 				}
@@ -687,7 +698,7 @@
 		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{				
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -709,10 +720,13 @@
 
 					color = DIB_4BPP_GetPixel(SourceSurf, sx, sy);
 					
-					if (zoomX>1) 
-						DIB_16BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_16BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));		
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_16BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_16BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					}			
 
 					}
 				}
@@ -722,7 +736,7 @@
   		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -742,10 +756,13 @@
 
 					color = DIB_8BPP_GetPixel(SourceSurf, sx, sy);
 
-					if (zoomX>1) 
-						DIB_16BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_16BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));	
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_16BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_16BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					}		
 
 					}
 				}
@@ -755,7 +772,7 @@
 		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -774,10 +791,13 @@
 					if (sx > SourceRect->right) break;
 
 					color = DIB_24BPP_GetPixel(SourceSurf, sx, sy);
-					if (zoomX>1) 
-						DIB_16BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_16BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));					
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_16BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_16BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					}						
 					}
 				}
 	  break;
@@ -786,7 +806,7 @@
   		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -805,10 +825,13 @@
 					if (sx > SourceRect->right) break;
 
 					color = DIB_32BPP_GetPixel(SourceSurf, sx, sy);
-					if (zoomX>1) 
-						DIB_16BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_16BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));					
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_16BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_16BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					}						
 					}
 				}		  
       break;

Modified: trunk/reactos/subsys/win32k/dib/dib1bpp.c
--- trunk/reactos/subsys/win32k/dib/dib1bpp.c	2005-05-31 22:06:18 UTC (rev 15709)
+++ trunk/reactos/subsys/win32k/dib/dib1bpp.c	2005-05-31 23:58:14 UTC (rev 15710)
@@ -495,6 +495,8 @@
    int DesY;
    int color;
    int zoomX;
+   int zoomY;
+   int count;
 
    SrcSizeY = SourceRect->bottom;
    SrcSizeX = SourceRect->right;
@@ -505,14 +507,17 @@
    zoomX = DesSizeX / SrcSizeX;
    if (zoomX==0) zoomX=1;
 
+   zoomY = DesSizeY / SrcSizeY;
+   if (zoomY==0) zoomY=1;
 
+
     switch(SourceSurf->iBitmapFormat)
     {
       case BMF_1BPP:
 		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{				
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -534,11 +539,15 @@
 
 					color = DIB_1BPP_GetPixel(SourceSurf, sx, sy);
 					
-					if (zoomX>1) 
-						DIB_1BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, color);
-					else
-					    DIB_1BPP_PutPixel(DestSurf, DesX, DesY, color);
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_1BPP_HLine(DestSurf, DesX, DesX + zoomX, count, color);
+					 else
+						   DIB_1BPP_PutPixel(DestSurf, DesX, count, color);
 					}
+
+				  }
 				}
       break;
 
@@ -546,7 +555,7 @@
 		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{				
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -568,12 +577,14 @@
 
 					color = DIB_4BPP_GetPixel(SourceSurf, sx, sy);
 					
-					if (zoomX>1) 
-						DIB_1BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_1BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_1BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_1BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
 					}
+				  }
 				}
       break;
 
@@ -581,7 +592,7 @@
   		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -601,12 +612,15 @@
 
 					color = DIB_8BPP_GetPixel(SourceSurf, sx, sy);
 					
-					if (zoomX>1) 
-						DIB_1BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_1BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_1BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_1BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					}
 
-					}
+				  }
 				}
 		break;
 
@@ -614,7 +628,7 @@
 		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -634,12 +648,15 @@
 
 					color = DIB_16BPP_GetPixel(SourceSurf, sx, sy);
 					
-					if (zoomX>1) 
-						DIB_1BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_1BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_1BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_1BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					}
 
-					}
+				  }
 				}
 	  break;
 
@@ -647,7 +664,7 @@
   		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -667,19 +684,22 @@
 
 					color = DIB_24BPP_GetPixel(SourceSurf, sx, sy);
 					
-					if (zoomX>1) 
-						DIB_1BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_1BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_1BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_1BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					}
 
-					}
+				  }
 				}		  
       break;
       case BMF_32BPP:
   		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -699,11 +719,14 @@
 
 					color = DIB_32BPP_GetPixel(SourceSurf, sx, sy);
 
-					if (zoomX>1) 
-						DIB_1BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_1BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_1BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_1BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
 					}
+				 }
 				}		  
       break;
 

Modified: trunk/reactos/subsys/win32k/dib/dib24bpp.c
--- trunk/reactos/subsys/win32k/dib/dib24bpp.c	2005-05-31 22:06:18 UTC (rev 15709)
+++ trunk/reactos/subsys/win32k/dib/dib24bpp.c	2005-05-31 23:58:14 UTC (rev 15710)
@@ -319,6 +319,8 @@
    int DesY;
    int color;
    int zoomX;
+   int zoomY;
+   int count;
 
    SrcSizeY = SourceRect->bottom;
    SrcSizeX = SourceRect->right;
@@ -329,13 +331,16 @@
    zoomX = DesSizeX / SrcSizeX;
    if (zoomX==0) zoomX=1;
 
+   zoomY = DesSizeY / SrcSizeY;
+   if (zoomY==0) zoomY=1;
+
     switch(SourceSurf->iBitmapFormat)
     {
       case BMF_1BPP:
 		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
- 		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+ 		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{				
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -351,21 +356,25 @@
 					else
 						sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);                 				       	            
 					
-					if (sx > SourceRect->right) break;
-
-				    if(DIB_1BPP_GetPixel(SourceSurf, sx, sy) == 0)
+					 if(DIB_1BPP_GetPixel(SourceSurf, sx, sy) == 0)
 					{
-					 DIB_24BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, 0));
-					 if (zoomX>1) 
-						DIB_24BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, 0));
-					else
-					    DIB_24BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, 0));
+						for (count=DesY;count<DesY+zoomY;count++)
+						{
+						 if (zoomX>1) 
+						   DIB_24BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, 0));
+						 else
+						   DIB_24BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, 0));
+						}					 
+					 
+					 } else {
 
-					 } else {
-					 if (zoomX>1) 
-						DIB_24BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, 1));
-					else
-					    DIB_24BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, 1));                     
+						for (count=DesY;count<DesY+zoomY;count++)
+						{
+						 if (zoomX>1) 
+						   DIB_24BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, 1));
+						 else
+						   DIB_24BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, 1));
+						}					 
                      }					
 					}
 				}
@@ -375,7 +384,7 @@
 		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{				
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -394,11 +403,15 @@
 					if (sx > SourceRect->right) break;
 
 					color = DIB_4BPP_GetPixel(SourceSurf, sx, sy);
-					if (zoomX>1) 
-						DIB_24BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_24BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					}
+
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_24BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_24BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					}	
+				  }
 				}
       break;
 
@@ -406,7 +419,7 @@
   		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -425,11 +438,16 @@
 					if (sx > SourceRect->right) break;
 
 					color = DIB_8BPP_GetPixel(SourceSurf, sx, sy);
-					if (zoomX>1) 
-						DIB_24BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_24BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
+
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_24BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_24BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
 					}
+
+					}
 				}
 		break;
 
@@ -437,7 +455,7 @@
 		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -456,11 +474,16 @@
 					if (sx > SourceRect->right) break;
 
 					color = DIB_16BPP_GetPixel(SourceSurf, sx, sy);
-					if (zoomX>1) 
-						DIB_24BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_24BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
+
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_24BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_24BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
 					}
+
+				 }
 				}
 	  break;
 
@@ -468,7 +491,7 @@
   		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -487,11 +510,16 @@
 					if (sx > SourceRect->right) break;
 
 					color = DIB_24BPP_GetPixel(SourceSurf, sx, sy);
-					if (zoomX>1) 
-						DIB_24BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, color);
-					else
-					    DIB_24BPP_PutPixel(DestSurf, DesX, DesY, color);
+
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_24BPP_HLine(DestSurf, DesX, DesX + zoomX, count, color);
+					 else
+						   DIB_24BPP_PutPixel(DestSurf, DesX, count, color);
 					}
+
+				  }
 				}		  
       break;
 
@@ -499,7 +527,7 @@
   		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -519,11 +547,14 @@
 
 					color = DIB_32BPP_GetPixel(SourceSurf, sx, sy);
 					
-					if (zoomX>1) 
-						DIB_24BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_24BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_24BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_24BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
 					}
+				 }
 				}		  
       break;
 

Modified: trunk/reactos/subsys/win32k/dib/dib32bpp.c
--- trunk/reactos/subsys/win32k/dib/dib32bpp.c	2005-05-31 22:06:18 UTC (rev 15709)
+++ trunk/reactos/subsys/win32k/dib/dib32bpp.c	2005-05-31 23:58:14 UTC (rev 15710)
@@ -561,6 +561,8 @@
    int DesY;
    int color;
    int zoomX;
+   int zoomY;
+   int count;
    
 
    DPRINT("DIB_32BPP_StretchBlt: Source BPP: %u, srcRect: (%d,%d)-(%d,%d), dstRect: (%d,%d)-(%d,%d)\n",
@@ -575,14 +577,17 @@
 
    zoomX = DesSizeX / SrcSizeX;
    if (zoomX==0) zoomX=1;
-      
+    
+   zoomY = DesSizeY / SrcSizeY;
+   if (zoomY==0) zoomY=1;
+
     switch(SourceSurf->iBitmapFormat)
     {
       case BMF_1BPP:
 		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
- 		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+ 		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{				
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -602,16 +607,23 @@
 
 				    if(DIB_1BPP_GetPixel(SourceSurf, sx, sy) == 0)
 					{
-					 if (zoomX>1) 
-						DIB_32BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, 0));
-					 else
-					    DIB_32BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, 0));	
+						for (count=DesY;count<DesY+zoomY;count++)
+						{
+						 if (zoomX>1) 
+						   DIB_32BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, 0));
+						 else
+						   DIB_32BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, 0));
+						}					 
 					 
 					 } else {
-                     if (zoomX>1) 
-						DIB_32BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, 1));
-					 else
-					    DIB_32BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, 1));						 
+
+						for (count=DesY;count<DesY+zoomY;count++)
+						{
+						 if (zoomX>1) 
+						   DIB_32BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, 1));
+						 else
+						   DIB_32BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, 1));
+						}					 
                      }					
 					}
 				}
@@ -621,7 +633,7 @@
 		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{				
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -644,10 +656,13 @@
 
 					color = DIB_4BPP_GetPixel(SourceSurf, sx, sy);
 					
-					if (zoomX>1) 
-						DIB_32BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_32BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_32BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_32BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					}		
 
 					}
 				}
@@ -657,7 +672,7 @@
   		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -677,11 +692,16 @@
 
 					color = DIB_8BPP_GetPixel(SourceSurf, sx, sy);
 
-					if (zoomX>1) 
-						DIB_32BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_32BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+						if (zoomX>1) 
+							DIB_32BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+						else
+							DIB_32BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
 					}
+
+
+					}
 				}
 		break;
 
@@ -689,7 +709,7 @@
 		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -708,11 +728,15 @@
 					if (sx > SourceRect->right) break;
 
 					color = DIB_16BPP_GetPixel(SourceSurf, sx, sy);
-					if (zoomX>1) 
-						DIB_32BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_32BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					}
+
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					  if (zoomX>1) 
+						   DIB_32BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					  else
+						   DIB_32BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					}		
+				  }
 				}
 	  break;
 
@@ -720,7 +744,7 @@
   		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -739,11 +763,16 @@
 					if (sx > SourceRect->right) break;
 
 					color = DIB_24BPP_GetPixel(SourceSurf, sx, sy);
-					if (zoomX>1) 
-						DIB_32BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_32BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					}
+					
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_32BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_32BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					}		
+
+				  }
 				}		  
       break;
 

Modified: trunk/reactos/subsys/win32k/dib/dib4bpp.c
--- trunk/reactos/subsys/win32k/dib/dib4bpp.c	2005-05-31 22:06:18 UTC (rev 15709)
+++ trunk/reactos/subsys/win32k/dib/dib4bpp.c	2005-05-31 23:58:14 UTC (rev 15710)
@@ -373,6 +373,9 @@
    int DesY;
    int color;
    int zoomX;
+   int zoomY;
+   int count;
+  
 
    SrcSizeY = SourceRect->bottom;
    SrcSizeX = SourceRect->right;
@@ -383,13 +386,16 @@
    zoomX = DesSizeX / SrcSizeX;
    if (zoomX==0) zoomX=1;
 
+   zoomY = DesSizeY / SrcSizeY;
+   if (zoomY==0) zoomY=1;
+
     switch(SourceSurf->iBitmapFormat)
     {
       case BMF_1BPP:
 		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
- 		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+ 		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{				
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -407,19 +413,25 @@
 					
 					if (sx > SourceRect->right) break;
 
-				    if(DIB_1BPP_GetPixel(SourceSurf, sx, sy) == 0)
+				     if(DIB_1BPP_GetPixel(SourceSurf, sx, sy) == 0)
 					{
-					 if (zoomX>1) 
-						DIB_4BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, 0));
-					else
-					    DIB_4BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, 0));
+						for (count=DesY;count<DesY+zoomY;count++)
+						{
+						 if (zoomX>1) 
+						   DIB_4BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, 0));
+						 else
+						   DIB_4BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, 0));
+						}					 
 					 
-					 } else {                     
-					 if (zoomX>1) 
-						DIB_4BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, 1));
-					else
-					    DIB_4BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, 1));
+					 } else {
 
+						for (count=DesY;count<DesY+zoomY;count++)
+						{
+						 if (zoomX>1) 
+						   DIB_4BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, 1));
+						 else
+						   DIB_4BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, 1));
+						}					 
                      }					
 					}
 				}
@@ -429,7 +441,7 @@
 		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{				
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -451,12 +463,15 @@
 
 					color = DIB_4BPP_GetPixel(SourceSurf, sx, sy);
 					
-					if (zoomX>1) 
-						DIB_4BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, color);
-					else
-					    DIB_4BPP_PutPixel(DestSurf, DesX, DesY, color);
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_4BPP_HLine(DestSurf, DesX, DesX + zoomX, count, color);
+					 else
+						   DIB_4BPP_PutPixel(DestSurf, DesX, count, color);
+					}
 
-					}
+				  }
 				}
       break;
 
@@ -464,7 +479,7 @@
   		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -497,7 +512,7 @@
 		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -517,12 +532,15 @@
 
 					color = DIB_16BPP_GetPixel(SourceSurf, sx, sy);
 
-					if (zoomX>1) 
-						DIB_4BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_4BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_4BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_4BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					}
 
-					}
+				  }
 				}
 	  break;
 
@@ -530,7 +548,7 @@
   		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -550,12 +568,15 @@
 
 					color = DIB_24BPP_GetPixel(SourceSurf, sx, sy);
 					
-					if (zoomX>1) 
-						DIB_4BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_4BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_4BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_4BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					}
 
-					}
+				  }
 				}		  
       break;
 
@@ -563,7 +584,7 @@
   		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
-		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -583,12 +604,14 @@
 
 					color = DIB_32BPP_GetPixel(SourceSurf, sx, sy);
 					
-					if (zoomX>1) 
-						DIB_4BPP_HLine(DestSurf, DesX, DesX + zoomX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-					else
-					    DIB_4BPP_PutPixel(DestSurf, DesX, DesY, XLATEOBJ_iXlate(ColorTranslation, color));
-
+					for (count=DesY;count<DesY+zoomY;count++)
+					{
+					 if (zoomX>1) 
+						   DIB_4BPP_HLine(DestSurf, DesX, DesX + zoomX, count, XLATEOBJ_iXlate(ColorTranslation, color));
+					 else
+						   DIB_4BPP_PutPixel(DestSurf, DesX, count, XLATEOBJ_iXlate(ColorTranslation, color));
 					}
+				  }
 				}		  
       break;
 

Modified: trunk/reactos/subsys/win32k/dib/dib8bpp.c
--- trunk/reactos/subsys/win32k/dib/dib8bpp.c	2005-05-31 22:06:18 UTC (rev 15709)
+++ trunk/reactos/subsys/win32k/dib/dib8bpp.c	2005-05-31 23:58:14 UTC (rev 15710)
@@ -551,6 +551,8 @@
    int DesY;
    int color;
    int zoomX;
+   int zoomY;
+   int count;
 
   DPRINT("DIB_8BPP_StretchBlt: Source BPP: %u, srcRect: (%d,%d)-(%d,%d), dstRect: (%d,%d)-(%d,%d)\n",
      BitsPerFormat(SourceSurf->iBitmapFormat), SourceRect->left, SourceRect->top, SourceRect->right, SourceRect->bottom,
@@ -565,13 +567,16 @@
    zoomX = DesSizeX / SrcSizeX;
    if (zoomX==0) zoomX=1;
 
+   zoomY = DesSizeY / SrcSizeY;
+   if (zoomY==0) zoomY=1;
+
     switch(SourceSurf->iBitmapFormat)
     {     
 	        case BMF_1BPP:
 		   /* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
    		   /* This is a reference implementation, it hasn't been optimized for speed */
 
- 		  	for (DesY=0; DesY<DestRect->bottom; DesY++)
+ 		  	for (DesY=0; DesY<DestRect->bottom; DesY+=zoomY)
 			{				
 				if (DesSizeY>SrcSizeY)
 				    sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
[truncated at 1000 lines; 149 more skipped]