mirror of
https://github.com/reactos/reactos.git
synced 2024-10-30 11:35:58 +00:00
88c9e7c6e8
svn path=/branches/reactos-yarotows/; revision=47117
42 lines
913 B
C
42 lines
913 B
C
/*
|
|
* PROJECT: Win32 subsystem
|
|
* LICENSE: See COPYING in the top level directory
|
|
* FILE: subsystems/win32/win32k/dib/dib32bppc.c
|
|
* PURPOSE: C language equivalents of asm optimised 32bpp functions
|
|
* PROGRAMMERS: Jason Filby
|
|
* Magnus Olsen
|
|
*/
|
|
|
|
#include <win32k.h>
|
|
|
|
#define NDEBUG
|
|
#include <debug.h>
|
|
|
|
VOID
|
|
DIB_32BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
|
|
{
|
|
PBYTE byteaddr = (PBYTE)((ULONG_PTR)SurfObj->pvScan0 + y * SurfObj->lDelta);
|
|
PDWORD addr = (PDWORD)byteaddr + x1;
|
|
LONG cx = x1;
|
|
|
|
while(cx < x2)
|
|
{
|
|
*addr = (DWORD)c;
|
|
++addr;
|
|
++cx;
|
|
}
|
|
}
|
|
|
|
BOOLEAN
|
|
DIB_32BPP_ColorFill(SURFOBJ* DestSurface, RECTL* DestRect, ULONG color)
|
|
{
|
|
ULONG DestY;
|
|
|
|
for (DestY = DestRect->top; DestY< DestRect->bottom; DestY++)
|
|
{
|
|
DIB_32BPP_HLine (DestSurface, DestRect->left, DestRect->right, DestY, color);
|
|
}
|
|
|
|
return TRUE;
|
|
}
|