:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / subsys / win32k / objects / pen.c
1 #undef WIN32_LEAN_AND_MEAN
2 #include <windows.h>
3 #include <ddk/ntddk.h>
4 #include <win32k/pen.h>
5
6 // #define NDEBUG
7 #include <win32k/debug1.h>
8
9 HPEN
10 STDCALL
11 W32kCreatePen(INT PenStyle, INT Width, COLORREF Color)
12 {
13   LOGPEN logpen;
14
15   logpen.lopnStyle = PenStyle;
16   logpen.lopnWidth.x = Width;
17   logpen.lopnWidth.y = 0;
18   logpen.lopnColor = Color;
19
20   return W32kCreatePenIndirect(&logpen);
21 }
22
23 HPEN
24 STDCALL
25 W32kCreatePenIndirect(CONST PLOGPEN lgpn)
26 {
27   PPENOBJ penPtr;
28   HPEN    hpen;
29
30   if (lgpn->lopnStyle > PS_INSIDEFRAME) return 0;
31
32   hpen = PENOBJ_AllocPen();
33   if (!hpen) return 0;
34
35   penPtr   = PENOBJ_LockPen( hpen );
36   ASSERT( penPtr );
37
38   penPtr->logpen.lopnStyle = lgpn->lopnStyle;
39   penPtr->logpen.lopnWidth = lgpn->lopnWidth;
40   penPtr->logpen.lopnColor = lgpn->lopnColor;
41   PENOBJ_UnlockPen( hpen );
42   return hpen;
43 }
44
45 HPEN
46 STDCALL
47 W32kExtCreatePen(DWORD  PenStyle,
48                        DWORD  Width,
49                        CONST PLOGBRUSH  lb,
50                        DWORD  StyleCount,
51                        CONST PDWORD  Style)
52 {
53   UNIMPLEMENTED;
54 }