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
--- trunk/reactos/subsys/win32k/dib/dib16bpp.c 2006-01-01 16:49:53 UTC (rev 20520)
+++ trunk/reactos/subsys/win32k/dib/dib16bpp.c 2006-01-01 17:12:19 UTC (rev 20521)
@@ -630,10 +630,10 @@
BitsPerFormat(SourceSurf->iBitmapFormat), SourceRect->left, SourceRect->top, SourceRect->right, SourceRect->bottom,
DestRect->left, DestRect->top, DestRect->right, DestRect->bottom);
- SrcSizeY = SourceRect->bottom;
- SrcSizeX = SourceRect->right;
+ SrcSizeY = SourceRect->bottom - SourceRect->top;
+ SrcSizeX = SourceRect->right - SourceRect->left;
- DesSizeY = DestRect->bottom;
+ DesSizeY = DestRect->bottom ;
DesSizeX = DestRect->right;
zoomX = DesSizeX / SrcSizeX;
@@ -659,7 +659,7 @@
/* Draw one Hline on X - Led to the Des Zoom In*/
if (DesSizeX>SrcSizeX)
{
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -670,7 +670,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -692,7 +692,7 @@
{
/* Draw one Hline on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -703,7 +703,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -728,7 +728,7 @@
if (DesSizeX>SrcSizeX)
{
/* Draw one pixel on X - Led to the Des Zoom In*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -739,7 +739,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -759,7 +759,7 @@
else
{
/* Draw one pixel on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -770,7 +770,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -797,7 +797,7 @@
/* Draw one Hline on X - Led to the Des Zoom In*/
if (DesSizeX>SrcSizeX)
{
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -808,7 +808,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -826,7 +826,7 @@
{
/* Draw one Hline on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -837,7 +837,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -859,7 +859,7 @@
if (DesSizeX>SrcSizeX)
{
/* Draw one pixel on X - Led to the Des Zoom In*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -870,7 +870,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -886,7 +886,7 @@
else
{
/* Draw one pixel on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -897,7 +897,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -921,7 +921,7 @@
/* Draw one Hline on X - Led to the Des Zoom In*/
if (DesSizeX>SrcSizeX)
{
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -932,7 +932,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -950,7 +950,7 @@
{
/* Draw one Hline on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -961,7 +961,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -983,7 +983,7 @@
if (DesSizeX>SrcSizeX)
{
/* Draw one pixel on X - Led to the Des Zoom In*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -994,7 +994,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -1010,7 +1010,7 @@
else
{
/* Draw one pixel on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1021,7 +1021,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -1050,7 +1050,7 @@
/* Draw one Hline on X - Led to the Des Zoom In*/
if (DesSizeX>SrcSizeX)
{
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1061,7 +1061,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -1079,7 +1079,7 @@
{
/* Draw one Hline on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1090,7 +1090,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -1112,7 +1112,7 @@
if (DesSizeX>SrcSizeX)
{
/* Draw one pixel on X - Led to the Des Zoom In*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1123,7 +1123,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -1139,7 +1139,7 @@
else
{
/* Draw one pixel on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1150,7 +1150,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -1174,7 +1174,7 @@
/* Draw one Hline on X - Led to the Des Zoom In*/
if (DesSizeX>SrcSizeX)
{
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1185,7 +1185,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -1203,7 +1203,7 @@
{
/* Draw one Hline on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1214,7 +1214,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -1236,7 +1236,7 @@
if (DesSizeX>SrcSizeX)
{
/* Draw one pixel on X - Led to the Des Zoom In*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1247,7 +1247,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -1263,7 +1263,7 @@
else
{
/* Draw one pixel on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1274,7 +1274,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
--- trunk/reactos/subsys/win32k/dib/dib1bpp.c 2006-01-01 16:49:53 UTC (rev 20520)
+++ trunk/reactos/subsys/win32k/dib/dib1bpp.c 2006-01-01 17:12:19 UTC (rev 20521)
@@ -518,8 +518,8 @@
int saveY;
BOOLEAN DesIsBiggerY=FALSE;
- SrcSizeY = SourceRect->bottom;
- SrcSizeX = SourceRect->right;
+ SrcSizeY = SourceRect->bottom - SourceRect->top;
+ SrcSizeX = SourceRect->right - SourceRect->left;
DesSizeY = DestRect->bottom;
DesSizeX = DestRect->right;
@@ -544,7 +544,7 @@
/* Draw one Hline on X - Led to the Des Zoom In*/
if (DesSizeX>SrcSizeX)
{
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -555,7 +555,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -576,7 +576,7 @@
{
/* Draw one Hline on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -587,7 +587,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -611,7 +611,7 @@
if (DesSizeX>SrcSizeX)
{
/* Draw one pixel on X - Led to the Des Zoom In*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -622,7 +622,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -639,7 +639,7 @@
else
{
/* Draw one pixel on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) DesSizeY * (ULONG) DesY) / ((ULONG) SrcSizeY);
@@ -650,7 +650,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -675,7 +675,7 @@
/* Draw one Hline on X - Led to the Des Zoom In*/
if (DesSizeX>SrcSizeX)
{
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -686,7 +686,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -704,7 +704,7 @@
{
/* Draw one Hline on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -715,7 +715,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -737,7 +737,7 @@
if (DesSizeX>SrcSizeX)
{
/* Draw one pixel on X - Led to the Des Zoom In*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -748,7 +748,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -764,7 +764,7 @@
else
{
/* Draw one pixel on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -775,7 +775,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -799,7 +799,7 @@
/* Draw one Hline on X - Led to the Des Zoom In*/
if (DesSizeX>SrcSizeX)
{
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -810,7 +810,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -828,7 +828,7 @@
{
/* Draw one Hline on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -839,7 +839,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -861,7 +861,7 @@
if (DesSizeX>SrcSizeX)
{
/* Draw one pixel on X - Led to the Des Zoom In*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -872,7 +872,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -888,7 +888,7 @@
else
{
/* Draw one pixel on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -899,7 +899,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -923,7 +923,7 @@
/* Draw one Hline on X - Led to the Des Zoom In*/
if (DesSizeX>SrcSizeX)
{
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -934,7 +934,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -952,7 +952,7 @@
{
/* Draw one Hline on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -963,7 +963,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -985,7 +985,7 @@
if (DesSizeX>SrcSizeX)
{
/* Draw one pixel on X - Led to the Des Zoom In*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -996,7 +996,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -1012,7 +1012,7 @@
else
{
/* Draw one pixel on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1023,7 +1023,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -1047,7 +1047,7 @@
/* Draw one Hline on X - Led to the Des Zoom In*/
if (DesSizeX>SrcSizeX)
{
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1058,7 +1058,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -1076,7 +1076,7 @@
{
/* Draw one Hline on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1087,7 +1087,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -1109,7 +1109,7 @@
if (DesSizeX>SrcSizeX)
{
/* Draw one pixel on X - Led to the Des Zoom In*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1120,7 +1120,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -1136,7 +1136,7 @@
else
{
/* Draw one pixel on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1147,7 +1147,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -1171,7 +1171,7 @@
/* Draw one Hline on X - Led to the Des Zoom In*/
if (DesSizeX>SrcSizeX)
{
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1182,7 +1182,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -1200,7 +1200,7 @@
{
/* Draw one Hline on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1211,7 +1211,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -1233,7 +1233,7 @@
if (DesSizeX>SrcSizeX)
{
/* Draw one pixel on X - Led to the Des Zoom In*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1244,7 +1244,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -1260,7 +1260,7 @@
else
{
/* Draw one pixel on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -1271,7 +1271,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
--- trunk/reactos/subsys/win32k/dib/dib24bpp.c 2006-01-01 16:49:53 UTC (rev 20520)
+++ trunk/reactos/subsys/win32k/dib/dib24bpp.c 2006-01-01 17:12:19 UTC (rev 20521)
@@ -513,10 +513,10 @@
int saveY;
BOOLEAN DesIsBiggerY=FALSE;
- SrcSizeY = SourceRect->bottom;
- SrcSizeX = SourceRect->right;
+ SrcSizeY = SourceRect->bottom - SourceRect->top;
+ SrcSizeX = SourceRect->right - SourceRect->left;
- DesSizeY = DestRect->bottom;
+ DesSizeY = DestRect->bottom ;
DesSizeX = DestRect->right;
zoomX = DesSizeX / SrcSizeX;
@@ -538,7 +538,7 @@
/* Draw one Hline on X - Led to the Des Zoom In*/
if (DesSizeX>SrcSizeX)
{
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -549,7 +549,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -571,7 +571,7 @@
{
/* Draw one Hline on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -582,7 +582,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -607,7 +607,7 @@
if (DesSizeX>SrcSizeX)
{
/* Draw one pixel on X - Led to the Des Zoom In*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -618,7 +618,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -638,7 +638,7 @@
else
{
/* Draw one pixel on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -649,7 +649,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -676,7 +676,7 @@
/* Draw one Hline on X - Led to the Des Zoom In*/
if (DesSizeX>SrcSizeX)
{
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -687,7 +687,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -705,7 +705,7 @@
{
/* Draw one Hline on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -716,7 +716,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -738,7 +738,7 @@
if (DesSizeX>SrcSizeX)
{
/* Draw one pixel on X - Led to the Des Zoom In*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -749,7 +749,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
@@ -765,7 +765,7 @@
else
{
/* Draw one pixel on X - Led to the Des Zoom Out*/
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -776,7 +776,7 @@
saveY = DesY+zoomY;
- for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
+ for (DesX=DestRect->right-zoomX; DesX>=DestRect->left; DesX-=zoomX)
{
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
@@ -800,7 +800,7 @@
/* Draw one Hline on X - Led to the Des Zoom In*/
if (DesSizeX>SrcSizeX)
{
- for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
+ for (DesY=DestRect->bottom-zoomY; DesY>=DestRect->top; DesY-=zoomY)
{
if (DesIsBiggerY)
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
@@ -811,7 +811,7 @@
saveY = DesY+zoomY;
[truncated at 1000 lines; 1483 more skipped]