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
|
|
|
#include "surface.h"
|
2006-11-08 11:47:44 +00:00
|
|
|
|
|
|
|
INT FASTCALL DIB_GetDIBWidthBytes (INT width, INT depth);
|
2008-11-29 22:48:58 +00:00
|
|
|
int APIENTRY DIB_GetDIBImageBytes (INT width, INT height, INT depth);
|
2006-11-08 11:47:44 +00:00
|
|
|
INT FASTCALL DIB_BitmapInfoSize (const BITMAPINFO * info, WORD coloruse);
|
2009-01-08 16:33:40 +00:00
|
|
|
INT APIENTRY BITMAP_GetObject(SURFACE * bmp, INT count, LPVOID buffer);
|
|
|
|
HBITMAP FASTCALL IntCreateBitmap(IN SIZEL Size, IN LONG Width, IN ULONG Format, IN ULONG Flags, IN PVOID Bits);
|
2009-01-09 02:06:39 +00:00
|
|
|
HBITMAP FASTCALL BITMAP_CopyBitmap (HBITMAP hBitmap);
|
|
|
|
UINT FASTCALL BITMAP_GetRealBitsPixel(UINT nBitsPixel);
|
|
|
|
INT FASTCALL BITMAP_GetWidthBytes (INT bmWidth, INT bpp);
|
[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
|
|
|
|
APIENTRY
|
|
|
|
GreCreateBitmap(
|
|
|
|
IN INT nWidth,
|
|
|
|
IN INT nHeight,
|
|
|
|
IN UINT cPlanes,
|
|
|
|
IN UINT cBitsPixel,
|
|
|
|
IN OPTIONAL PVOID pvBits);
|
2010-06-07 15:55:03 +00:00
|
|
|
|
|
|
|
HBITMAP
|
|
|
|
APIENTRY
|
|
|
|
GreCreateBitmapEx(
|
|
|
|
IN INT nWidth,
|
|
|
|
IN INT nHeight,
|
|
|
|
IN ULONG cjWidthBytes,
|
|
|
|
IN ULONG iFormat,
|
|
|
|
IN USHORT fjBitmap,
|
|
|
|
IN ULONG cjBits,
|
|
|
|
IN OPTIONAL PVOID pvBits);
|
|
|
|
|