mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Small fixes to 1bpp->1bpp stretching
svn path=/trunk/; revision=18762
This commit is contained in:
parent
7a79eea045
commit
4b3bf39cbc
1 changed files with 4 additions and 4 deletions
|
@ -642,9 +642,9 @@ BOOLEAN DIB_1BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
|
||||||
for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
|
for (DesY=DestRect->bottom-zoomY; DesY>=0; DesY-=zoomY)
|
||||||
{
|
{
|
||||||
if (DesIsBiggerY)
|
if (DesIsBiggerY)
|
||||||
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
|
|
||||||
else
|
|
||||||
sy = (int) ((ULONG) DesSizeY * (ULONG) DesY) / ((ULONG) SrcSizeY);
|
sy = (int) ((ULONG) DesSizeY * (ULONG) DesY) / ((ULONG) SrcSizeY);
|
||||||
|
else
|
||||||
|
sy = (int) ((ULONG) SrcSizeY * (ULONG) DesY) / ((ULONG) DesSizeY);
|
||||||
|
|
||||||
if (sy > SourceRect->bottom) break;
|
if (sy > SourceRect->bottom) break;
|
||||||
|
|
||||||
|
@ -652,14 +652,14 @@ BOOLEAN DIB_1BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
|
||||||
|
|
||||||
for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
|
for (DesX=DestRect->right-zoomX; DesX>=0; DesX-=zoomX)
|
||||||
{
|
{
|
||||||
sx = (int) ((ULONG) DesSizeX * (ULONG) DesX) / ((ULONG) SrcSizeX);
|
sx = (int) ((ULONG) SrcSizeX * (ULONG) DesX) / ((ULONG) DesSizeX);
|
||||||
|
|
||||||
if (sx > SourceRect->right) break;
|
if (sx > SourceRect->right) break;
|
||||||
|
|
||||||
color = DIB_1BPP_GetPixel(SourceSurf, sx, sy);
|
color = DIB_1BPP_GetPixel(SourceSurf, sx, sy);
|
||||||
|
|
||||||
for (count=DesY;count<saveY;count++)
|
for (count=DesY;count<saveY;count++)
|
||||||
DIB_1BPP_HLine(DestSurf, DesX, saveX, count, color);
|
DIB_1BPP_HLine(DestSurf, DesX, DesX + zoomX, count, color);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue