Commit b8d450f9 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Allow pens with styles greater than PS_INSIDEFRAME to be created with

CreatePenIndirect and ExtCreatePen.
parent 5f74d679
......@@ -74,7 +74,6 @@ HPEN WINAPI CreatePenIndirect( const LOGPEN * pen )
PENOBJ * penPtr;
HPEN hpen;
if (pen->lopnStyle > PS_INSIDEFRAME) return 0;
if (!(penPtr = GDI_AllocObject( sizeof(PENOBJ), PEN_MAGIC, &hpen ))) return 0;
penPtr->logpen.lopnStyle = pen->lopnStyle;
penPtr->logpen.lopnWidth = pen->lopnWidth;
......@@ -105,11 +104,11 @@ HPEN WINAPI ExtCreatePen( DWORD style, DWORD width,
if (!(penPtr = GDI_AllocObject( sizeof(PENOBJ), PEN_MAGIC, &hpen ))) return 0;
penPtr->logpen.lopnStyle = style & ~PS_TYPE_MASK;
/* PS_USERSTYLE and PS_ALTERNATE workaround */
if((penPtr->logpen.lopnStyle & PS_STYLE_MASK) > PS_INSIDEFRAME)
/* PS_USERSTYLE workaround */
if((penPtr->logpen.lopnStyle & PS_STYLE_MASK) == PS_USERSTYLE)
penPtr->logpen.lopnStyle =
(penPtr->logpen.lopnStyle & ~PS_STYLE_MASK) | PS_SOLID;
penPtr->logpen.lopnWidth.x = (style & PS_GEOMETRIC) ? width : 1;
penPtr->logpen.lopnWidth.y = 0;
penPtr->logpen.lopnColor = brush->lbColor;
......
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