2010-02-26 11:43:19 +00:00
|
|
|
#pragma once
|
2006-11-08 11:47:44 +00:00
|
|
|
|
2009-01-08 16:33:40 +00:00
|
|
|
INT APIENTRY BITMAP_GetObject(SURFACE * bmp, INT count, LPVOID buffer);
|
2009-01-09 02:06:39 +00:00
|
|
|
HBITMAP FASTCALL BITMAP_CopyBitmap (HBITMAP hBitmap);
|
[WIN32K]
Rewrite the bitmap API. There were a lot of bugs. NtGdiCreateBitmap allowed a negative height, leading to either topdown or bottomup bitmaps, a behaviour that Windows doesn't have. The function copied the bitmap bits directly from the caller to the bitmap using RtlCopyMemory, ignoring different scanline length and direction (resulting in bitmaps being upside down), not SEH protected. This function (IntSetBitmapBits) is replaced by a better solution UnsafeSetBitmapBits, that takes these things into account. The name is chosen to give a hint that the function can/should be SEH protected. IntSetBitmapBits is still there, as its retarded behaviour is actually required in some places. There were also IntCreateBitmap and IntGdiCreateBitmap, now both being replaced by GreCreateBitmap. The code that set the palette is removed, as it's already done in SURFACE_AllocSurface, here gpalRGB is replaced with gpalBGR, fixing some inverted color issues. The alignment correction in SURFACE_bSetBitmapBits is reapplied, now that the callers are behaving as they are supposed to do.
svn path=/branches/reactos-yarotows/; revision=47641
2010-06-06 22:01:41 +00:00
|
|
|
|
2015-03-08 13:44:24 +00:00
|
|
|
BOOL
|
|
|
|
NTAPI
|
|
|
|
GreSetBitmapOwner(
|
|
|
|
_In_ HBITMAP hbmp,
|
|
|
|
_In_ ULONG ulOwner);
|
|
|
|
|
[WIN32K]
Rewrite the bitmap API. There were a lot of bugs. NtGdiCreateBitmap allowed a negative height, leading to either topdown or bottomup bitmaps, a behaviour that Windows doesn't have. The function copied the bitmap bits directly from the caller to the bitmap using RtlCopyMemory, ignoring different scanline length and direction (resulting in bitmaps being upside down), not SEH protected. This function (IntSetBitmapBits) is replaced by a better solution UnsafeSetBitmapBits, that takes these things into account. The name is chosen to give a hint that the function can/should be SEH protected. IntSetBitmapBits is still there, as its retarded behaviour is actually required in some places. There were also IntCreateBitmap and IntGdiCreateBitmap, now both being replaced by GreCreateBitmap. The code that set the palette is removed, as it's already done in SURFACE_AllocSurface, here gpalRGB is replaced with gpalBGR, fixing some inverted color issues. The alignment correction in SURFACE_bSetBitmapBits is reapplied, now that the callers are behaving as they are supposed to do.
svn path=/branches/reactos-yarotows/; revision=47641
2010-06-06 22:01:41 +00:00
|
|
|
HBITMAP
|
2012-01-12 14:42:59 +00:00
|
|
|
NTAPI
|
[WIN32K]
Rewrite the bitmap API. There were a lot of bugs. NtGdiCreateBitmap allowed a negative height, leading to either topdown or bottomup bitmaps, a behaviour that Windows doesn't have. The function copied the bitmap bits directly from the caller to the bitmap using RtlCopyMemory, ignoring different scanline length and direction (resulting in bitmaps being upside down), not SEH protected. This function (IntSetBitmapBits) is replaced by a better solution UnsafeSetBitmapBits, that takes these things into account. The name is chosen to give a hint that the function can/should be SEH protected. IntSetBitmapBits is still there, as its retarded behaviour is actually required in some places. There were also IntCreateBitmap and IntGdiCreateBitmap, now both being replaced by GreCreateBitmap. The code that set the palette is removed, as it's already done in SURFACE_AllocSurface, here gpalRGB is replaced with gpalBGR, fixing some inverted color issues. The alignment correction in SURFACE_bSetBitmapBits is reapplied, now that the callers are behaving as they are supposed to do.
svn path=/branches/reactos-yarotows/; revision=47641
2010-06-06 22:01:41 +00:00
|
|
|
GreCreateBitmap(
|
2012-01-12 14:42:59 +00:00
|
|
|
_In_ ULONG nWidth,
|
|
|
|
_In_ ULONG nHeight,
|
|
|
|
_In_ ULONG cPlanes,
|
|
|
|
_In_ ULONG cBitsPixel,
|
|
|
|
_In_opt_ PVOID pvBits);
|
2010-06-07 15:55:03 +00:00
|
|
|
|
|
|
|
HBITMAP
|
2012-01-12 14:42:59 +00:00
|
|
|
NTAPI
|
2010-06-07 15:55:03 +00:00
|
|
|
GreCreateBitmapEx(
|
2012-01-12 14:42:59 +00:00
|
|
|
_In_ ULONG nWidth,
|
|
|
|
_In_ ULONG nHeight,
|
|
|
|
_In_ ULONG cjWidthBytes,
|
|
|
|
_In_ ULONG iFormat,
|
|
|
|
_In_ USHORT fjBitmap,
|
|
|
|
_In_ ULONG cjSizeImage,
|
|
|
|
_In_opt_ PVOID pvBits,
|
|
|
|
_In_ FLONG flags);
|
2010-06-07 15:55:03 +00:00
|
|
|
|
2010-06-10 11:36:20 +00:00
|
|
|
HBITMAP
|
2012-05-04 17:37:07 +00:00
|
|
|
NTAPI
|
2010-06-10 11:36:20 +00:00
|
|
|
GreCreateDIBitmapInternal(
|
|
|
|
IN HDC hDc,
|
|
|
|
IN INT cx,
|
|
|
|
IN INT cy,
|
|
|
|
IN DWORD fInit,
|
|
|
|
IN OPTIONAL LPBYTE pjInit,
|
2010-08-01 12:17:35 +00:00
|
|
|
IN OPTIONAL PBITMAPINFO pbmi,
|
2010-06-10 11:36:20 +00:00
|
|
|
IN DWORD iUsage,
|
|
|
|
IN FLONG fl,
|
2012-05-04 17:37:07 +00:00
|
|
|
IN UINT cjMaxBits,
|
2010-06-10 11:36:20 +00:00
|
|
|
IN HANDLE hcmXform);
|
2016-01-03 16:16:04 +00:00
|
|
|
|
|
|
|
BOOL
|
|
|
|
NTAPI
|
|
|
|
UnsafeSetBitmapBits(
|
|
|
|
_Inout_ PSURFACE psurf,
|
|
|
|
_In_ ULONG cjBits,
|
|
|
|
_In_ const VOID *pvBits);
|
2017-01-09 21:12:00 +00:00
|
|
|
|
|
|
|
BOOL
|
|
|
|
NTAPI
|
|
|
|
GreGetBitmapDimension(
|
|
|
|
_In_ HBITMAP hBitmap,
|
|
|
|
_Out_ LPSIZE psizDim);
|
|
|
|
|