mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 19:26:05 +00:00
- PS_NULL might always be a LOGPEN, but can be retrieved as LOGPEN and EXTLOGPEN, distinguished by the supplied buffer size
- Fixes 8 gdi32 pen winetests, finally all left failures are visible in one cmd window ;-) svn path=/trunk/; revision=37693
This commit is contained in:
@@ -209,8 +209,23 @@ PEN_GetObject(PGDIBRUSHOBJ pPenObject, INT cbCount, PLOGPEN pBuffer)
|
||||
PLOGPEN pLogPen;
|
||||
PEXTLOGPEN pExtLogPen;
|
||||
INT cbRetCount;
|
||||
BOOLEAN isOldPen;
|
||||
|
||||
if (pPenObject->flAttrs & GDIBRUSH_IS_OLDSTYLEPEN)
|
||||
isOldPen = (pPenObject->flAttrs & GDIBRUSH_IS_OLDSTYLEPEN) > 0;
|
||||
if ((pPenObject->ulPenStyle & PS_STYLE_MASK) == PS_NULL)
|
||||
{
|
||||
/* PS_NULL can be retrieved as LOGPEN or as EXTLOGPEN */
|
||||
if (cbCount == sizeof(LOGPEN))
|
||||
{
|
||||
isOldPen = TRUE;
|
||||
}
|
||||
else if (cbCount == sizeof(EXTLOGPEN))
|
||||
{
|
||||
isOldPen = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (isOldPen)
|
||||
{
|
||||
cbRetCount = sizeof(LOGPEN);
|
||||
if (pBuffer)
|
||||
|
||||
Reference in New Issue
Block a user