5 modified files
reactos/subsys/win32k/eng
diff -u -r1.66 -r1.67
--- bitblt.c 18 Dec 2004 17:52:30 -0000 1.66
+++ bitblt.c 30 Dec 2004 02:32:18 -0000 1.67
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: bitblt.c,v 1.66 2004/12/18 17:52:30 royce Exp $
+/* $Id: bitblt.c,v 1.67 2004/12/30 02:32:18 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -831,7 +831,7 @@
g = (int)GetGValue(BrushColor);
b = (int)GetBValue(BrushColor);
- tMask = Mask->pvBits + (SourcePoint->y * Mask->lDelta) + SourcePoint->x;
+ tMask = Mask->pvScan0 + (SourcePoint->y * Mask->lDelta) + SourcePoint->x;
for (j = 0; j < dy; j++)
{
lMask = tMask;
reactos/subsys/win32k/ntuser
diff -u -r1.4 -r1.5
--- cursoricon.c 20 Dec 2004 21:34:23 -0000 1.4
+++ cursoricon.c 30 Dec 2004 02:32:18 -0000 1.5
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: cursoricon.c,v 1.4 2004/12/20 21:34:23 gvg Exp $ */
+/* $Id: cursoricon.c,v 1.5 2004/12/30 02:32:18 navaraf Exp $ */
#include <w32k.h>
PCURICON_OBJECT FASTCALL
@@ -446,8 +446,11 @@
if(CurIconObject->IconInfo.hbmMask &&
(bmp = BITMAPOBJ_LockBitmap(CurIconObject->IconInfo.hbmMask)))
{
- CurIconObject->Size.cx = bmp->SurfObj.sizlBitmap.cx;
- CurIconObject->Size.cy = bmp->SurfObj.sizlBitmap.cy / 2;
+ if (CurIconObject->IconInfo.hbmColor == NULL)
+ {
+ CurIconObject->Size.cx = bmp->SurfObj.sizlBitmap.cx;
+ CurIconObject->Size.cy = bmp->SurfObj.sizlBitmap.cy / 2;
+ }
BITMAPOBJ_UnlockBitmap(CurIconObject->IconInfo.hbmMask);
GDIOBJ_SetOwnership(CurIconObject->IconInfo.hbmMask, NULL);
}
reactos/subsys/win32k/objects
diff -u -r1.84 -r1.85
--- bitmaps.c 12 Dec 2004 23:08:12 -0000 1.84
+++ bitmaps.c 30 Dec 2004 02:32:19 -0000 1.85
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: bitmaps.c,v 1.84 2004/12/12 23:08:12 navaraf Exp $ */
+/* $Id: bitmaps.c,v 1.85 2004/12/30 02:32:19 navaraf Exp $ */
#include <w32k.h>
#define IN_RECT(r,x,y) \
@@ -388,7 +388,7 @@
/* Create the bitmap object. */
hBitmap = IntCreateBitmap(Size, BITMAPOBJ_GetWidthBytes(Width, BitsPerPel),
BitmapFormat(BitsPerPel, BI_RGB),
- (Height > 0 ? 0 : BMF_TOPDOWN) |
+ (Height < 0 ? BMF_TOPDOWN : 0) |
(Bits == NULL ? 0 : BMF_NOZEROINIT), NULL);
if (!hBitmap)
{
@@ -893,9 +893,9 @@
/* Only get entire lines */
height = Bytes / abs(bmp->SurfObj.lDelta);
- if (height > bmp->SurfObj.sizlBitmap.cx)
+ if (height > bmp->SurfObj.sizlBitmap.cy)
{
- height = bmp->SurfObj.sizlBitmap.cx;
+ height = bmp->SurfObj.sizlBitmap.cy;
}
Bytes = height * abs(bmp->SurfObj.lDelta);
DPRINT ("(%08x, bytes:%ld, bits:%p) %dx%d %d colors fetched height: %ld\n",
@@ -1257,23 +1257,33 @@
{
HBITMAP res;
BITMAP bm;
+ BITMAPOBJ *Bitmap;
- if (IntGdiGetObject(hBitmap, sizeof(BITMAP), &bm) == 0)
- {
+ if (hBitmap == NULL)
return 0;
- }
+
+ Bitmap = GDIOBJ_LockObj(hBitmap, GDI_OBJECT_TYPE_BITMAP);
+ if (Bitmap == NULL)
+ return 0;
+
+ BITMAP_GetObject(Bitmap, sizeof(BITMAP), &bm);
bm.bmBits = NULL;
+ if (Bitmap->SurfObj.lDelta >= 0)
+ bm.bmHeight = -bm.bmHeight;
+
res = NtGdiCreateBitmapIndirect(&bm);
if(res)
{
char *buf;
- buf = ExAllocatePoolWithTag (PagedPool, bm.bmWidthBytes * bm.bmHeight, TAG_BITMAP);
- NtGdiGetBitmapBits (hBitmap, bm.bmWidthBytes * bm.bmHeight, buf);
- NtGdiSetBitmapBits (res, bm.bmWidthBytes * bm.bmHeight, buf);
+ buf = ExAllocatePoolWithTag (PagedPool, bm.bmWidthBytes * abs(bm.bmHeight), TAG_BITMAP);
+ NtGdiGetBitmapBits (hBitmap, bm.bmWidthBytes * abs(bm.bmHeight), buf);
+ NtGdiSetBitmapBits (res, bm.bmWidthBytes * abs(bm.bmHeight), buf);
ExFreePool (buf);
}
+ GDIOBJ_UnlockObj(hBitmap);
+
return res;
}
reactos/subsys/win32k/objects
diff -u -r1.59 -r1.60
--- dib.c 27 Dec 2004 16:47:02 -0000 1.59
+++ dib.c 30 Dec 2004 02:32:19 -0000 1.60
@@ -1,5 +1,5 @@
/*
- * $Id: dib.c,v 1.59 2004/12/27 16:47:02 navaraf Exp $
+ * $Id: dib.c,v 1.60 2004/12/30 02:32:19 navaraf Exp $
*
* ReactOS W32 Subsystem
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
@@ -149,7 +149,7 @@
// Create source surface
SourceSize.cx = bmi->bmiHeader.biWidth;
- SourceSize.cy = abs(bmi->bmiHeader.biHeight);
+ SourceSize.cy = ScanLines;
// Determine width of DIB
DIBWidth = DIB_GetDIBWidthBytes(SourceSize.cx, bmi->bmiHeader.biBitCount);
@@ -157,7 +157,7 @@
SourceBitmap = EngCreateBitmap(SourceSize,
DIBWidth,
BitmapFormat(bmi->bmiHeader.biBitCount, bmi->bmiHeader.biCompression),
- 0 < bmi->bmiHeader.biHeight ? 0 : BMF_TOPDOWN,
+ bmi->bmiHeader.biHeight < 0 ? BMF_TOPDOWN : 0,
(PVOID) Bits);
if (0 == SourceBitmap)
{
@@ -217,10 +217,10 @@
ZeroPoint.y = 0;
// Determine destination rectangle
- DestRect.top = 0;
DestRect.left = 0;
+ DestRect.top = abs(bmi->bmiHeader.biHeight) - StartScan - ScanLines;
DestRect.right = SourceSize.cx;
- DestRect.bottom = SourceSize.cy;
+ DestRect.bottom = DestRect.top + ScanLines;
copyBitsResult = EngCopyBits(DestSurf, SourceSurf, NULL, XlateObj, &DestRect, &ZeroPoint);
@@ -778,7 +778,7 @@
/* bm.bmBits = MapViewOfFile(section, FILE_MAP_ALL_ACCESS,
0L, offset, totalSize); */
DbgPrint("DIB_CreateDIBSection: Cannot yet handle section DIBs\n");
- SetLastWin32Error(ERROR_INVALID_FUNCTION);
+ SetLastWin32Error(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
else if (ovr_pitch && offset)
@@ -836,11 +836,11 @@
if (dib)
{
Size.cx = bm.bmWidth;
- Size.cy = bm.bmHeight;
+ Size.cy = abs(bm.bmHeight);
res = IntCreateBitmap(Size, bm.bmWidthBytes,
BitmapFormat(bi->biBitCount * bi->biPlanes, bi->biCompression),
BMF_DONTCACHE | BMF_USERMEM | BMF_NOZEROINIT |
- (bi->biHeight > 0 ? 0 : BMF_TOPDOWN),
+ (bi->biHeight < 0 ? BMF_TOPDOWN : 0),
bm.bmBits);
if (! res)
{
reactos/subsys/win32k/objects
diff -u -r1.17 -r1.18
--- pen.c 12 Dec 2004 01:40:38 -0000 1.17
+++ pen.c 30 Dec 2004 02:32:19 -0000 1.18
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: pen.c,v 1.17 2004/12/12 01:40:38 weiden Exp $
+ * $Id: pen.c,v 1.18 2004/12/30 02:32:19 navaraf Exp $
*/
#include <w32k.h>
@@ -109,12 +109,21 @@
NtGdiExtCreatePen(
DWORD PenStyle,
DWORD Width,
- CONST PLOGBRUSH LogBrush,
+ CONST LOGBRUSH *LogBrush,
DWORD StyleCount,
- CONST PDWORD Style)
+ CONST DWORD *Style)
{
- UNIMPLEMENTED;
- return 0;
+ /* NOTE: This is HACK! */
+ LOGPEN LogPen;
+
+ if (PenStyle & PS_USERSTYLE)
+ PenStyle = (PenStyle & ~PS_STYLE_MASK) | PS_SOLID;
+
+ LogPen.lopnStyle = PenStyle & PS_STYLE_MASK;
+ LogPen.lopnWidth.x = Width;
+ LogPen.lopnColor = (LogBrush != NULL) ? LogBrush->lbColor : 0;
+
+ return IntGdiCreatePenIndirect(&LogPen);
}
/* EOF */
CVSspam 0.2.8