Difference between revisions of "Techwiki:Win32k/BRUSH"

From ReactOS Wiki
Jump to: navigation, search
 
(21 intermediate revisions by 3 users not shown)
Line 10: Line 10:
 
  typedef _BRUSH
 
  typedef _BRUSH
 
  {
 
  {
     BASEOBJECT BaseObject; // 0x000 ulShareCount = 6
+
     BASEOBJECT baseobj;       // 0x000 ulShareCount = 6
     ULONG ulStyle;         // 0x010
+
     ULONG     iHatch;       // 0x010
     HBITMAP hbmPattern;     // 0x014 01050078  
+
     HBITMAP   hbmPattern;   // 0x014 01050078  
     HBITMAP hbmClient;     // 0x018 01050077 invalid handle
+
     HBITMAP   hbmClient;     // 0x018 01050077 invalid handle
     FLONG flAttrs;         // 0x01c 00020043  
+
     FLONG     flAttrs;       // 0x01c 00020043  
     ULONG ulBrushUnique;   // 0x020 0000002e ?
+
     ULONG     ulBrushUnique; // 0x020 0000002e ?
     PBRUSHATTR pBrushAttr; // 0x024 e16293c8
+
     PBRUSHATTR pbrushattr;   // 0x024 e16293c8
     BRUSHATTR BrushAttr;   // 0x028
+
     BRUSHATTR brushattr;     // 0x028
     DWORD unk030;           // 0x030 00000000  
+
     DWORD     unk030;       // 0x030 00000000
     DWORD unk034;           // 0x034 00000000
+
     ULONG      unk034;       // 0x034 00000000 ?
     DWORD unk038;           // 0x038 00000001  
+
     BOOL      bCacheGrabbed; // 0x038 00000001 ?
     DWORD unk03c;           // 0x03c 00d8e9ec
+
     COLORREF  crFore;       // 0x03c 00d8e9ec
     DWORD unk040;           // 0x040 00ffffff  
+
     COLORREF  crBack;       // 0x040 00ffffff
     DWORD unk044;           // 0x044 00000004  
+
     ULONG      ulPalTime;     // 0x044 00000004 ?
     DWORD unk048;           // 0x048 00000008  
+
     ULONG      ulSurfTime;   // 0x048 00000008 ?
     PVOID pvRBrush          // 0x04c e16146b0 -> 'Gdbr'
+
     PENGBRUSH  pengbrush;    // 0x04c e16146b0 -> 'Gdbr' (ulRealisation in gdikdx)
     PPDEVOBJ ppdev;        // 0x050 e1d17008 -> 'GDev'
+
     PPDEVOBJ   ppdev;        // 0x050 e1d17008 -> 'GDev'
     DWORD unk054;           // 0x054 ffffffff  
+
     DWORD     unk054;       // 0x054 ffffffff  
     DWORD unk058;           // 0x058 00000000  
+
     LONG      lWidth;       // 0x058 00000000 Width is measured in LONG device coordinates
     DWORD unk05c;           // 0x05c 00000000
+
                              //                for a cosmetic wide line.
     DWORD unk060;           // 0x060 00000000
+
                              // NtGdiExtCreatePen ulWidth
     DWORD unk064;           // 0x064 00000000
+
     FLOATL    eWidth;       // 0x05c 00000000 Width is measured in FLOAT world coordinates
     DWORD unk068;          // 0x068 00350281
+
                              //                for a geometric wide line.
     DWORD unk06c;           // 0x06c 00000100
+
     ULONG      ulPenStyle;   // 0x060
     DWORD unk070;           // 0x070 8a27f1f0 ???
+
     DWORD     *pStyle;       // 0x064 -> 'Gsty' Pointer to an array of FLOAT_LONG elements
     PREGION prgn;           // 0x074 e1610008 -> 'Gla4'
+
                              // Allocated copy of pulStyle.
     DWORD unk078;           // 0x078 00020210  
+
     DWORD     dwStyleCount; // 0x068           Specifies the number of entries in the style
     DWORD unk07c;           // 0x07c 7153624f
+
                              //                 array pointed to by the pstyle member.
     DWORD unk080;           // 0x080 e4c9f260 ???
+
     BYTE      jJoin;         // 0x06c 00        join styles for geometric wide lines
    DWORD unk084;          // 0x084 e4bfc1f0 -> 'Ddk '
+
    BYTE      jEndCap;      //      00        end cap style for a geometric wide line
 +
    WORD      unk06e;        // 0x06e 0100
 +
     INT        iBrushStyle;   // 0x070 8a27f1f0 ???
 +
     PREGION   prgn;         // 0x074 e1610008 -> 'Gla4'
 +
     DWORD     unk078;       // 0x078 00020210  
 +
     DWORD     unk07c;       // 0x07c 7153624f
 +
     LIST_ENTRY ListHead;     // 0x080
 
  } BRUSH, *PBRUSH;
 
  } BRUSH, *PBRUSH;
  
* See [[Techwiki/win32k/EBRUSHOBJ|EBRUSHOBJ]] for a list of flAttrs flags.
+
===Fields===
 +
 
 +
''hbmClient''
 +
:For pattern brushes, this is the handle of the bitmap that was used to create the brush. For DIB brushes, it is a user mode pointer to the packed DIB.
 +
 
 +
''iHatch''
 +
:Hatch style for hatch brushes
 +
 
 +
''flAttrs''
 +
:Flags. See [[Techwiki:win32k/EBRUSHOBJ|EBRUSHOBJ]] for a list of flAttrs flags.
 +
 
 +
''pengbrush''
 +
:Pointer to a cached [[Techwiki:win32k/ENGBRUSH|ENGBRUSH]].

Latest revision as of 09:49, 10 February 2015

BRUSH as found on Windows XP


typedef _BRUSHATTR
{
    UINT AttrFlags;
    COLORREF lbColor;
} BRUSHATTR, *PBRUSHATTR;
typedef _BRUSH
{
    BASEOBJECT baseobj;       // 0x000 ulShareCount = 6
    ULONG      iHatch;        // 0x010
    HBITMAP    hbmPattern;    // 0x014 01050078 
    HBITMAP    hbmClient;     // 0x018 01050077 invalid handle
    FLONG      flAttrs;       // 0x01c 00020043 
    ULONG      ulBrushUnique; // 0x020 0000002e ?
    PBRUSHATTR pbrushattr;    // 0x024 e16293c8
    BRUSHATTR  brushattr;     // 0x028
    DWORD      unk030;        // 0x030 00000000
    ULONG      unk034;        // 0x034 00000000 ?
    BOOL       bCacheGrabbed; // 0x038 00000001 ?
    COLORREF   crFore;        // 0x03c 00d8e9ec
    COLORREF   crBack;        // 0x040 00ffffff
    ULONG      ulPalTime;     // 0x044 00000004 ?
    ULONG      ulSurfTime;    // 0x048 00000008 ?
    PENGBRUSH  pengbrush;     // 0x04c e16146b0 -> 'Gdbr' (ulRealisation in gdikdx)
    PPDEVOBJ   ppdev;         // 0x050 e1d17008 -> 'GDev'
    DWORD      unk054;        // 0x054 ffffffff 
    LONG       lWidth;        // 0x058 00000000  Width is measured in LONG device coordinates
                              //                 for a cosmetic wide line.
                              // NtGdiExtCreatePen ulWidth
    FLOATL     eWidth;        // 0x05c 00000000  Width is measured in FLOAT world coordinates
                              //                 for a geometric wide line.
    ULONG      ulPenStyle;    // 0x060
    DWORD     *pStyle;        // 0x064 -> 'Gsty' Pointer to an array of FLOAT_LONG elements
                              // Allocated copy of pulStyle.
    DWORD      dwStyleCount;  // 0x068           Specifies the number of entries in the style
                              //                 array pointed to by the pstyle member.
    BYTE       jJoin;         // 0x06c 00        join styles for geometric wide lines
    BYTE       jEndCap;       //       00        end cap style for a geometric wide line
    WORD       unk06e;        // 0x06e 0100
    INT        iBrushStyle;   // 0x070 8a27f1f0 ???
    PREGION    prgn;          // 0x074 e1610008 -> 'Gla4'
    DWORD      unk078;        // 0x078 00020210 
    DWORD      unk07c;        // 0x07c 7153624f
    LIST_ENTRY ListHead;      // 0x080
} BRUSH, *PBRUSH;

Fields

hbmClient

For pattern brushes, this is the handle of the bitmap that was used to create the brush. For DIB brushes, it is a user mode pointer to the packed DIB.

iHatch

Hatch style for hatch brushes

flAttrs

Flags. See EBRUSHOBJ for a list of flAttrs flags.

pengbrush

Pointer to a cached ENGBRUSH.