Author: tkreuzer
Date: Wed May 2 18:55:23 2012
New Revision: 56477
URL:
http://svn.reactos.org/svn/reactos?rev=56477&view=rev
Log:
[WIN32K]
- Add some code stub and comments for realizing DIB brush palettes
- Move some function prototypes
Modified:
trunk/reactos/win32ss/gdi/eng/engbrush.c
trunk/reactos/win32ss/gdi/ntgdi/brush.h
trunk/reactos/win32ss/gdi/ntgdi/intgdi.h
Modified: trunk/reactos/win32ss/gdi/eng/engbrush.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/engbrush.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/engbrush.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/engbrush.c [iso-8859-1] Wed May 2 18:55:23 2012
@@ -38,6 +38,7 @@
pebo->ppalSurf = pebo->psurfTrg->ppal;
GDIOBJ_vReferenceObjectByPointer(&pebo->ppalSurf->BaseObject);
+ //pebo->ppalDC = pdc->dclevel.ppal;
if (pbrush->flAttrs & GDIBRUSH_IS_NULL)
{
@@ -194,6 +195,7 @@
PSURFACE psurfPattern, psurfMask;
PPDEVOBJ ppdev = NULL;
EXLATEOBJ exlo;
+ PPALETTE ppalPattern;
/* All EBRUSHOBJs have a surface, see EBRUSHOBJ_vInit */
ASSERT(pebo->psurfTrg);
@@ -214,9 +216,22 @@
/* FIXME: implement mask */
psurfMask = NULL;
+ /* DIB brushes with DIB_PAL_COLORS usage need a new palette */
+ if (pebo->pbrush->flAttrs & GDIBRUSH_IS_DIBPALCOLORS)
+ {
+ ASSERT(FALSE);
+ ppalPattern = 0; //CreateDIBPalette(psurfPattern->ppal, pebo->ppalDC);
+ // pebo->ppalDIB = ppalPattern;
+ }
+ else
+ {
+ /* The palette is already as it should be */
+ ppalPattern = psurfPattern->ppal;
+ }
+
/* Initialize XLATEOBJ for the brush */
EXLATEOBJ_vInitialize(&exlo,
- psurfPattern->ppal,
+ ppalPattern,
pebo->psurfTrg->ppal,
0,
pebo->crCurrentBack,
Modified: trunk/reactos/win32ss/gdi/ntgdi/brush.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/brush.h?…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/brush.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/brush.h [iso-8859-1] Wed May 2 18:55:23 2012
@@ -141,3 +141,16 @@
BOOL FASTCALL IntGdiSetBrushOwner(PBRUSH,DWORD);
BOOL FASTCALL GreSetBrushOwner(HBRUSH,DWORD);
+HBRUSH APIENTRY
+IntGdiCreatePatternBrush(
+ HBITMAP hBitmap);
+
+HBRUSH APIENTRY
+IntGdiCreateSolidBrush(
+ COLORREF Color);
+
+HBRUSH APIENTRY
+IntGdiCreateNullBrush(VOID);
+
+VOID FASTCALL
+IntGdiSetSolidBrushColor(HBRUSH hBrush, COLORREF Color);
Modified: trunk/reactos/win32ss/gdi/ntgdi/intgdi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/intgdi.h…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/intgdi.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/intgdi.h [iso-8859-1] Wed May 2 18:55:23 2012
@@ -4,20 +4,6 @@
extern HDC hSystemBM;
extern HSEMAPHORE hsemDriverMgmt;
-
-HBRUSH APIENTRY
-IntGdiCreatePatternBrush(
- HBITMAP hBitmap);
-
-HBRUSH APIENTRY
-IntGdiCreateSolidBrush(
- COLORREF Color);
-
-HBRUSH APIENTRY
-IntGdiCreateNullBrush(VOID);
-
-VOID FASTCALL
-IntGdiSetSolidBrushColor(HBRUSH hBrush, COLORREF Color);
/* Line functions */