89 static ULONG aulStyleAlternate[] = { 1, 1 };
90 static ULONG aulStyleDash[] = { 6, 2 };
91 static ULONG aulStyleDot[] = { 1, 1 };
92 static ULONG aulStyleDashDot[] = { 3, 2, 1, 2 };
93 static ULONG aulStyleDashDotDot[] = { 3, 1, 1, 1, 1, 1 };
115 DPRINT(
"Can't allocate pen\n");
169 pbrushPen->ulPenStyle = dwPenStyle;
170 pbrushPen->BrushAttr.lbColor = ulColor;
171 pbrushPen->iBrushStyle = ulBrushStyle;
173 pbrushPen->hbmClient = (
HANDLE)ulClientHatch;
174 pbrushPen->dwStyleCount = 0;
175 pbrushPen->pStyle =
NULL;
176 pbrushPen->ulStyleSize = 0;
191 pbrushPen->pStyle = aulStyleAlternate;
192 pbrushPen->dwStyleCount =
_countof(aulStyleAlternate);
197 pbrushPen->pStyle = aulStyleDot;
198 pbrushPen->dwStyleCount =
_countof(aulStyleDot);
203 pbrushPen->pStyle = aulStyleDash;
204 pbrushPen->dwStyleCount =
_countof(aulStyleDash);
209 pbrushPen->pStyle = aulStyleDashDot;
210 pbrushPen->dwStyleCount =
_countof(aulStyleDashDot);
215 pbrushPen->pStyle = aulStyleDashDotDot;
216 pbrushPen->dwStyleCount =
_countof(aulStyleDashDotDot);
228 for(
i = 0; (
i < dwStyleCount) && !has_neg;
i++)
230 has_neg = has_neg || (((
INT)(pStyle[
i])) < 0);
231 all_zero = all_zero && (pStyle[
i] == 0);
234 if(all_zero || has_neg)
241 pbrushPen->dwStyleCount = dwStyleCount;
242 pbrushPen->pStyle = pStyle;
246 DPRINT1(
"IntGdiExtCreatePen unknown penstyle %x\n", dwPenStyle);
250 if (pbrushPen->pStyle !=
NULL)
252 for (
i = 0;
i < pbrushPen->dwStyleCount;
i++)
254 pbrushPen->ulStyleSize += pbrushPen->pStyle[
i];
258 NT_ASSERT((pbrushPen->dwStyleCount == 0) || (pbrushPen->pStyle !=
NULL));
265 pbrushPen->pStyle =
NULL;
282 pbrPen->BrushAttr.lbColor =
Color & 0xFFFFFF;
298 cbRetCount =
sizeof(
LOGPEN);
301 if (
cbCount < cbRetCount)
return 0;
310 pExtLogPen->
elpColor = pbrushPen->BrushAttr.lbColor;
320 pLogPen->
lopnStyle = pbrushPen->ulPenStyle;
321 pLogPen->
lopnColor = pbrushPen->BrushAttr.lbColor;
328 0 : pbrushPen->dwStyleCount;
334 if (
cbCount < cbRetCount)
return 0;
337 pExtLogPen->
elpWidth = pbrushPen->lWidth;
339 pExtLogPen->
elpColor = pbrushPen->BrushAttr.lbColor;
342 for (
i = 0;
i < dwStyleCount;
i++)
401 if ((
int)dwStyleCount < 0)
return 0;
402 if (dwStyleCount > 16)
428 else if ((ulBrushStyle !=
BS_SOLID) &&
441 if (dwStyleCount > 0)
443 if (pUnsafeStyle ==
NULL)
450 dwStyleCount *
sizeof(
DWORD),
462 dwStyleCount *
sizeof(
DWORD));
508 if (!hPen && pSafeStyle)
#define ERROR_NOT_ENOUGH_MEMORY
#define NT_SUCCESS(StatCode)
static const WCHAR dwWidth[]
#define ERROR_INVALID_PARAMETER
#define ExAllocatePoolWithTag(hernya, size, tag)
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
#define BR_IS_OLDSTYLEPEN
#define BR_IS_INSIDEFRAME
#define BR_IS_DEFAULTSTYLE
#define GDI_HANDLE_GET_TYPE(h)
@ GDILoObjType_LO_EXTPEN_TYPE
@ GDILoObjType_LO_PEN_TYPE
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define EXCEPTION_EXECUTE_HANDLER
#define ExFreePoolWithTag(_P, _T)
__kernel_entry W32KAPI HPEN APIENTRY NtGdiCreatePen(_In_ INT iPenStyle, _In_ INT iPenWidth, _In_ COLORREF cr, _In_opt_ HBRUSH hbr)
#define PEN_UnlockPen(pPenObj)
#define PEN_ShareUnlockPen(ppen)
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
PULONG MinorVersion OPTIONAL
#define RtlCopyMemory(Destination, Source, Length)
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
POBJ NTAPI GDIOBJ_ReferenceObjectByHandle(HGDIOBJ hobj, UCHAR objt)
POBJ NTAPI GDIOBJ_AllocObjWithHandle(ULONG ObjectType, ULONG cjSize)
VOID NTAPI GDIOBJ_vDeleteObject(POBJ pobj)
PBRUSH NTAPI PEN_AllocExtPenWithHandle(VOID)
PBRUSH NTAPI PEN_AllocPenWithHandle(VOID)
HPEN APIENTRY IntGdiExtCreatePen(DWORD dwPenStyle, DWORD dwWidth, IN ULONG ulBrushStyle, IN ULONG ulColor, IN ULONG_PTR ulClientHatch, IN ULONG_PTR ulHatch, DWORD dwStyleCount, PULONG pStyle, IN ULONG cjDIB, IN BOOL bOldStylePen, IN OPTIONAL HBRUSH hbrush)
static VOID PEN_vInit(PPEN ppen)
PBRUSH FASTCALL PEN_ShareLockPen(HPEN hobj)
INT APIENTRY PEN_GetObject(PBRUSH pbrushPen, INT cbCount, PLOGPEN pBuffer)
VOID FASTCALL IntGdiSetSolidPenColor(HPEN hPen, COLORREF Color)
HPEN APIENTRY NtGdiExtCreatePen(DWORD dwPenStyle, DWORD ulWidth, IN ULONG ulBrushStyle, IN ULONG ulColor, IN ULONG_PTR ulClientHatch, IN ULONG_PTR ulHatch, DWORD dwStyleCount, PULONG pUnsafeStyle, IN ULONG cjDIB, IN BOOL bOldStylePen, IN OPTIONAL HBRUSH hBrush)
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
#define FLOATOBJ_SetLong(pf, l)
struct tagEXTLOGPEN EXTLOGPEN
struct tagEXTLOGPEN * PEXTLOGPEN
struct tagLOGPEN * PLOGPEN