mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
- Move slightly changed PS_ALTERNATE and PS_INSIDEFRAME checks from win32k to gdi32
- Don't restrict the width of PS_SOLID pens - Fixes 25 gdi32 pen winetests - Pen types left tbd: PS_NULL (problems in GetObject and ExtCreatePen) and PS_ALTNATE (EngLineTo/StrokePath does not support bitmap pens) svn path=/trunk/; revision=37620
This commit is contained in:
@@ -30,6 +30,18 @@ ExtCreatePen(DWORD dwPenStyle,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if ((dwPenStyle & PS_STYLE_MASK) == PS_INSIDEFRAME &&
|
||||
(dwPenStyle & PS_TYPE_MASK) != PS_GEOMETRIC)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
else if ((dwPenStyle & PS_STYLE_MASK) == PS_ALTERNATE &&
|
||||
(dwPenStyle & PS_TYPE_MASK) != PS_COSMETIC)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dwStyleCount || lpStyle)
|
||||
|
||||
@@ -79,7 +79,7 @@ IntGdiExtCreatePen(
|
||||
hPen = PenObject->BaseObject.hHmgr;
|
||||
|
||||
// If nWidth is zero, the pen is a single pixel wide, regardless of the current transformation.
|
||||
if ((bOldStylePen) && (!dwWidth)) dwWidth = 1;
|
||||
if ((bOldStylePen) && (!dwWidth) && (dwPenStyle & PS_STYLE_MASK) != PS_SOLID) dwWidth = 1;
|
||||
|
||||
PenObject->ptPenWidth.x = dwWidth;
|
||||
PenObject->ptPenWidth.y = 0;
|
||||
@@ -108,8 +108,6 @@ IntGdiExtCreatePen(
|
||||
break;
|
||||
|
||||
case PS_ALTERNATE:
|
||||
/* PS_ALTERNATE is applicable only for cosmetic pens */
|
||||
if ((dwPenStyle & PS_TYPE_MASK) == PS_GEOMETRIC) goto ExitCleanup;
|
||||
PenObject->flAttrs |= GDIBRUSH_IS_BITMAP;
|
||||
PenObject->hbmPattern = IntGdiCreateBitmap(24, 1, 1, 1, (LPBYTE)PatternAlternate);
|
||||
break;
|
||||
@@ -135,9 +133,6 @@ IntGdiExtCreatePen(
|
||||
break;
|
||||
|
||||
case PS_INSIDEFRAME:
|
||||
/* FIXME: does it need some additional work? */
|
||||
/* PS_INSIDEFRAME is applicable only for geometric pens */
|
||||
if ((dwPenStyle & PS_TYPE_MASK) == PS_COSMETIC) goto ExitCleanup;
|
||||
PenObject->flAttrs |= (GDIBRUSH_IS_SOLID|GDIBRUSH_IS_INSIDEFRAME);
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user