mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 17:45:41 +00:00
- don't pass minus values for creating topdown bitmaps.
- fixes loading of toolbar bitmaps in abiword svn path=/trunk/; revision=30043
This commit is contained in:
parent
75d64c3e09
commit
fa1e99d927
1 changed files with 4 additions and 4 deletions
|
@ -54,9 +54,9 @@ IntGdiCreateBitmap(
|
|||
return 0;
|
||||
}
|
||||
|
||||
WidthBytes = BITMAPOBJ_GetWidthBytes(Width, BitsPixel);
|
||||
WidthBytes = BITMAPOBJ_GetWidthBytes(Width, Planes * BitsPixel);
|
||||
|
||||
Size.cx = Width;
|
||||
Size.cx = abs(Width);
|
||||
Size.cy = abs(Height);
|
||||
|
||||
/* Create the bitmap object. */
|
||||
|
@ -108,7 +108,7 @@ NtGdiCreateBitmap(
|
|||
{
|
||||
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 @@ IntCreateCompatibleBitmap(
|
|||
}
|
||||
else
|
||||
{
|
||||
Bmp = IntGdiCreateBitmap(Width, Height, 1, Dc->w.bitsPerPixel, NULL);
|
||||
Bmp = IntGdiCreateBitmap(abs(Width), abs(Height), 1, Dc->w.bitsPerPixel, NULL);
|
||||
}
|
||||
|
||||
return Bmp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue