mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
WIN32K: little work on Set/GetPixel (I don't know how to actually get/set a pixel value).
svn path=/trunk/; revision=5713
This commit is contained in:
parent
bbb8de1530
commit
92f4c1b15d
1 changed files with 43 additions and 4 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: bitmaps.c,v 1.34 2003/08/20 07:45:02 gvg Exp $ */
|
/* $Id: bitmaps.c,v 1.35 2003/08/20 20:45:28 ea Exp $ */
|
||||||
#undef WIN32_LEAN_AND_MEAN
|
#undef WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -31,6 +31,9 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <win32k/debug1.h>
|
#include <win32k/debug1.h>
|
||||||
|
|
||||||
|
//FIXME: where should CLR_INVALID be defined?
|
||||||
|
#define CLR_INVALID 0xffffffff
|
||||||
|
|
||||||
BOOL STDCALL NtGdiBitBlt(HDC hDCDest,
|
BOOL STDCALL NtGdiBitBlt(HDC hDCDest,
|
||||||
INT XDest,
|
INT XDest,
|
||||||
INT YDest,
|
INT YDest,
|
||||||
|
@ -323,7 +326,17 @@ COLORREF STDCALL NtGdiGetPixel(HDC hDC,
|
||||||
INT XPos,
|
INT XPos,
|
||||||
INT YPos)
|
INT YPos)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
PDC dc = NULL;
|
||||||
|
COLORREF cr = (COLORREF) 0;
|
||||||
|
|
||||||
|
dc = DC_LockDc (hDC);
|
||||||
|
if (NULL == dc)
|
||||||
|
{
|
||||||
|
return (COLORREF) CLR_INVALID;
|
||||||
|
}
|
||||||
|
//FIXME: get actual pixel RGB value
|
||||||
|
DC_UnlockDc (hDC);
|
||||||
|
return cr;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL STDCALL NtGdiMaskBlt(HDC hDCDest,
|
BOOL STDCALL NtGdiMaskBlt(HDC hDCDest,
|
||||||
|
@ -449,6 +462,8 @@ BOOL STDCALL NtGdiSetBitmapDimensionEx(HBITMAP hBitmap,
|
||||||
bmp->size.cx = Width;
|
bmp->size.cx = Width;
|
||||||
bmp->size.cy = Height;
|
bmp->size.cy = Height;
|
||||||
|
|
||||||
|
BITMAPOBJ_UnlockBitmap (hBitmap);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -457,7 +472,12 @@ COLORREF STDCALL NtGdiSetPixel(HDC hDC,
|
||||||
INT Y,
|
INT Y,
|
||||||
COLORREF Color)
|
COLORREF Color)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
if(NtGdiSetPixelV(hDC,X,Y,Color))
|
||||||
|
{
|
||||||
|
COLORREF cr = NtGdiGetPixel(hDC,X,Y);
|
||||||
|
if(CLR_INVALID != cr) return(cr);
|
||||||
|
}
|
||||||
|
return ((COLORREF) -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL STDCALL NtGdiSetPixelV(HDC hDC,
|
BOOL STDCALL NtGdiSetPixelV(HDC hDC,
|
||||||
|
@ -465,7 +485,26 @@ BOOL STDCALL NtGdiSetPixelV(HDC hDC,
|
||||||
INT Y,
|
INT Y,
|
||||||
COLORREF Color)
|
COLORREF Color)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
PDC dc = NULL;
|
||||||
|
PBITMAPOBJ bmp = NULL;
|
||||||
|
BITMAP bm;
|
||||||
|
|
||||||
|
dc = DC_LockDc (hDC);
|
||||||
|
if(NULL == dc)
|
||||||
|
{
|
||||||
|
return(FALSE);
|
||||||
|
}
|
||||||
|
bmp = BITMAPOBJ_LockBitmap (dc->w.hBitmap);
|
||||||
|
if(NULL == bmp)
|
||||||
|
{
|
||||||
|
DC_UnlockDc (hDC);
|
||||||
|
return(FALSE);
|
||||||
|
}
|
||||||
|
bm = bmp->bitmap;
|
||||||
|
//FIXME: set the actual pixel value
|
||||||
|
BITMAPOBJ_UnlockBitmap (bmp);
|
||||||
|
DC_UnlockDc (hDC);
|
||||||
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL STDCALL NtGdiStretchBlt(HDC hDCDest,
|
BOOL STDCALL NtGdiStretchBlt(HDC hDCDest,
|
||||||
|
|
Loading…
Reference in a new issue