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_INVALID_PARAMETER
POBJ NTAPI GDIOBJ_ReferenceObjectByHandle(HGDIOBJ hobj, UCHAR objt)
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)
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
HPEN APIENTRY NtGdiCreatePen(INT PenStyle, INT Width, COLORREF Color, IN HBRUSH hbr)
struct tagEXTLOGPEN EXTLOGPEN
#define ERROR_NOT_ENOUGH_MEMORY
VOID FASTCALL IntGdiSetSolidPenColor(HPEN hPen, COLORREF Color)
struct tagLOGPEN * PLOGPEN
#define BR_IS_OLDSTYLEPEN
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
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)
#define GDI_HANDLE_GET_TYPE(h)
VOID NTAPI GDIOBJ_vDeleteObject(POBJ pobj)
#define NT_SUCCESS(StatCode)
#define EXCEPTION_EXECUTE_HANDLER
#define ExAllocatePoolWithTag(hernya, size, tag)
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
#define PEN_ShareUnlockPen(ppen)
VOID FASTCALL SetLastNtError(NTSTATUS Status)
PBRUSH NTAPI PEN_AllocPenWithHandle(VOID)
static VOID PEN_vInit(PPEN ppen)
#define FLOATOBJ_SetLong(pf, l)
#define PEN_UnlockPen(pPenObj)
struct tagEXTLOGPEN * PEXTLOGPEN
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 BR_IS_DEFAULTSTYLE
POBJ NTAPI GDIOBJ_AllocObjWithHandle(ULONG ObjectType, ULONG cjSize)
INT APIENTRY PEN_GetObject(PBRUSH pbrushPen, INT cbCount, PLOGPEN pBuffer)
#define BR_IS_INSIDEFRAME
PBRUSH NTAPI PEN_AllocExtPenWithHandle(VOID)
#define RtlCopyMemory(Destination, Source, Length)
#define _SEH2_EXCEPT(...)
#define _SEH2_GetExceptionCode()
PBRUSH FASTCALL PEN_ShareLockPen(HPEN hobj)
#define ExFreePoolWithTag(_P, _T)
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
static const WCHAR dwWidth[]
PULONG MinorVersion OPTIONAL