PATCH: DRAWPATTERNRECT Escape
Marcus Meissner
meissner at suse.de
Sun Sep 4 14:51:35 CDT 2005
Hi,
A weird 16bit program uses that to draw lines.
In WINEPS it is just a stub for now, so I did only add the cases in
QueryEscSupport commented out.
Ciao, Marcus
Changelog:
Added DRAWPATTERNRECT Escape() 16<->32 mapper
and stub in WINEPS.
Index: dlls/gdi/gdi16.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/gdi16.c,v
retrieving revision 1.20
diff -u -r1.20 gdi16.c
--- dlls/gdi/gdi16.c 16 Apr 2005 11:18:43 -0000 1.20
+++ dlls/gdi/gdi16.c 4 Sep 2005 19:36:24 -0000
@@ -646,11 +646,24 @@
rc16->bottom = rc.bottom;
return ret;
}
+ /* Escape(hdc,DRAWPATTERNRECT,PRECT_STRUCT*,NULL); */
+ case DRAWPATTERNRECT:
+ {
+ DRAWPATRECT pr;
+ DRAWPATRECT16 *pr16 = (DRAWPATRECT16*)MapSL(in_data);
+
+ pr.ptPosition.x = pr16->ptPosition.x;
+ pr.ptPosition.y = pr16->ptPosition.y;
+ pr.ptSize.x = pr16->ptSize.x;
+ pr.ptSize.y = pr16->ptSize.y;
+ pr.wStyle = pr16->wStyle;
+ pr.wPattern = pr16->wPattern;
+ return Escape( HDC_32(hdc), escape, sizeof(pr), (LPCSTR)&pr, NULL );
+ }
/* Escape(hdc,ABORTDOC,NULL,NULL); */
/* Escape(hdc,BANDINFO,BANDINFOSTRUCT*,BANDINFOSTRUCT*); */
/* Escape(hdc,BEGIN_PATH,NULL,NULL); */
- /* Escape(hdc,DRAWPATTERNRECT,PRECT_STRUCT*,NULL); */
/* Escape(hdc,ENDDOC,NULL,NULL); */
/* Escape(hdc,END_PATH,PATHINFO,NULL); */
/* Escape(hdc,EXTTEXTOUT,EXTTEXT_STRUCT*,NULL); */
@@ -674,7 +687,6 @@
case ABORTDOC:
case BANDINFO:
case BEGIN_PATH:
- case DRAWPATTERNRECT:
case ENDDOC:
case END_PATH:
case EXTTEXTOUT:
Index: dlls/wineps/escape.c
===================================================================
RCS file: /home/wine/wine/dlls/wineps/escape.c,v
retrieving revision 1.29
diff -u -r1.29 escape.c
--- dlls/wineps/escape.c 23 Mar 2005 13:15:18 -0000 1.29
+++ dlls/wineps/escape.c 4 Sep 2005 19:36:59 -0000
@@ -54,6 +54,7 @@
switch(num) {
case NEXTBAND:
+ /*case BANDINFO:*/
case SETCOPYCOUNT:
case GETTECHNOLOGY:
case SETLINECAP:
@@ -70,13 +71,50 @@
case BEGIN_PATH:
case CLIP_TO_PATH:
case END_PATH:
+ /*case DRAWPATTERNRECT:*/
return TRUE;
default:
+ FIXME("QUERYESCSUPPORT(%d) - not supported.\n", num);
return FALSE;
}
}
+ case MFCOMMENT:
+ {
+ int i;
+ FIXME("MFCOMMENT(%p, %d)\n", in_data, cbInput);
+ for (i=0;i<cbInput;i++) MESSAGE("%02x ", ((LPBYTE)in_data)[i]);
+ MESSAGE("\n");
+ return 1;
+ }
+ case DRAWPATTERNRECT:
+ {
+ DRAWPATRECT *dpr = (DRAWPATRECT*)in_data;
+
+ FIXME("DRAWPATTERNRECT(pos (%ld,%ld), size %ldx%ld, style %d, pattern %x), stub!\n",
+ dpr->ptPosition.x, dpr->ptPosition.y,
+ dpr->ptSize.x, dpr->ptSize.y,
+ dpr->wStyle, dpr->wPattern
+ );
+ return 1;
+ }
+ case BANDINFO:
+ {
+ BANDINFOSTRUCT *ibi = (BANDINFOSTRUCT*)in_data;
+ BANDINFOSTRUCT *obi = (BANDINFOSTRUCT*)out_data;
+
+ FIXME("BANDINFO(graphics %d, text %d, rect [%ldx%ld-%ldx%ld]), stub!\n",
+ ibi->GraphicsFlag,
+ ibi->TextFlag,
+ ibi->GraphicsRect.top,
+ ibi->GraphicsRect.bottom,
+ ibi->GraphicsRect.left,
+ ibi->GraphicsRect.right
+ );
+ memcpy (obi, ibi, sizeof(*ibi));
+ return 1;
+ }
case NEXTBAND:
{
RECT *r = out_data;
Index: include/wingdi.h
===================================================================
RCS file: /home/wine/wine/include/wingdi.h,v
retrieving revision 1.123
diff -u -r1.123 wingdi.h
--- include/wingdi.h 18 Jul 2005 18:05:04 -0000 1.123
+++ include/wingdi.h 4 Sep 2005 19:37:01 -0000
@@ -3204,6 +3204,22 @@
#define LAYOUT_BITMAPORIENTATIONPRESERVED 0x00000008
#define NOMIRRORBITMAP 0x80000000
+/* For DRAWPATTERNRECT Escape */
+typedef struct _DRAWPATRECT
+{
+ POINT ptPosition;
+ POINT ptSize;
+ WORD wStyle;
+ WORD wPattern;
+} DRAWPATRECT, *PDRAWPATRECT;
+
+/* For BANDINFO Escape */
+typedef struct _BANDINFOSTRUCT
+{
+ BOOL GraphicsFlag;
+ BOOL TextFlag;
+ RECT GraphicsRect;
+} BANDINFOSTRUCT, *PBANDINFOSTRUCT;
INT WINAPI AbortDoc(HDC);
BOOL WINAPI AbortPath(HDC);
Index: include/wine/wingdi16.h
===================================================================
RCS file: /home/wine/wine/include/wine/wingdi16.h,v
retrieving revision 1.33
diff -u -r1.33 wingdi16.h
--- include/wine/wingdi16.h 31 Aug 2004 00:02:02 -0000 1.33
+++ include/wine/wingdi16.h 4 Sep 2005 19:37:12 -0000
@@ -355,6 +355,15 @@
#define RENDERMODE_OPEN 1
#define RENDERMODE_CLOSED 2
+/* For DRAWPATTERNRECT Escape, 16bit mode */
+typedef struct _DRAWPATRECT16
+{
+ POINT16 ptPosition;
+ POINT16 ptSize;
+ WORD wStyle;
+ WORD wPattern;
+} DRAWPATRECT16, *PDRAWPATRECT16;
+
#include <poppack.h>
More information about the wine-patches
mailing list