Correct sizes if origin is not (0, 0)

svn path=/trunk/; revision=17709
This commit is contained in:
Gé van Geldorp 2005-09-06 23:16:18 +00:00
parent e988f9d7dc
commit cfefbb200a
6 changed files with 27 additions and 28 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;