Commit 56a86447 authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

Extend DRAWMODE struct to win95 spec.

Add some more Escape -> Escape16 conversions.
parent 0098ab67
...@@ -41,10 +41,9 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput, ...@@ -41,10 +41,9 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput,
segout = (SEGPTR)lpvOutData; segout = (SEGPTR)lpvOutData;
switch (nEscape) { switch (nEscape) {
/* Escape(hdc,QUERYESCSUPPORT,LPINT,NULL) */ /* Escape(hdc,QUERYESCSUPPORT,LPINT,NULL) */
/* Escape(hdc,SETLINECAP,LPINT,NULL) */ /* Escape(hdc,CLIP_TO_PATH,LPINT,NULL) */
case QUERYESCSUPPORT: case QUERYESCSUPPORT:
case SETLINECAP: case CLIP_TO_PATH:
case SETLINEJOIN:
{ {
LPINT16 x = (LPINT16)SEGPTR_NEW(INT16); LPINT16 x = (LPINT16)SEGPTR_NEW(INT16);
*x = *(INT*)lpszInData; *x = *(INT*)lpszInData;
...@@ -77,6 +76,19 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput, ...@@ -77,6 +76,19 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput,
break; break;
} }
/* Escape(hdc,SETLINECAP,LPINT,LPINT) */
case SETLINECAP:
case SETLINEJOIN:
case SETMITERLIMIT:
{
LPINT16 new = (LPINT16)SEGPTR_NEW(INT16);
LPINT16 old = (LPINT16)SEGPTR_NEW(INT16);
*new = *(INT*)lpszInData;
segin = SEGPTR_GET(new);
segout = SEGPTR_GET(old);
cbInput = sizeof(INT16);
break;
}
/* Escape(hdc,GETTECHNOLOGY,NULL,LPSTR); */ /* Escape(hdc,GETTECHNOLOGY,NULL,LPSTR); */
case GETTECHNOLOGY: { case GETTECHNOLOGY: {
segout = SEGPTR_GET(SEGPTR_ALLOC(200)); /* enough I hope */ segout = SEGPTR_GET(SEGPTR_ALLOC(200)); /* enough I hope */
...@@ -117,6 +129,15 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput, ...@@ -117,6 +129,15 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput,
SetAbortProc(hdc, (ABORTPROC)lpszInData); SetAbortProc(hdc, (ABORTPROC)lpszInData);
break; break;
/* Escape(hdc,END_PATH,PATHINFO,NULL); */
case END_PATH:
{
BYTE *p = SEGPTR_ALLOC(cbInput);
memcpy(p, lpszInData, cbInput);
segin = SEGPTR_GET(p);
break;
}
default: default:
break; break;
...@@ -130,9 +151,13 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput, ...@@ -130,9 +151,13 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput,
TRACE("target DC implements Escape %d\n",nEscape); TRACE("target DC implements Escape %d\n",nEscape);
SEGPTR_FREE(PTR_SEG_TO_LIN(segin)); SEGPTR_FREE(PTR_SEG_TO_LIN(segin));
break; break;
case SETLINECAP: case SETLINECAP:
case SETLINEJOIN: case SETLINEJOIN:
case SETMITERLIMIT:
*(LPINT)lpvOutData = *(LPINT16)PTR_SEG_TO_LIN(segout);
SEGPTR_FREE(PTR_SEG_TO_LIN(segin)); SEGPTR_FREE(PTR_SEG_TO_LIN(segin));
SEGPTR_FREE(PTR_SEG_TO_LIN(segout));
break; break;
case GETSCALINGFACTOR: case GETSCALINGFACTOR:
case GETPRINTINGOFFSET: case GETPRINTINGOFFSET:
...@@ -169,6 +194,8 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput, ...@@ -169,6 +194,8 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput,
break; break;
} }
case STARTDOC: case STARTDOC:
case CLIP_TO_PATH:
case END_PATH:
SEGPTR_FREE(PTR_SEG_TO_LIN(segin)); SEGPTR_FREE(PTR_SEG_TO_LIN(segin));
break; break;
......
...@@ -168,6 +168,9 @@ void InitDrawMode(LPDRAWMODE lpDrawMode) ...@@ -168,6 +168,9 @@ void InitDrawMode(LPDRAWMODE lpDrawMode)
lpDrawMode->CharExtra = 0x0000; lpDrawMode->CharExtra = 0x0000;
lpDrawMode->LbkColor = 0x00ffffff; lpDrawMode->LbkColor = 0x00ffffff;
lpDrawMode->LTextColor = 0x00000000; lpDrawMode->LTextColor = 0x00000000;
lpDrawMode->ICMCXform = 0; /* ? */
lpDrawMode->StretchBltMode = STRETCH_ANDSCANS;
lpDrawMode->eMiterLimit = 1;
} }
BOOL WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output, BOOL WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
......
...@@ -125,7 +125,10 @@ typedef struct DRAWMODE ...@@ -125,7 +125,10 @@ typedef struct DRAWMODE
SHORT BreakCount; SHORT BreakCount;
SHORT CharExtra; SHORT CharExtra;
COLORREF LbkColor; COLORREF LbkColor;
COLORREF LTextColor; COLORREF LTextColor;
DWORD ICMCXform;
SHORT StretchBltMode;
DWORD eMiterLimit;
} DRAWMODE, *LPDRAWMODE; } DRAWMODE, *LPDRAWMODE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment