Author: gedmurphy
Date: Thu Nov 1 18:45:42 2007
New Revision: 30043
URL:
http://svn.reactos.org/svn/reactos?rev=30043&view=rev
Log:
- don't pass minus values for creating topdown bitmaps.
- fixes loading of toolbar bitmaps in abiword
Modified:
trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c Thu Nov 1 18:45:42 2007
@@ -54,9 +54,9 @@
return 0;
}
- WidthBytes = BITMAPOBJ_GetWidthBytes(Width, BitsPixel);
-
- Size.cx = Width;
+ WidthBytes = BITMAPOBJ_GetWidthBytes(Width, Planes * BitsPixel);
+
+ Size.cx = abs(Width);
Size.cy = abs(Height);
/* Create the bitmap object. */
@@ -108,7 +108,7 @@
{
if (pUnsafeBits)
{
- UINT cjBits = BITMAPOBJ_GetWidthBytes(Width, BitsPixel) * Height;
+ UINT cjBits = BITMAPOBJ_GetWidthBytes(Width, BitsPixel) * abs(Height);
ProbeForRead(pUnsafeBits, cjBits, 1);
}
@@ -186,7 +186,7 @@
}
else
{
- Bmp = IntGdiCreateBitmap(Width, Height, 1, Dc->w.bitsPerPixel, NULL);
+ Bmp = IntGdiCreateBitmap(abs(Width), abs(Height), 1, Dc->w.bitsPerPixel, NULL);
}
return Bmp;