* Replace NtGdiCreatePatternBrush and NtGdiCreateHatchBrush with NtGdiCreatePatternBr...
authorBrandon Turner <turnerb7@msu.edu>
Sun, 8 Jan 2006 20:08:38 +0000 (20:08 +0000)
committerBrandon Turner <turnerb7@msu.edu>
Sun, 8 Jan 2006 20:08:38 +0000 (20:08 +0000)
* Implement CreateHatchBrush, CreatePatternBrush

svn path=/trunk/; revision=20726

reactos/include/win32k/ntgdibad.h
reactos/lib/gdi32/gdi32.def
reactos/lib/gdi32/objects/brush.c
reactos/subsys/win32k/objects/brush.c
reactos/tools/nci/w32ksvc.db

index f44e0a4..a2d22bb 100644 (file)
@@ -281,12 +281,6 @@ NtGdiCreateEnhMetaFile (
        LPCWSTR         Description\r
        );\r
 \r
-/* Use NtGdiCreateHatchBrushInternal with FALSE at the end. */\r
-HBRUSH STDCALL\r
-NtGdiCreateHatchBrush(\r
-   INT Style,\r
-   COLORREF Color);\r
-\r
 /* Metafiles are user mode */\r
 HDC\r
 STDCALL\r
@@ -301,11 +295,6 @@ NtGdiCreatePalette (
        CONST PLOGPALETTE       lgpl\r
        );\r
 \r
-/* Use NtGdiCreatePatternBrushInternal with false, false at the end. */\r
-HBRUSH STDCALL\r
-NtGdiCreatePatternBrush(\r
-   HBITMAP hBitmap);\r
-\r
 /* Use NtGdiCreatePen with -> as parameters. */\r
 HPEN STDCALL\r
 NtGdiCreatePenIndirect(\r
index bf6d97d..c4660d5 100644 (file)
@@ -72,13 +72,13 @@ CreateFontIndirectExW@4
 CreateFontIndirectW@4
 CreateFontW@56
 CreateHalftonePalette@4=NtGdiCreateHalftonePalette@4
-CreateHatchBrush@8=NtGdiCreateHatchBrush@8
+CreateHatchBrush@8
 CreateICA@16
 CreateICW@16
 CreateMetaFileA@4
 CreateMetaFileW@4
 CreatePalette@4=NtGdiCreatePalette@4
-CreatePatternBrush@4=NtGdiCreatePatternBrush@4
+CreatePatternBrush@4
 CreatePen@12=NtGdiCreatePen@12
 CreatePenIndirect@4=NtGdiCreatePenIndirect@4
 CreatePolyPolygonRgn@16=NtGdiCreatePolyPolygonRgn@16
index 538f111..714c77d 100644 (file)
@@ -77,6 +77,27 @@ CreateDIBPatternBrushPt(
    return hBrush;
 }
 
+/*
+ * @implemented
+ */
+HBRUSH
+STDCALL
+CreateHatchBrush(INT fnStyle,
+                 COLORREF clrref)
+{
+    return NtGdiCreateHatchBrushInternal(fnStyle, clrref, FALSE);
+}
+
+/*
+ * @implemented
+ */
+HBRUSH
+STDCALL
+CreatePatternBrush(HBITMAP hbmp)
+{
+    return NtGdiCreatePatternBrushInternal(hbmp, FALSE, FALSE);
+}
+
 /*
  * @implemented
  */
@@ -111,8 +132,15 @@ CreateBrushIndirect(
          break;
 
       case BS_PATTERN:
+         hBrush = NtGdiCreatePatternBrushInternal((HBITMAP)LogBrush->lbHatch, 
+                                                  FALSE, 
+                                                  FALSE);
+         break;
+
       case BS_PATTERN8X8:
-         hBrush = NtGdiCreatePatternBrush((HBITMAP)LogBrush->lbHatch);
+         hBrush = NtGdiCreatePatternBrushInternal((HBITMAP)LogBrush->lbHatch, 
+                                                  FALSE, 
+                                                  TRUE);
          break;
 
       case BS_SOLID:
@@ -120,7 +148,9 @@ CreateBrushIndirect(
          break;
 
       case BS_HATCHED:
-         hBrush = NtGdiCreateHatchBrush(LogBrush->lbHatch, LogBrush->lbColor);
+         hBrush = NtGdiCreateHatchBrushInternal(LogBrush->lbHatch, 
+                                                LogBrush->lbColor, 
+                                                FALSE);
          break;
          
       case BS_NULL:
index 8b36b4e..eb02e5b 100644 (file)
@@ -608,16 +608,19 @@ NtGdiCreateDIBBrush(
 }
 
 HBRUSH STDCALL
-NtGdiCreateHatchBrush(
-   INT Style,
-   COLORREF Color)
+NtGdiCreateHatchBrushInternal(
+   ULONG Style,
+   COLORREF Color,
+   BOOL bPen)
 {
    return IntGdiCreateHatchBrush(Style, Color);
 }
 
 HBRUSH STDCALL
-NtGdiCreatePatternBrush(
-   HBITMAP hBitmap)
+NtGdiCreatePatternBrushInternal(
+   HBITMAP hBitmap,
+   BOOL bPen,
+   BOOL b8x8)
 {
    return IntGdiCreatePatternBrush(hBitmap);
 }
index 6991b26..4b63067 100644 (file)
@@ -35,11 +35,11 @@ NtGdiCreateEnhMetaFile                      4
 NtGdiCreateFont                                14
 NtGdiCreateFontIndirect                        1
 NtGdiCreateHalftonePalette             1
-NtGdiCreateHatchBrush                  2
+NtGdiCreateHatchBrushInternal          3
 NtGdiCreateIC                          4
 NtGdiCreateMetaFile                    1
 NtGdiCreatePalette                     1
-NtGdiCreatePatternBrush                        1
+NtGdiCreatePatternBrushInternal        3
 NtGdiCreatePen                         3
 NtGdiCreatePenIndirect                 1
 NtGdiCreatePolygonRgn                  3