1 #undef WIN32_LEAN_AND_MEAN
5 /* FIXME: Surely we should just have one include file that includes all of these.. */
6 #include <win32k/bitmaps.h>
7 #include <win32k/coord.h>
8 #include <win32k/driver.h>
10 #include <win32k/print.h>
11 #include <win32k/region.h>
12 #include <win32k/gdiobj.h>
13 #include <win32k/pen.h>
14 #include "../eng/objects.h"
17 #include <win32k/debug1.h>
20 PBRUSHOBJ PenToBrushObj(PDC dc, PENOBJ *pen)
27 BrushObj = ExAllocatePool(NonPagedPool, sizeof(BRUSHOBJ));
28 BrushObj->iSolidColor = pen->logpen.lopnColor;
33 VOID BitmapToSurf(HDC hdc, PSURFGDI SurfGDI, PSURFOBJ SurfObj, PBITMAPOBJ Bitmap)
39 SurfGDI->BitsPerPixel = Bitmap->dib->dsBm.bmBitsPixel;
40 SurfObj->lDelta = Bitmap->dib->dsBm.bmWidthBytes;
41 SurfObj->pvBits = Bitmap->dib->dsBm.bmBits;
42 SurfObj->cjBits = Bitmap->dib->dsBm.bmHeight * Bitmap->dib->dsBm.bmWidthBytes;
44 SurfGDI->BitsPerPixel = Bitmap->bitmap.bmBitsPixel;
45 SurfObj->lDelta = Bitmap->bitmap.bmWidthBytes;
46 SurfObj->pvBits = Bitmap->bitmap.bmBits;
47 SurfObj->cjBits = Bitmap->bitmap.bmHeight * Bitmap->bitmap.bmWidthBytes;
49 SurfObj->sizlBitmap = Bitmap->size; // FIXME: alloc memory for our own struct?
52 SurfObj->dhsurf = NULL;
53 SurfObj->hsurf = NULL;
54 SurfObj->dhpdev = NULL;
56 SurfObj->pvScan0 = SurfObj->pvBits; // start of bitmap
57 SurfObj->iUniq = 0; // not sure..
58 SurfObj->iBitmapFormat = BitmapFormat(SurfGDI->BitsPerPixel, BI_RGB);
59 SurfObj->iType = STYPE_BITMAP;
60 SurfObj->fjBitmap = BMF_TOPDOWN;