mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Correct sizes if origin is not (0, 0)
svn path=/trunk/; revision=17709
This commit is contained in:
parent
e988f9d7dc
commit
cfefbb200a
6 changed files with 27 additions and 28 deletions
|
@ -630,11 +630,11 @@ BOOLEAN DIB_16BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
|
|||
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;
|
||||
DesSizeX = DestRect->right;
|
||||
DesSizeY = DestRect->bottom - DestRect->top;
|
||||
DesSizeX = DestRect->right - DestRect->left;
|
||||
|
||||
zoomX = DesSizeX / SrcSizeX;
|
||||
if (zoomX==0) zoomX=1;
|
||||
|
|
|
@ -518,11 +518,11 @@ BOOLEAN DIB_1BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
|
|||
int saveY;
|
||||
BOOLEAN DesIsBiggerY=FALSE;
|
||||
|
||||
SrcSizeY = SourceRect->bottom;
|
||||
SrcSizeX = SourceRect->right;
|
||||
|
||||
DesSizeY = DestRect->bottom;
|
||||
DesSizeX = DestRect->right;
|
||||
SrcSizeY = SourceRect->bottom - SourceRect->top;
|
||||
SrcSizeX = SourceRect->right - SourceRect->left;
|
||||
|
||||
DesSizeY = DestRect->bottom - DestRect->top;
|
||||
DesSizeX = DestRect->right - DestRect->left;
|
||||
|
||||
zoomX = DesSizeX / SrcSizeX;
|
||||
if (zoomX==0) zoomX=1;
|
||||
|
|
|
@ -513,11 +513,11 @@ BOOLEAN DIB_24BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
|
|||
int saveY;
|
||||
BOOLEAN DesIsBiggerY=FALSE;
|
||||
|
||||
SrcSizeY = SourceRect->bottom;
|
||||
SrcSizeX = SourceRect->right;
|
||||
|
||||
DesSizeY = DestRect->bottom;
|
||||
DesSizeX = DestRect->right;
|
||||
SrcSizeY = SourceRect->bottom - SourceRect->top;
|
||||
SrcSizeX = SourceRect->right - SourceRect->left;
|
||||
|
||||
DesSizeY = DestRect->bottom - DestRect->top;
|
||||
DesSizeX = DestRect->right - DestRect->left;
|
||||
|
||||
zoomX = DesSizeX / SrcSizeX;
|
||||
if (zoomX==0) zoomX=1;
|
||||
|
|
|
@ -557,11 +557,11 @@ BOOLEAN DIB_32BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
|
|||
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;
|
||||
DesSizeX = DestRect->right;
|
||||
DesSizeY = DestRect->bottom - DestRect->top;
|
||||
DesSizeX = DestRect->right - DestRect->left;
|
||||
|
||||
zoomX = DesSizeX / SrcSizeX;
|
||||
if (zoomX==0) zoomX=1;
|
||||
|
|
|
@ -397,12 +397,11 @@ BOOLEAN DIB_4BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
|
|||
int saveY;
|
||||
BOOLEAN DesIsBiggerY=FALSE;
|
||||
|
||||
SrcSizeY = SourceRect->bottom - SourceRect->top;
|
||||
SrcSizeX = SourceRect->right - SourceRect->left;
|
||||
|
||||
SrcSizeY = SourceRect->bottom;
|
||||
SrcSizeX = SourceRect->right;
|
||||
|
||||
DesSizeY = DestRect->bottom;
|
||||
DesSizeX = DestRect->right;
|
||||
DesSizeY = DestRect->bottom - DestRect->top;
|
||||
DesSizeX = DestRect->right - DestRect->left;
|
||||
|
||||
zoomX = DesSizeX / SrcSizeX;
|
||||
if (zoomX==0) zoomX=1;
|
||||
|
|
|
@ -480,11 +480,11 @@ BOOLEAN DIB_8BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
|
|||
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;
|
||||
|
||||
DesSizeY = DestRect->bottom;
|
||||
DesSizeX = DestRect->right;
|
||||
SrcSizeY = SourceRect->bottom - SourceRect->top;
|
||||
SrcSizeX = SourceRect->right - SourceRect->left;
|
||||
|
||||
DesSizeY = DestRect->bottom - DestRect->top;
|
||||
DesSizeX = DestRect->right - DestRect->left;
|
||||
|
||||
zoomX = DesSizeX / SrcSizeX;
|
||||
if (zoomX==0) zoomX=1;
|
||||
|
|
Loading…
Reference in a new issue