1c2c66affSColin Finck /*
2c2c66affSColin Finck * reactos/lib/gdi32/objects/path.c
3c2c66affSColin Finck *
4c2c66affSColin Finck * GDI32.DLL Path
5c2c66affSColin Finck *
6c2c66affSColin Finck * When you implement one of these functions,
7c2c66affSColin Finck * remove its stub from this file.
8c2c66affSColin Finck *
9c2c66affSColin Finck */
10c2c66affSColin Finck
11c2c66affSColin Finck #include <precomp.h>
12c2c66affSColin Finck
13c2c66affSColin Finck /*
14c2c66affSColin Finck * @implemented
15c2c66affSColin Finck */
16c2c66affSColin Finck BOOL
17c2c66affSColin Finck WINAPI
AbortPath(HDC hdc)18c2c66affSColin Finck AbortPath(
19c2c66affSColin Finck HDC hdc)
20c2c66affSColin Finck {
21c2c66affSColin Finck HANDLE_METADC0P(BOOL, AbortPath, FALSE, hdc);
22c2c66affSColin Finck return NtGdiAbortPath(hdc);
23c2c66affSColin Finck }
24c2c66affSColin Finck
25c2c66affSColin Finck
26c2c66affSColin Finck /*
27c2c66affSColin Finck * @implemented
28c2c66affSColin Finck */
29c2c66affSColin Finck BOOL
30c2c66affSColin Finck WINAPI
BeginPath(HDC hdc)31c2c66affSColin Finck BeginPath(
32c2c66affSColin Finck HDC hdc)
33c2c66affSColin Finck {
34c2c66affSColin Finck HANDLE_METADC0P(BOOL, BeginPath, FALSE, hdc);
35c2c66affSColin Finck return NtGdiBeginPath(hdc);
36c2c66affSColin Finck }
37c2c66affSColin Finck
38c2c66affSColin Finck /*
39c2c66affSColin Finck * @implemented
40c2c66affSColin Finck */
41c2c66affSColin Finck BOOL
42c2c66affSColin Finck WINAPI
CloseFigure(HDC hdc)43c2c66affSColin Finck CloseFigure(
44c2c66affSColin Finck HDC hdc)
45c2c66affSColin Finck {
46c2c66affSColin Finck HANDLE_METADC0P(BOOL, CloseFigure, FALSE, hdc);
47c2c66affSColin Finck return NtGdiCloseFigure(hdc);
48c2c66affSColin Finck }
49c2c66affSColin Finck
50c2c66affSColin Finck
51c2c66affSColin Finck /*
52c2c66affSColin Finck * @implemented
53c2c66affSColin Finck */
54c2c66affSColin Finck BOOL
55c2c66affSColin Finck WINAPI
EndPath(HDC hdc)56c2c66affSColin Finck EndPath(
57c2c66affSColin Finck HDC hdc)
58c2c66affSColin Finck {
59c2c66affSColin Finck HANDLE_METADC0P(BOOL, EndPath, FALSE, hdc);
60c2c66affSColin Finck return NtGdiEndPath( hdc );
61c2c66affSColin Finck }
62c2c66affSColin Finck
63c2c66affSColin Finck
64c2c66affSColin Finck /*
65c2c66affSColin Finck * @implemented
66c2c66affSColin Finck */
67c2c66affSColin Finck BOOL
68c2c66affSColin Finck WINAPI
FillPath(HDC hdc)69c2c66affSColin Finck FillPath(
70c2c66affSColin Finck HDC hdc)
71c2c66affSColin Finck {
72c2c66affSColin Finck HANDLE_METADC0P(BOOL, FillPath, FALSE, hdc);
73c2c66affSColin Finck return NtGdiFillPath( hdc );
74c2c66affSColin Finck }
75c2c66affSColin Finck
76c2c66affSColin Finck
77c2c66affSColin Finck /*
78c2c66affSColin Finck * @implemented
79c2c66affSColin Finck */
80c2c66affSColin Finck BOOL
81c2c66affSColin Finck WINAPI
FlattenPath(HDC hdc)82c2c66affSColin Finck FlattenPath(
83c2c66affSColin Finck HDC hdc)
84c2c66affSColin Finck {
85c2c66affSColin Finck HANDLE_METADC0P(BOOL, FlattenPath, FALSE, hdc);
86c2c66affSColin Finck return NtGdiFlattenPath ( hdc );
87c2c66affSColin Finck }
88c2c66affSColin Finck
89c2c66affSColin Finck
90c2c66affSColin Finck /*
91c2c66affSColin Finck * @implemented
92c2c66affSColin Finck */
93c2c66affSColin Finck INT
94c2c66affSColin Finck WINAPI
GetPath(HDC hdc,LPPOINT pptlBuf,LPBYTE pjTypes,INT cptBuf)95c2c66affSColin Finck GetPath(HDC hdc,
96c2c66affSColin Finck LPPOINT pptlBuf,
97c2c66affSColin Finck LPBYTE pjTypes,
98c2c66affSColin Finck INT cptBuf)
99c2c66affSColin Finck {
100c2c66affSColin Finck INT retValue = -1;
101c2c66affSColin Finck
102c2c66affSColin Finck if (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_METADC)
103c2c66affSColin Finck {
104c2c66affSColin Finck SetLastError(ERROR_INVALID_PARAMETER);
105c2c66affSColin Finck }
106c2c66affSColin Finck else
107c2c66affSColin Finck {
108c2c66affSColin Finck retValue = NtGdiGetPath(hdc,pptlBuf,pjTypes,cptBuf);
109c2c66affSColin Finck }
110c2c66affSColin Finck
111c2c66affSColin Finck return retValue;
112c2c66affSColin Finck }
113c2c66affSColin Finck
114c2c66affSColin Finck
115c2c66affSColin Finck /*
116c2c66affSColin Finck * @implemented
117c2c66affSColin Finck */
118c2c66affSColin Finck HRGN
119c2c66affSColin Finck WINAPI
PathToRegion(HDC hdc)120c2c66affSColin Finck PathToRegion(
121c2c66affSColin Finck HDC hdc)
122c2c66affSColin Finck {
123*fc16259fSJames Tabor HANDLE_METADC0P(HRGN, AbortPath, NULL, hdc);
124c2c66affSColin Finck return NtGdiPathToRegion(hdc);
125c2c66affSColin Finck }
126c2c66affSColin Finck
127c2c66affSColin Finck /*
128c2c66affSColin Finck * @implemented
129c2c66affSColin Finck */
130c2c66affSColin Finck BOOL
131c2c66affSColin Finck WINAPI
SetMiterLimit(HDC hdc,FLOAT a1,PFLOAT a2)132c2c66affSColin Finck SetMiterLimit(
133c2c66affSColin Finck HDC hdc,
134c2c66affSColin Finck FLOAT a1,
135c2c66affSColin Finck PFLOAT a2
136c2c66affSColin Finck )
137c2c66affSColin Finck {
138c2c66affSColin Finck BOOL Ret;
139c2c66affSColin Finck gxf_long worker, worker1;
140c2c66affSColin Finck
141c2c66affSColin Finck worker.f = a1;
142c2c66affSColin Finck Ret = NtGdiSetMiterLimit ( hdc, worker.l, a2 ? &worker1.l : NULL );
143c2c66affSColin Finck if (a2 && Ret) *a2 = worker1.f;
144c2c66affSColin Finck return Ret;
145c2c66affSColin Finck }
146c2c66affSColin Finck
147c2c66affSColin Finck
148c2c66affSColin Finck /*
149c2c66affSColin Finck * @implemented
150c2c66affSColin Finck */
151c2c66affSColin Finck BOOL
152c2c66affSColin Finck WINAPI
StrokeAndFillPath(HDC hdc)153c2c66affSColin Finck StrokeAndFillPath(
154c2c66affSColin Finck HDC hdc)
155c2c66affSColin Finck {
156c2c66affSColin Finck HANDLE_METADC0P(BOOL, StrokeAndFillPath, FALSE, hdc);
157c2c66affSColin Finck return NtGdiStrokeAndFillPath ( hdc );
158c2c66affSColin Finck }
159c2c66affSColin Finck
160c2c66affSColin Finck
161c2c66affSColin Finck /*
162c2c66affSColin Finck * @implemented
163c2c66affSColin Finck */
164c2c66affSColin Finck BOOL
165c2c66affSColin Finck WINAPI
StrokePath(HDC hdc)166c2c66affSColin Finck StrokePath(
167c2c66affSColin Finck HDC hdc)
168c2c66affSColin Finck {
169c2c66affSColin Finck HANDLE_METADC0P(BOOL, StrokePath, FALSE, hdc);
170c2c66affSColin Finck return NtGdiStrokePath ( hdc );
171c2c66affSColin Finck }
172c2c66affSColin Finck
173c2c66affSColin Finck
174c2c66affSColin Finck /*
175c2c66affSColin Finck * @implemented
176c2c66affSColin Finck */
177c2c66affSColin Finck BOOL
178c2c66affSColin Finck WINAPI
WidenPath(HDC hdc)179c2c66affSColin Finck WidenPath(
180c2c66affSColin Finck HDC hdc)
181c2c66affSColin Finck {
182c2c66affSColin Finck HANDLE_METADC0P(BOOL, WidenPath, FALSE, hdc);
183c2c66affSColin Finck return NtGdiWidenPath ( hdc );
184c2c66affSColin Finck }
185c2c66affSColin Finck
186c2c66affSColin Finck /*
187c2c66affSColin Finck * @implemented
188c2c66affSColin Finck */
189c2c66affSColin Finck BOOL
190c2c66affSColin Finck WINAPI
SelectClipPath(HDC hdc,int iMode)191c2c66affSColin Finck SelectClipPath(
192c2c66affSColin Finck HDC hdc,
193c2c66affSColin Finck int iMode)
194c2c66affSColin Finck {
195*fc16259fSJames Tabor HANDLE_EMETAFDC(BOOL, SelectClipPath, FALSE, hdc, iMode);
196c2c66affSColin Finck return NtGdiSelectClipPath(hdc, iMode);
197c2c66affSColin Finck }
198