libfreerdp-gdi: optimize multi-byte pixel blitting
This commit is contained in:
parent
b651a49b03
commit
dd4923a770
1
.gitignore
vendored
1
.gitignore
vendored
@ -38,3 +38,4 @@ cunit/test_freerdp
|
||||
client/X11/xfreerdp
|
||||
client/test/freerdp-test
|
||||
client/DirectFB/dfreerdp
|
||||
server/test/freerdp-server-test
|
||||
|
@ -301,20 +301,17 @@ const uint32 rop3_code_table[] =
|
||||
|
||||
/* GDI Helper Functions */
|
||||
|
||||
uint32
|
||||
gdi_rop3_code(uint8 code)
|
||||
inline uint32 gdi_rop3_code(uint8 code)
|
||||
{
|
||||
return rop3_code_table[code];
|
||||
}
|
||||
|
||||
void
|
||||
gdi_copy_mem(uint8 * d, uint8 * s, int n)
|
||||
inline void gdi_copy_mem(uint8 * d, uint8 * s, int n)
|
||||
{
|
||||
memcpy(d, s, n);
|
||||
}
|
||||
|
||||
void
|
||||
gdi_copy_mem_backwards(uint8 * d, uint8 * s, int n)
|
||||
inline void gdi_copy_mem_backwards(uint8 * d, uint8 * s, int n)
|
||||
{
|
||||
d = (d + n) - 1;
|
||||
s = (s + n) - 1;
|
||||
@ -339,8 +336,7 @@ gdi_copy_mem_backwards(uint8 * d, uint8 * s, int n)
|
||||
}
|
||||
}
|
||||
|
||||
uint8*
|
||||
gdi_get_bitmap_pointer(HGDI_DC hdcBmp, int x, int y)
|
||||
inline uint8* gdi_get_bitmap_pointer(HGDI_DC hdcBmp, int x, int y)
|
||||
{
|
||||
uint8 * p;
|
||||
HGDI_BITMAP hBmp = (HGDI_BITMAP) hdcBmp->selectedObject;
|
||||
@ -357,8 +353,7 @@ gdi_get_bitmap_pointer(HGDI_DC hdcBmp, int x, int y)
|
||||
}
|
||||
}
|
||||
|
||||
uint8*
|
||||
gdi_get_brush_pointer(HGDI_DC hdcBrush, int x, int y)
|
||||
inline uint8* gdi_get_brush_pointer(HGDI_DC hdcBrush, int x, int y)
|
||||
{
|
||||
uint8 * p;
|
||||
|
||||
@ -382,8 +377,7 @@ gdi_get_brush_pointer(HGDI_DC hdcBrush, int x, int y)
|
||||
return p;
|
||||
}
|
||||
|
||||
int
|
||||
gdi_is_mono_pixel_set(uint8* data, int x, int y, int width)
|
||||
inline int gdi_is_mono_pixel_set(uint8* data, int x, int y, int width)
|
||||
{
|
||||
int byte;
|
||||
int shift;
|
||||
@ -395,8 +389,7 @@ gdi_is_mono_pixel_set(uint8* data, int x, int y, int width)
|
||||
return (data[byte] & (0x80 >> shift)) != 0;
|
||||
}
|
||||
|
||||
HGDI_BITMAP
|
||||
gdi_create_bitmap(GDI* gdi, int width, int height, int bpp, uint8* data)
|
||||
HGDI_BITMAP gdi_create_bitmap(GDI* gdi, int width, int height, int bpp, uint8* data)
|
||||
{
|
||||
uint8* bmpData;
|
||||
HGDI_BITMAP bitmap;
|
||||
@ -407,8 +400,7 @@ gdi_create_bitmap(GDI* gdi, int width, int height, int bpp, uint8* data)
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
GDI_IMAGE*
|
||||
gdi_bitmap_new(GDI *gdi, int width, int height, int bpp, uint8* data)
|
||||
GDI_IMAGE* gdi_bitmap_new(GDI *gdi, int width, int height, int bpp, uint8* data)
|
||||
{
|
||||
GDI_IMAGE *gdi_bmp;
|
||||
|
||||
@ -432,8 +424,7 @@ gdi_bitmap_new(GDI *gdi, int width, int height, int bpp, uint8* data)
|
||||
return gdi_bmp;
|
||||
}
|
||||
|
||||
void
|
||||
gdi_bitmap_free(GDI_IMAGE *gdi_bmp)
|
||||
void gdi_bitmap_free(GDI_IMAGE *gdi_bmp)
|
||||
{
|
||||
if (gdi_bmp != 0)
|
||||
{
|
||||
|
@ -102,7 +102,7 @@ int FillRect_16bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr)
|
||||
static int BitBlt_BLACKNESS_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int y;
|
||||
uint8 *dstp;
|
||||
uint8* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -118,7 +118,7 @@ static int BitBlt_BLACKNESS_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
static int BitBlt_WHITENESS_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int y;
|
||||
uint8 *dstp;
|
||||
uint8* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -134,8 +134,8 @@ static int BitBlt_WHITENESS_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
static int BitBlt_SRCCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8* srcp;
|
||||
uint8* dstp;
|
||||
|
||||
if ((hdcDest->selectedObject != hdcSrc->selectedObject) ||
|
||||
gdi_CopyOverlap(nXDest, nYDest, nWidth, nHeight, nXSrc, nYSrc) == 0)
|
||||
@ -203,13 +203,13 @@ static int BitBlt_SRCCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
|
||||
static int BitBlt_NOTSRCCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint16* srcp;
|
||||
uint16* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -218,10 +218,6 @@ static int BitBlt_NOTSRCCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int
|
||||
*dstp = ~(*srcp);
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = ~(*srcp);
|
||||
srcp++;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -232,11 +228,11 @@ static int BitBlt_NOTSRCCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int
|
||||
static int BitBlt_DSTINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *dstp;
|
||||
uint16* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -244,9 +240,6 @@ static int BitBlt_DSTINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
{
|
||||
*dstp = ~(*dstp);
|
||||
dstp++;
|
||||
|
||||
*dstp = ~(*dstp);
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -257,13 +250,13 @@ static int BitBlt_DSTINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
static int BitBlt_SRCERASE_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint16* srcp;
|
||||
uint16* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -272,10 +265,6 @@ static int BitBlt_SRCERASE_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
|
||||
*dstp = *srcp & ~(*dstp);
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *srcp & ~(*dstp);
|
||||
srcp++;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -286,13 +275,13 @@ static int BitBlt_SRCERASE_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
|
||||
static int BitBlt_NOTSRCERASE_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint16* srcp;
|
||||
uint16* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -301,10 +290,6 @@ static int BitBlt_NOTSRCERASE_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int
|
||||
*dstp = ~(*srcp) & ~(*dstp);
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = ~(*srcp) & ~(*dstp);
|
||||
srcp++;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -315,13 +300,13 @@ static int BitBlt_NOTSRCERASE_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int
|
||||
static int BitBlt_SRCINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint16* srcp;
|
||||
uint16* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -330,10 +315,6 @@ static int BitBlt_SRCINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
*dstp ^= *srcp;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp ^= *srcp;
|
||||
srcp++;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -344,13 +325,13 @@ static int BitBlt_SRCINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
static int BitBlt_SRCAND_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint16* srcp;
|
||||
uint16* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -359,10 +340,6 @@ static int BitBlt_SRCAND_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid
|
||||
*dstp &= *srcp;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp &= *srcp;
|
||||
srcp++;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -373,13 +350,13 @@ static int BitBlt_SRCAND_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid
|
||||
static int BitBlt_SRCPAINT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint16* srcp;
|
||||
uint16* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -388,10 +365,6 @@ static int BitBlt_SRCPAINT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
|
||||
*dstp |= *srcp;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp |= *srcp;
|
||||
srcp++;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -402,9 +375,9 @@ static int BitBlt_SRCPAINT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
|
||||
static int BitBlt_DSPDxax_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint16* srcp;
|
||||
uint16* dstp;
|
||||
uint16* patp;
|
||||
uint16 color16;
|
||||
HGDI_BITMAP hSrcBmp;
|
||||
|
||||
@ -414,7 +387,7 @@ static int BitBlt_DSPDxax_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
|
||||
color16 = gdi_get_color_16bpp(hdcDest, hdcDest->textColor);
|
||||
|
||||
hSrcBmp = (HGDI_BITMAP) hdcSrc->selectedObject;
|
||||
srcp = hSrcBmp->data;
|
||||
srcp = (uint16*) hSrcBmp->data;
|
||||
|
||||
if (hdcSrc->bytesPerPixel != 1)
|
||||
{
|
||||
@ -424,23 +397,17 @@ static int BitBlt_DSPDxax_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
patp = (uint8*) &color16;
|
||||
|
||||
patp = (uint16*) &color16;
|
||||
*dstp = (*srcp & *patp) | (~(*srcp) & *dstp);
|
||||
dstp++;
|
||||
patp++;
|
||||
|
||||
*dstp = (*srcp & *patp) | (~(*srcp) & *dstp);
|
||||
dstp++;
|
||||
patp++;
|
||||
srcp++;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -451,28 +418,21 @@ static int BitBlt_DSPDxax_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
|
||||
static int BitBlt_SPna_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint16* srcp;
|
||||
uint16* dstp;
|
||||
uint16* patp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
patp = gdi_get_brush_pointer(hdcDest, x, y);
|
||||
|
||||
patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y);
|
||||
*dstp = *srcp & ~(*patp);
|
||||
patp++;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *srcp & ~(*patp);
|
||||
patp++;
|
||||
srcp++;
|
||||
dstp++;
|
||||
}
|
||||
@ -485,25 +445,19 @@ static int BitBlt_SPna_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth
|
||||
static int BitBlt_PDxn_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint16* dstp;
|
||||
uint16* patp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
patp = gdi_get_brush_pointer(hdcDest, x, y);
|
||||
|
||||
patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y);
|
||||
*dstp = *dstp ^ ~(*patp);
|
||||
patp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *dstp ^ ~(*patp);
|
||||
patp++;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
@ -515,13 +469,13 @@ static int BitBlt_PDxn_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth
|
||||
static int BitBlt_DSna_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint16* srcp;
|
||||
uint16* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -530,10 +484,6 @@ static int BitBlt_DSna_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth
|
||||
*dstp = ~(*srcp) & (*dstp);
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = ~(*srcp) & (*dstp);
|
||||
srcp++;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -545,28 +495,21 @@ static int BitBlt_DSna_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth
|
||||
static int BitBlt_MERGECOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint16* srcp;
|
||||
uint16* dstp;
|
||||
uint16* patp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
patp = gdi_get_brush_pointer(hdcDest, x, y);
|
||||
|
||||
patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y);
|
||||
*dstp = *srcp & *patp;
|
||||
patp++;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *srcp & *patp;
|
||||
patp++;
|
||||
srcp++;
|
||||
dstp++;
|
||||
}
|
||||
@ -579,13 +522,13 @@ static int BitBlt_MERGECOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
static int BitBlt_MERGEPAINT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint16* srcp;
|
||||
uint16* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -594,10 +537,6 @@ static int BitBlt_MERGEPAINT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int
|
||||
*dstp = ~(*srcp) | *dstp;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = ~(*srcp) | *dstp;
|
||||
srcp++;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -608,10 +547,9 @@ static int BitBlt_MERGEPAINT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int
|
||||
static int BitBlt_PATCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint16* dstp;
|
||||
uint16* patp;
|
||||
uint16 color16;
|
||||
uint16 *dstp16;
|
||||
|
||||
if(hdcDest->brush->style == GDI_BS_SOLID)
|
||||
{
|
||||
@ -619,14 +557,14 @@ static int BitBlt_PATCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
dstp16 = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp16 != 0)
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
*dstp16 = color16;
|
||||
dstp16++;
|
||||
*dstp = color16;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -635,20 +573,14 @@ static int BitBlt_PATCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
|
||||
{
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
patp = gdi_get_brush_pointer(hdcDest, x, y);
|
||||
|
||||
patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y);
|
||||
*dstp = *patp;
|
||||
patp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *patp;
|
||||
patp++;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
@ -661,10 +593,9 @@ static int BitBlt_PATCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
|
||||
static int BitBlt_PATINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint16* dstp;
|
||||
uint16* patp;
|
||||
uint16 color16;
|
||||
uint16 *dstp16;
|
||||
|
||||
if(hdcDest->brush->style == GDI_BS_SOLID)
|
||||
{
|
||||
@ -672,14 +603,14 @@ static int BitBlt_PATINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
dstp16 = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp16 != 0)
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
*dstp16 ^= color16;
|
||||
dstp16++;
|
||||
*dstp ^= color16;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -688,20 +619,14 @@ static int BitBlt_PATINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
{
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
patp = gdi_get_brush_pointer(hdcDest, x, y);
|
||||
|
||||
patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y);
|
||||
*dstp = *patp ^ *dstp;
|
||||
patp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *patp ^ *dstp;
|
||||
patp++;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
@ -714,28 +639,21 @@ static int BitBlt_PATINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
static int BitBlt_PATPAINT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint16* srcp;
|
||||
uint16* dstp;
|
||||
uint16* patp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
patp = gdi_get_brush_pointer(hdcDest, x, y);
|
||||
|
||||
patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y);
|
||||
*dstp = *dstp | (*patp | ~(*srcp));
|
||||
patp++;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *dstp | (*patp | ~(*srcp));
|
||||
patp++;
|
||||
srcp++;
|
||||
dstp++;
|
||||
}
|
||||
@ -881,96 +799,96 @@ int PatBlt_16bpp(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, i
|
||||
return 1;
|
||||
}
|
||||
|
||||
void SetPixel_BLACK_16bpp(uint16 *pixel, uint16 *pen)
|
||||
inline void SetPixel_BLACK_16bpp(uint16 *pixel, uint16 *pen)
|
||||
{
|
||||
/* D = 0 */
|
||||
*pixel = 0;
|
||||
}
|
||||
|
||||
void SetPixel_NOTMERGEPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
inline void SetPixel_NOTMERGEPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
{
|
||||
/* D = ~(D | P) */
|
||||
*pixel = ~(*pixel | *pen);
|
||||
}
|
||||
|
||||
void SetPixel_MASKNOTPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
inline void SetPixel_MASKNOTPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
{
|
||||
/* D = D & ~P */
|
||||
*pixel &= ~(*pen);
|
||||
}
|
||||
|
||||
void SetPixel_NOTCOPYPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
inline void SetPixel_NOTCOPYPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
{
|
||||
/* D = ~P */
|
||||
*pixel = ~(*pen);
|
||||
}
|
||||
|
||||
void SetPixel_MASKPENNOT_16bpp(uint16 *pixel, uint16 *pen)
|
||||
inline void SetPixel_MASKPENNOT_16bpp(uint16 *pixel, uint16 *pen)
|
||||
{
|
||||
/* D = P & ~D */
|
||||
*pixel = *pen & ~*pixel;
|
||||
}
|
||||
|
||||
void SetPixel_NOT_16bpp(uint16 *pixel, uint16 *pen)
|
||||
inline void SetPixel_NOT_16bpp(uint16 *pixel, uint16 *pen)
|
||||
{
|
||||
/* D = ~D */
|
||||
*pixel = ~(*pixel);
|
||||
}
|
||||
|
||||
void SetPixel_XORPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
inline void SetPixel_XORPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
{
|
||||
/* D = D ^ P */
|
||||
*pixel = *pixel ^ *pen;
|
||||
}
|
||||
|
||||
void SetPixel_NOTMASKPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
inline void SetPixel_NOTMASKPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
{
|
||||
/* D = ~(D & P) */
|
||||
*pixel = ~(*pixel & *pen);
|
||||
}
|
||||
|
||||
void SetPixel_MASKPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
inline void SetPixel_MASKPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
{
|
||||
/* D = D & P */
|
||||
*pixel &= *pen;
|
||||
}
|
||||
|
||||
void SetPixel_NOTXORPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
inline void SetPixel_NOTXORPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
{
|
||||
/* D = ~(D ^ P) */
|
||||
*pixel = ~(*pixel ^ *pen);
|
||||
}
|
||||
|
||||
void SetPixel_NOP_16bpp(uint16 *pixel, uint16 *pen)
|
||||
inline void SetPixel_NOP_16bpp(uint16 *pixel, uint16 *pen)
|
||||
{
|
||||
/* D = D */
|
||||
}
|
||||
|
||||
void SetPixel_MERGENOTPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
inline void SetPixel_MERGENOTPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
{
|
||||
/* D = D | ~P */
|
||||
*pixel |= ~(*pen);
|
||||
}
|
||||
|
||||
void SetPixel_COPYPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
inline void SetPixel_COPYPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
{
|
||||
/* D = P */
|
||||
*pixel = *pen;
|
||||
}
|
||||
|
||||
void SetPixel_MERGEPENNOT_16bpp(uint16 *pixel, uint16 *pen)
|
||||
inline void SetPixel_MERGEPENNOT_16bpp(uint16 *pixel, uint16 *pen)
|
||||
{
|
||||
/* D = P | ~D */
|
||||
*pixel = *pen | ~(*pixel);
|
||||
}
|
||||
|
||||
void SetPixel_MERGEPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
inline void SetPixel_MERGEPEN_16bpp(uint16 *pixel, uint16 *pen)
|
||||
{
|
||||
/* D = P | D */
|
||||
*pixel |= *pen;
|
||||
}
|
||||
|
||||
void SetPixel_WHITE_16bpp(uint16 *pixel, uint16 *pen)
|
||||
inline void SetPixel_WHITE_16bpp(uint16 *pixel, uint16 *pen)
|
||||
{
|
||||
/* D = 1 */
|
||||
*pixel = 0xFFFF;
|
||||
|
@ -90,7 +90,7 @@ static int BitBlt_BLACKNESS_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
if (hdcDest->alpha)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *dstp;
|
||||
uint8* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -118,7 +118,7 @@ static int BitBlt_BLACKNESS_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
else
|
||||
{
|
||||
int y;
|
||||
uint8 *dstp;
|
||||
uint8* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -135,7 +135,7 @@ static int BitBlt_BLACKNESS_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
static int BitBlt_WHITENESS_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int y;
|
||||
uint8 *dstp;
|
||||
uint8* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -151,8 +151,8 @@ static int BitBlt_WHITENESS_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
static int BitBlt_SRCCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8* srcp;
|
||||
uint8* dstp;
|
||||
|
||||
if ((hdcDest->selectedObject != hdcSrc->selectedObject) ||
|
||||
gdi_CopyOverlap(nXDest, nYDest, nWidth, nHeight, nXSrc, nYSrc) == 0)
|
||||
@ -220,13 +220,13 @@ static int BitBlt_SRCCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
|
||||
static int BitBlt_NOTSRCCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint32* srcp;
|
||||
uint32* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -235,14 +235,6 @@ static int BitBlt_NOTSRCCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int
|
||||
*dstp = ~(*srcp);
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = ~(*srcp);
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = ~(*srcp);
|
||||
srcp += 2;
|
||||
dstp += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -253,11 +245,11 @@ static int BitBlt_NOTSRCCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int
|
||||
static int BitBlt_DSTINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *dstp;
|
||||
uint32* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -265,12 +257,6 @@ static int BitBlt_DSTINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
{
|
||||
*dstp = ~(*dstp);
|
||||
dstp++;
|
||||
|
||||
*dstp = ~(*dstp);
|
||||
dstp++;
|
||||
|
||||
*dstp = ~(*dstp);
|
||||
dstp += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -281,13 +267,13 @@ static int BitBlt_DSTINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
static int BitBlt_SRCERASE_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint32* srcp;
|
||||
uint32* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -296,14 +282,6 @@ static int BitBlt_SRCERASE_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
|
||||
*dstp = *srcp & ~(*dstp);
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *srcp & ~(*dstp);
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *srcp & ~(*dstp);
|
||||
srcp += 2;
|
||||
dstp += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -314,13 +292,13 @@ static int BitBlt_SRCERASE_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
|
||||
static int BitBlt_NOTSRCERASE_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint32* srcp;
|
||||
uint32* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -329,14 +307,6 @@ static int BitBlt_NOTSRCERASE_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int
|
||||
*dstp = ~(*srcp) & ~(*dstp);
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = ~(*srcp) & ~(*dstp);
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = ~(*srcp) & ~(*dstp);
|
||||
srcp += 2;
|
||||
dstp += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -347,13 +317,13 @@ static int BitBlt_NOTSRCERASE_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int
|
||||
static int BitBlt_SRCINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint32* srcp;
|
||||
uint32* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -362,14 +332,6 @@ static int BitBlt_SRCINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
*dstp ^= *srcp;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp ^= *srcp;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp ^= *srcp;
|
||||
srcp += 2;
|
||||
dstp += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -380,13 +342,13 @@ static int BitBlt_SRCINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
static int BitBlt_SRCAND_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint32* srcp;
|
||||
uint32* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -395,14 +357,6 @@ static int BitBlt_SRCAND_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid
|
||||
*dstp &= *srcp;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp &= *srcp;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp &= *srcp;
|
||||
srcp += 2;
|
||||
dstp += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -413,13 +367,13 @@ static int BitBlt_SRCAND_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid
|
||||
static int BitBlt_SRCPAINT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint32* srcp;
|
||||
uint32* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -428,14 +382,6 @@ static int BitBlt_SRCPAINT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
|
||||
*dstp |= *srcp;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp |= *srcp;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp |= *srcp;
|
||||
srcp += 2;
|
||||
dstp += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -446,9 +392,9 @@ static int BitBlt_SRCPAINT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
|
||||
static int BitBlt_DSPDxax_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint8* srcp;
|
||||
uint8* dstp;
|
||||
uint8* patp;
|
||||
uint32 color32;
|
||||
HGDI_BITMAP hSrcBmp;
|
||||
|
||||
@ -498,34 +444,24 @@ static int BitBlt_DSPDxax_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
|
||||
static int BitBlt_SPna_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint32* srcp;
|
||||
uint32* dstp;
|
||||
uint32* patp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
patp = gdi_get_brush_pointer(hdcDest, x, y);
|
||||
patp = (uint32*) gdi_get_brush_pointer(hdcDest, x, y);
|
||||
|
||||
*dstp = *srcp & ~(*patp);
|
||||
patp++;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *srcp & ~(*patp);
|
||||
patp++;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *srcp & ~(*patp);
|
||||
srcp += 2;
|
||||
dstp += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -536,13 +472,13 @@ static int BitBlt_SPna_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth
|
||||
static int BitBlt_DSna_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint32* srcp;
|
||||
uint32* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -551,14 +487,6 @@ static int BitBlt_DSna_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth
|
||||
*dstp = ~(*srcp) & (*dstp);
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = ~(*srcp) & (*dstp);
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = ~(*srcp) & (*dstp);
|
||||
srcp += 2;
|
||||
dstp += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -569,29 +497,21 @@ static int BitBlt_DSna_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth
|
||||
static int BitBlt_PDxn_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint32* dstp;
|
||||
uint32* patp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
patp = gdi_get_brush_pointer(hdcDest, x, y);
|
||||
patp = (uint32*) gdi_get_brush_pointer(hdcDest, x, y);
|
||||
|
||||
*dstp = *dstp ^ ~(*patp);
|
||||
patp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *dstp ^ ~(*patp);
|
||||
patp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *dstp ^ ~(*patp);
|
||||
dstp += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -602,34 +522,24 @@ static int BitBlt_PDxn_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth
|
||||
static int BitBlt_MERGECOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint32* srcp;
|
||||
uint32* dstp;
|
||||
uint32* patp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
patp = gdi_get_brush_pointer(hdcDest, x, y);
|
||||
patp = (uint32*) gdi_get_brush_pointer(hdcDest, x, y);
|
||||
|
||||
*dstp = *srcp & *patp;
|
||||
patp++;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *srcp & *patp;
|
||||
patp++;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *srcp & *patp;
|
||||
dstp += 2;
|
||||
srcp += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -640,13 +550,13 @@ static int BitBlt_MERGECOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
static int BitBlt_MERGEPAINT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint32* srcp;
|
||||
uint32* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
@ -655,14 +565,6 @@ static int BitBlt_MERGEPAINT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int
|
||||
*dstp = ~(*srcp) | *dstp;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = ~(*srcp) | *dstp;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = ~(*srcp) | *dstp;
|
||||
dstp += 2;
|
||||
srcp += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -673,10 +575,9 @@ static int BitBlt_MERGEPAINT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int
|
||||
static int BitBlt_PATCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint32* dstp;
|
||||
uint32* patp;
|
||||
uint32 color32;
|
||||
uint32 *dstp32;
|
||||
|
||||
if(hdcDest->brush->style == GDI_BS_SOLID)
|
||||
{
|
||||
@ -684,14 +585,14 @@ static int BitBlt_PATCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
dstp32 = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp32 != 0)
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
*dstp32 = color32;
|
||||
dstp32++;
|
||||
*dstp = color32;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -700,24 +601,15 @@ static int BitBlt_PATCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
|
||||
{
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
patp = gdi_get_brush_pointer(hdcDest, x, y);
|
||||
|
||||
patp = (uint32*) gdi_get_brush_pointer(hdcDest, x, y);
|
||||
*dstp = *patp;
|
||||
patp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *patp;
|
||||
patp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *patp;
|
||||
dstp += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -729,10 +621,9 @@ static int BitBlt_PATCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
|
||||
static int BitBlt_PATINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint32* dstp;
|
||||
uint32* patp;
|
||||
uint32 color32;
|
||||
uint32 *dstp32;
|
||||
|
||||
if(hdcDest->brush->style == GDI_BS_SOLID)
|
||||
{
|
||||
@ -740,14 +631,14 @@ static int BitBlt_PATINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
dstp32 = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp32 != 0)
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
*dstp32 ^= color32;
|
||||
dstp32++;
|
||||
*dstp ^= color32;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -756,24 +647,15 @@ static int BitBlt_PATINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
{
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
patp = gdi_get_brush_pointer(hdcDest, x, y);
|
||||
|
||||
patp = (uint32*) gdi_get_brush_pointer(hdcDest, x, y);
|
||||
*dstp = *patp ^ *dstp;
|
||||
patp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *patp ^ *dstp;
|
||||
patp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *patp ^ *dstp;
|
||||
dstp += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -785,34 +667,23 @@ static int BitBlt_PATINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
static int BitBlt_PATPAINT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint32* srcp;
|
||||
uint32* dstp;
|
||||
uint32* patp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
patp = gdi_get_brush_pointer(hdcDest, x, y);
|
||||
|
||||
patp = (uint32*) gdi_get_brush_pointer(hdcDest, x, y);
|
||||
*dstp = *dstp | (*patp | ~(*srcp));
|
||||
patp++;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *dstp | (*patp | ~(*srcp));
|
||||
patp++;
|
||||
srcp++;
|
||||
dstp++;
|
||||
|
||||
*dstp = *dstp | (*patp | ~(*srcp));
|
||||
dstp += 2;
|
||||
srcp += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -956,96 +827,96 @@ int PatBlt_32bpp(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, i
|
||||
return 1;
|
||||
}
|
||||
|
||||
void SetPixel_BLACK_32bpp(uint32 *pixel, uint32 *pen)
|
||||
inline void SetPixel_BLACK_32bpp(uint32 *pixel, uint32 *pen)
|
||||
{
|
||||
/* D = 0 */
|
||||
*pixel = 0;
|
||||
}
|
||||
|
||||
void SetPixel_NOTMERGEPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
inline void SetPixel_NOTMERGEPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
{
|
||||
/* D = ~(D | P) */
|
||||
*pixel = ~(*pixel | *pen);
|
||||
}
|
||||
|
||||
void SetPixel_MASKNOTPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
inline void SetPixel_MASKNOTPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
{
|
||||
/* D = D & ~P */
|
||||
*pixel &= ~(*pen);
|
||||
}
|
||||
|
||||
void SetPixel_NOTCOPYPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
inline void SetPixel_NOTCOPYPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
{
|
||||
/* D = ~P */
|
||||
*pixel = ~(*pen);
|
||||
}
|
||||
|
||||
void SetPixel_MASKPENNOT_32bpp(uint32 *pixel, uint32 *pen)
|
||||
inline void SetPixel_MASKPENNOT_32bpp(uint32 *pixel, uint32 *pen)
|
||||
{
|
||||
/* D = P & ~D */
|
||||
*pixel = *pen & ~*pixel;
|
||||
}
|
||||
|
||||
void SetPixel_NOT_32bpp(uint32 *pixel, uint32 *pen)
|
||||
inline void SetPixel_NOT_32bpp(uint32 *pixel, uint32 *pen)
|
||||
{
|
||||
/* D = ~D */
|
||||
*pixel = ~(*pixel);
|
||||
}
|
||||
|
||||
void SetPixel_XORPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
inline void SetPixel_XORPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
{
|
||||
/* D = D ^ P */
|
||||
*pixel = *pixel ^ *pen;
|
||||
}
|
||||
|
||||
void SetPixel_NOTMASKPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
inline void SetPixel_NOTMASKPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
{
|
||||
/* D = ~(D & P) */
|
||||
*pixel = ~(*pixel & *pen);
|
||||
}
|
||||
|
||||
void SetPixel_MASKPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
inline void SetPixel_MASKPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
{
|
||||
/* D = D & P */
|
||||
*pixel &= *pen;
|
||||
}
|
||||
|
||||
void SetPixel_NOTXORPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
inline void SetPixel_NOTXORPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
{
|
||||
/* D = ~(D ^ P) */
|
||||
*pixel = ~(*pixel ^ *pen);
|
||||
}
|
||||
|
||||
void SetPixel_NOP_32bpp(uint32 *pixel, uint32 *pen)
|
||||
inline void SetPixel_NOP_32bpp(uint32 *pixel, uint32 *pen)
|
||||
{
|
||||
/* D = D */
|
||||
}
|
||||
|
||||
void SetPixel_MERGENOTPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
inline void SetPixel_MERGENOTPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
{
|
||||
/* D = D | ~P */
|
||||
*pixel |= ~(*pen);
|
||||
}
|
||||
|
||||
void SetPixel_COPYPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
inline void SetPixel_COPYPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
{
|
||||
/* D = P */
|
||||
*pixel = *pen;
|
||||
}
|
||||
|
||||
void SetPixel_MERGEPENNOT_32bpp(uint32 *pixel, uint32 *pen)
|
||||
inline void SetPixel_MERGEPENNOT_32bpp(uint32 *pixel, uint32 *pen)
|
||||
{
|
||||
/* D = P | ~D */
|
||||
*pixel = *pen | ~(*pixel);
|
||||
}
|
||||
|
||||
void SetPixel_MERGEPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
inline void SetPixel_MERGEPEN_32bpp(uint32 *pixel, uint32 *pen)
|
||||
{
|
||||
/* D = P | D */
|
||||
*pixel |= *pen;
|
||||
}
|
||||
|
||||
void SetPixel_WHITE_32bpp(uint32 *pixel, uint32 *pen)
|
||||
inline void SetPixel_WHITE_32bpp(uint32 *pixel, uint32 *pen)
|
||||
{
|
||||
/* D = 1 */
|
||||
*pixel = 0xFFFFFF;
|
||||
|
@ -41,7 +41,7 @@ int FillRect_8bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr)
|
||||
static int BitBlt_BLACKNESS_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int y;
|
||||
uint8 *dstp;
|
||||
uint8* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -57,7 +57,7 @@ static int BitBlt_BLACKNESS_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
|
||||
static int BitBlt_WHITENESS_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int y;
|
||||
uint8 *dstp;
|
||||
uint8* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -73,8 +73,8 @@ static int BitBlt_WHITENESS_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
|
||||
static int BitBlt_SRCCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8* srcp;
|
||||
uint8* dstp;
|
||||
|
||||
if ((hdcDest->selectedObject != hdcSrc->selectedObject) ||
|
||||
gdi_CopyOverlap(nXDest, nYDest, nWidth, nHeight, nXSrc, nYSrc) == 0)
|
||||
@ -142,8 +142,8 @@ static int BitBlt_SRCCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid
|
||||
static int BitBlt_NOTSRCCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8* srcp;
|
||||
uint8* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -167,7 +167,7 @@ static int BitBlt_NOTSRCCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
static int BitBlt_DSTINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *dstp;
|
||||
uint8* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -189,8 +189,8 @@ static int BitBlt_DSTINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
|
||||
static int BitBlt_SRCERASE_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8* srcp;
|
||||
uint8* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -214,8 +214,8 @@ static int BitBlt_SRCERASE_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
|
||||
static int BitBlt_NOTSRCERASE_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8* srcp;
|
||||
uint8* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -239,8 +239,8 @@ static int BitBlt_NOTSRCERASE_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int
|
||||
static int BitBlt_SRCINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8* srcp;
|
||||
uint8* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -264,8 +264,8 @@ static int BitBlt_SRCINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
|
||||
static int BitBlt_SRCAND_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8* srcp;
|
||||
uint8* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -289,8 +289,8 @@ static int BitBlt_SRCAND_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidt
|
||||
static int BitBlt_SRCPAINT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8* srcp;
|
||||
uint8* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -320,9 +320,9 @@ static int BitBlt_DSPDxax_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid
|
||||
static int BitBlt_SPna_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint8* srcp;
|
||||
uint8* dstp;
|
||||
uint8* patp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -349,8 +349,8 @@ static int BitBlt_SPna_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth,
|
||||
static int BitBlt_PDxn_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint8* dstp;
|
||||
uint8* patp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -375,8 +375,8 @@ static int BitBlt_PDxn_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth,
|
||||
static int BitBlt_DSna_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8* srcp;
|
||||
uint8* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -400,9 +400,9 @@ static int BitBlt_DSna_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth,
|
||||
static int BitBlt_MERGECOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint8* srcp;
|
||||
uint8* dstp;
|
||||
uint8* patp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -429,8 +429,8 @@ static int BitBlt_MERGECOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
|
||||
static int BitBlt_MERGEPAINT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8* srcp;
|
||||
uint8* dstp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -454,8 +454,8 @@ static int BitBlt_MERGEPAINT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
|
||||
static int BitBlt_PATCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint8* dstp;
|
||||
uint8* patp;
|
||||
uint8 palIndex;
|
||||
|
||||
if(hdcDest->brush->style == GDI_BS_SOLID)
|
||||
@ -500,8 +500,8 @@ static int BitBlt_PATCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid
|
||||
static int BitBlt_PATINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint8* dstp;
|
||||
uint8* patp;
|
||||
uint8 palIndex;
|
||||
|
||||
if(hdcDest->brush->style == GDI_BS_SOLID)
|
||||
@ -546,9 +546,9 @@ static int BitBlt_PATINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
|
||||
static int BitBlt_PATPAINT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *srcp;
|
||||
uint8 *dstp;
|
||||
uint8 *patp;
|
||||
uint8* srcp;
|
||||
uint8* dstp;
|
||||
uint8* patp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
@ -707,96 +707,96 @@ int PatBlt_8bpp(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, in
|
||||
return 1;
|
||||
}
|
||||
|
||||
void SetPixel_BLACK_8bpp(uint8 *pixel, uint8 *pen)
|
||||
inline void SetPixel_BLACK_8bpp(uint8* pixel, uint8* pen)
|
||||
{
|
||||
/* D = 0 */
|
||||
*pixel = 0;
|
||||
}
|
||||
|
||||
void SetPixel_NOTMERGEPEN_8bpp(uint8 *pixel, uint8 *pen)
|
||||
inline void SetPixel_NOTMERGEPEN_8bpp(uint8* pixel, uint8* pen)
|
||||
{
|
||||
/* D = ~(D | P) */
|
||||
*pixel = ~(*pixel | *pen);
|
||||
}
|
||||
|
||||
void SetPixel_MASKNOTPEN_8bpp(uint8 *pixel, uint8 *pen)
|
||||
inline void SetPixel_MASKNOTPEN_8bpp(uint8* pixel, uint8* pen)
|
||||
{
|
||||
/* D = D & ~P */
|
||||
*pixel &= ~(*pen);
|
||||
}
|
||||
|
||||
void SetPixel_NOTCOPYPEN_8bpp(uint8 *pixel, uint8 *pen)
|
||||
inline void SetPixel_NOTCOPYPEN_8bpp(uint8* pixel, uint8* pen)
|
||||
{
|
||||
/* D = ~P */
|
||||
*pixel = ~(*pen);
|
||||
}
|
||||
|
||||
void SetPixel_MASKPENNOT_8bpp(uint8 *pixel, uint8 *pen)
|
||||
inline void SetPixel_MASKPENNOT_8bpp(uint8* pixel, uint8* pen)
|
||||
{
|
||||
/* D = P & ~D */
|
||||
*pixel = *pen & ~*pixel;
|
||||
}
|
||||
|
||||
void SetPixel_NOT_8bpp(uint8 *pixel, uint8 *pen)
|
||||
inline void SetPixel_NOT_8bpp(uint8* pixel, uint8* pen)
|
||||
{
|
||||
/* D = ~D */
|
||||
*pixel = ~(*pixel);
|
||||
}
|
||||
|
||||
void SetPixel_XORPEN_8bpp(uint8 *pixel, uint8 *pen)
|
||||
inline void SetPixel_XORPEN_8bpp(uint8* pixel, uint8* pen)
|
||||
{
|
||||
/* D = D ^ P */
|
||||
*pixel = *pixel ^ *pen;
|
||||
}
|
||||
|
||||
void SetPixel_NOTMASKPEN_8bpp(uint8 *pixel, uint8 *pen)
|
||||
inline void SetPixel_NOTMASKPEN_8bpp(uint8* pixel, uint8* pen)
|
||||
{
|
||||
/* D = ~(D & P) */
|
||||
*pixel = ~(*pixel & *pen);
|
||||
}
|
||||
|
||||
void SetPixel_MASKPEN_8bpp(uint8 *pixel, uint8 *pen)
|
||||
inline void SetPixel_MASKPEN_8bpp(uint8* pixel, uint8* pen)
|
||||
{
|
||||
/* D = D & P */
|
||||
*pixel &= *pen;
|
||||
}
|
||||
|
||||
void SetPixel_NOTXORPEN_8bpp(uint8 *pixel, uint8 *pen)
|
||||
inline void SetPixel_NOTXORPEN_8bpp(uint8* pixel, uint8* pen)
|
||||
{
|
||||
/* D = ~(D ^ P) */
|
||||
*pixel = ~(*pixel ^ *pen);
|
||||
}
|
||||
|
||||
void SetPixel_NOP_8bpp(uint8 *pixel, uint8 *pen)
|
||||
inline void SetPixel_NOP_8bpp(uint8* pixel, uint8* pen)
|
||||
{
|
||||
/* D = D */
|
||||
}
|
||||
|
||||
void SetPixel_MERGENOTPEN_8bpp(uint8 *pixel, uint8 *pen)
|
||||
inline void SetPixel_MERGENOTPEN_8bpp(uint8* pixel, uint8* pen)
|
||||
{
|
||||
/* D = D | ~P */
|
||||
*pixel |= ~(*pen);
|
||||
}
|
||||
|
||||
void SetPixel_COPYPEN_8bpp(uint8 *pixel, uint8 *pen)
|
||||
inline void SetPixel_COPYPEN_8bpp(uint8* pixel, uint8* pen)
|
||||
{
|
||||
/* D = P */
|
||||
*pixel = *pen;
|
||||
}
|
||||
|
||||
void SetPixel_MERGEPENNOT_8bpp(uint8 *pixel, uint8 *pen)
|
||||
inline void SetPixel_MERGEPENNOT_8bpp(uint8* pixel, uint8* pen)
|
||||
{
|
||||
/* D = P | ~D */
|
||||
*pixel = *pen | ~(*pixel);
|
||||
}
|
||||
|
||||
void SetPixel_MERGEPEN_8bpp(uint8 *pixel, uint8 *pen)
|
||||
inline void SetPixel_MERGEPEN_8bpp(uint8* pixel, uint8* pen)
|
||||
{
|
||||
/* D = P | D */
|
||||
*pixel |= *pen;
|
||||
}
|
||||
|
||||
void SetPixel_WHITE_8bpp(uint8 *pixel, uint8 *pen)
|
||||
inline void SetPixel_WHITE_8bpp(uint8* pixel, uint8* pen)
|
||||
{
|
||||
/* D = 1 */
|
||||
*pixel = 0xFF;
|
||||
@ -836,7 +836,7 @@ int LineTo_8bpp(HGDI_DC hdc, int nXEnd, int nYEnd)
|
||||
|
||||
int irop2;
|
||||
uint8 pen;
|
||||
uint8 *pixel;
|
||||
uint8* pixel;
|
||||
|
||||
x1 = hdc->pen->posX;
|
||||
y1 = hdc->pen->posY;
|
||||
|
@ -48,39 +48,39 @@ pBitBlt BitBlt_[5] =
|
||||
* @return pixel color
|
||||
*/
|
||||
|
||||
GDI_COLOR gdi_GetPixel(HGDI_DC hdc, int nXPos, int nYPos)
|
||||
inline GDI_COLOR gdi_GetPixel(HGDI_DC hdc, int nXPos, int nYPos)
|
||||
{
|
||||
HGDI_BITMAP hBmp = (HGDI_BITMAP) hdc->selectedObject;
|
||||
GDI_COLOR* colorp = (GDI_COLOR*)&(hBmp->data[(nYPos * hBmp->width * hdc->bytesPerPixel) + nXPos * hdc->bytesPerPixel]);
|
||||
return (GDI_COLOR) *colorp;
|
||||
}
|
||||
|
||||
uint8 gdi_GetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y)
|
||||
inline uint8 gdi_GetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y)
|
||||
{
|
||||
return *((uint8*)&(hBmp->data[(Y * hBmp->width) + X]));
|
||||
}
|
||||
|
||||
uint16 gdi_GetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y)
|
||||
inline uint16 gdi_GetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y)
|
||||
{
|
||||
return *((uint16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2]));
|
||||
}
|
||||
|
||||
uint32 gdi_GetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y)
|
||||
inline uint32 gdi_GetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y)
|
||||
{
|
||||
return *((uint32*)&(hBmp->data[(Y * hBmp->width * 4) + X * 4]));
|
||||
}
|
||||
|
||||
uint8* gdi_GetPointer_8bpp(HGDI_BITMAP hBmp, int X, int Y)
|
||||
inline uint8* gdi_GetPointer_8bpp(HGDI_BITMAP hBmp, int X, int Y)
|
||||
{
|
||||
return ((uint8*)&(hBmp->data[(Y * hBmp->width) + X]));
|
||||
}
|
||||
|
||||
uint16* gdi_GetPointer_16bpp(HGDI_BITMAP hBmp, int X, int Y)
|
||||
inline uint16* gdi_GetPointer_16bpp(HGDI_BITMAP hBmp, int X, int Y)
|
||||
{
|
||||
return ((uint16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2]));
|
||||
}
|
||||
|
||||
uint32* gdi_GetPointer_32bpp(HGDI_BITMAP hBmp, int X, int Y)
|
||||
inline uint32* gdi_GetPointer_32bpp(HGDI_BITMAP hBmp, int X, int Y)
|
||||
{
|
||||
return ((uint32*)&(hBmp->data[(Y * hBmp->width * 4) + X * 4]));
|
||||
}
|
||||
@ -95,24 +95,24 @@ uint32* gdi_GetPointer_32bpp(HGDI_BITMAP hBmp, int X, int Y)
|
||||
* @return
|
||||
*/
|
||||
|
||||
GDI_COLOR gdi_SetPixel(HGDI_DC hdc, int X, int Y, GDI_COLOR crColor)
|
||||
inline GDI_COLOR gdi_SetPixel(HGDI_DC hdc, int X, int Y, GDI_COLOR crColor)
|
||||
{
|
||||
HGDI_BITMAP hBmp = (HGDI_BITMAP) hdc->selectedObject;
|
||||
*((GDI_COLOR*)&(hBmp->data[(Y * hBmp->width * hdc->bytesPerPixel) + X * hdc->bytesPerPixel])) = crColor;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void gdi_SetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y, uint8 pixel)
|
||||
inline void gdi_SetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y, uint8 pixel)
|
||||
{
|
||||
*((uint8*)&(hBmp->data[(Y * hBmp->width) + X])) = pixel;
|
||||
}
|
||||
|
||||
void gdi_SetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y, uint16 pixel)
|
||||
inline void gdi_SetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y, uint16 pixel)
|
||||
{
|
||||
*((uint16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2])) = pixel;
|
||||
}
|
||||
|
||||
void gdi_SetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y, uint32 pixel)
|
||||
inline void gdi_SetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y, uint32 pixel)
|
||||
{
|
||||
*((uint32*)&(hBmp->data[(Y * hBmp->width * 4) + X * 4])) = pixel;
|
||||
}
|
||||
|
@ -47,13 +47,13 @@ HGDI_PEN gdi_CreatePen(int fnPenStyle, int nWidth, int crColor)
|
||||
return hPen;
|
||||
}
|
||||
|
||||
uint8 gdi_GetPenColor_8bpp(HGDI_PEN pen)
|
||||
inline uint8 gdi_GetPenColor_8bpp(HGDI_PEN pen)
|
||||
{
|
||||
/* TODO: implement conversion using palette */
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
uint16 gdi_GetPenColor_16bpp(HGDI_PEN pen)
|
||||
inline uint16 gdi_GetPenColor_16bpp(HGDI_PEN pen)
|
||||
{
|
||||
uint16 p;
|
||||
int r, g, b;
|
||||
@ -63,7 +63,7 @@ uint16 gdi_GetPenColor_16bpp(HGDI_PEN pen)
|
||||
return p;
|
||||
}
|
||||
|
||||
uint32 gdi_GetPenColor_32bpp(HGDI_PEN pen)
|
||||
inline uint32 gdi_GetPenColor_32bpp(HGDI_PEN pen)
|
||||
{
|
||||
return pen->color;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user