update for HEAD-2003091401
[reactos.git] / subsys / win32k / objects / pen.c
1 /*
2  *  ReactOS W32 Subsystem
3  *  Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
4  *
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, write to the Free Software
17  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19 /* $Id$ */
20 #undef WIN32_LEAN_AND_MEAN
21 #include <windows.h>
22 #include <ddk/ntddk.h>
23 #include <win32k/pen.h>
24
25 #define NDEBUG
26 #include <win32k/debug1.h>
27
28 HPEN
29 STDCALL
30 NtGdiCreatePen(INT PenStyle, INT Width, COLORREF Color)
31 {
32   LOGPEN logpen;
33
34   logpen.lopnStyle = PenStyle;
35   logpen.lopnWidth.x = Width;
36   logpen.lopnWidth.y = 0;
37   logpen.lopnColor = Color;
38
39   return NtGdiCreatePenIndirect(&logpen);
40 }
41
42 HPEN
43 STDCALL
44 NtGdiCreatePenIndirect(CONST PLOGPEN lgpn)
45 {
46   PPENOBJ penPtr;
47   HPEN    hpen;
48
49   if (lgpn->lopnStyle > PS_INSIDEFRAME) return 0;
50
51   hpen = PENOBJ_AllocPen();
52   if (!hpen) return 0;
53
54   penPtr   = PENOBJ_LockPen( hpen );
55   ASSERT( penPtr );
56
57   penPtr->logpen.lopnStyle = lgpn->lopnStyle;
58   penPtr->logpen.lopnWidth = lgpn->lopnWidth;
59   penPtr->logpen.lopnColor = lgpn->lopnColor;
60   PENOBJ_UnlockPen( hpen );
61   return hpen;
62 }
63
64 HPEN
65 STDCALL
66 NtGdiExtCreatePen(DWORD  PenStyle,
67                        DWORD  Width,
68                        CONST PLOGBRUSH  lb,
69                        DWORD  StyleCount,
70                        CONST PDWORD  Style)
71 {
72   UNIMPLEMENTED;
73 }
74 /* EOF */