mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 05:22:57 +00:00
little clean-up
svn path=/trunk/; revision=9007
This commit is contained in:
parent
54dbe4faf6
commit
d8dd152253
2 changed files with 13 additions and 9 deletions
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: dib1bpp.c,v 1.21 2004/04/07 15:37:50 weiden Exp $ */
|
/* $Id: dib1bpp.c,v 1.22 2004/04/07 16:38:27 weiden Exp $ */
|
||||||
|
|
||||||
#undef WIN32_LEAN_AND_MEAN
|
#undef WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
@ -478,10 +478,10 @@ DIB_1BPP_BitBlt(
|
||||||
Pattern = 0;
|
Pattern = 0;
|
||||||
for (k = 0; k < 8; k++)
|
for (k = 0; k < 8; k++)
|
||||||
{
|
{
|
||||||
Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k) % PatternWidth, Y % PatternHeight) << (7 - k));
|
Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k) % PatternWidth, PatternY) << (7 - k));
|
||||||
Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k + 8) % PatternWidth, Y % PatternHeight) << (8 + (7 - k)));
|
Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k + 8) % PatternWidth, PatternY) << (8 + (7 - k)));
|
||||||
Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k + 16) % PatternWidth, Y % PatternHeight) << (16 + (7 - k)));
|
Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k + 16) % PatternWidth, PatternY) << (16 + (7 - k)));
|
||||||
Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k + 24) % PatternWidth, Y % PatternHeight) << (24 + (7 - k)));
|
Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k + 24) % PatternWidth, PatternY) << (24 + (7 - k)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -503,7 +503,7 @@ DIB_1BPP_BitBlt(
|
||||||
|
|
||||||
if (UsesPattern)
|
if (UsesPattern)
|
||||||
{
|
{
|
||||||
Pattern = DIB_1BPP_GetPixel(PatternObj, X % PatternWidth, Y % PatternHeight);
|
Pattern = DIB_1BPP_GetPixel(PatternObj, X % PatternWidth, PatternY);
|
||||||
}
|
}
|
||||||
|
|
||||||
DIB_1BPP_PutPixel(DestSurf, X, Y, DIB_DoRop(Rop4, Dest, Source, Pattern) & 0xF);
|
DIB_1BPP_PutPixel(DestSurf, X, Y, DIB_DoRop(Rop4, Dest, Source, Pattern) & 0xF);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: bitblt.c,v 1.45 2004/04/06 21:53:48 weiden Exp $
|
/* $Id: bitblt.c,v 1.46 2004/04/07 16:38:27 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -114,7 +114,7 @@ BltMask(SURFOBJ* Dest,
|
||||||
PGDIBRUSHOBJ GdiBrush;
|
PGDIBRUSHOBJ GdiBrush;
|
||||||
HBITMAP PatternSurface = NULL;
|
HBITMAP PatternSurface = NULL;
|
||||||
PSURFOBJ PatternObj;
|
PSURFOBJ PatternObj;
|
||||||
ULONG PatternWidth, PatternHeight;
|
ULONG PatternWidth, PatternHeight, PatternY;
|
||||||
|
|
||||||
if (Mask == NULL)
|
if (Mask == NULL)
|
||||||
{
|
{
|
||||||
|
@ -147,6 +147,10 @@ BltMask(SURFOBJ* Dest,
|
||||||
{
|
{
|
||||||
lMask = tMask;
|
lMask = tMask;
|
||||||
c8 = SourcePoint->x & 0x07;
|
c8 = SourcePoint->x & 0x07;
|
||||||
|
|
||||||
|
if(PatternSurface)
|
||||||
|
PatternY = (DestRect->top + j) % PatternHeight;
|
||||||
|
|
||||||
for (i = 0; i < dx; i++)
|
for (i = 0; i < dx; i++)
|
||||||
{
|
{
|
||||||
if (0 != (*lMask & maskbit[c8]))
|
if (0 != (*lMask & maskbit[c8]))
|
||||||
|
@ -158,7 +162,7 @@ BltMask(SURFOBJ* Dest,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DestGDI->DIB_PutPixel(Dest, DestRect->left + i, DestRect->top + j,
|
DestGDI->DIB_PutPixel(Dest, DestRect->left + i, DestRect->top + j,
|
||||||
DIB_1BPP_GetPixel(PatternObj, (DestRect->left + i) % PatternWidth, (DestRect->top + j) % PatternHeight) ? GdiBrush->crFore : GdiBrush->crBack);
|
DIB_1BPP_GetPixel(PatternObj, (DestRect->left + i) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
c8++;
|
c8++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue