source: trunk/src/gdi32/region.cpp@ 3313

Last change on this file since 3313 was 3273, checked in by sandervl, 25 years ago

GetRgnBox fix

File size: 10.5 KB
Line 
1/* $Id: region.cpp,v 1.3 2000-03-29 17:15:35 sandervl Exp $ */
2
3/*
4 * GDI32 region code
5 *
6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
7 * Copyright 1998 Patrick Haller
8 *
9 * Project Odin Software License can be found in LICENSE.TXT
10 *
11 */
12#include <os2win.h>
13#include <stdlib.h>
14#include <stdarg.h>
15#include <string.h>
16#include "misc.h"
17
18#define DBG_LOCALLOG DBG_region
19#include "dbglocal.h"
20
21//******************************************************************************
22//******************************************************************************
23HRGN WIN32API CreatePolyPolygonRgn( const POINT * arg1, const INT * arg2, int arg3, int arg4)
24{
25 dprintf(("GDI32: CreatePolyPolygonRgn\n"));
26 return O32_CreatePolyPolygonRgn(arg1, arg2, arg3, arg4);
27}
28//******************************************************************************
29//******************************************************************************
30HRGN WIN32API CreatePolygonRgn(const POINT * arg1, int arg2, int arg3)
31{
32 dprintf(("GDI32: CreatePolygonRgn"));
33 return O32_CreatePolygonRgn(arg1, arg2, arg3);
34}
35//******************************************************************************
36//******************************************************************************
37int WIN32API CombineRgn( HRGN arg1, HRGN arg2, HRGN arg3, int arg4)
38{
39 dprintf(("GDI32: CombineRgn"));
40 return O32_CombineRgn(arg1, arg2, arg3, arg4);
41}
42//******************************************************************************
43//******************************************************************************
44HRGN WIN32API CreateEllipticRgn( int arg1, int arg2, int arg3, int arg4)
45{
46 dprintf(("GDI32: CreateEllipticRgn"));
47 return O32_CreateEllipticRgn(arg1, arg2, arg3, arg4);
48}
49//******************************************************************************
50//******************************************************************************
51HRGN WIN32API CreateEllipticRgnIndirect( const RECT * arg1)
52{
53 dprintf(("GDI32: CreateEllipticRgnIndirect"));
54 return O32_CreateEllipticRgnIndirect(arg1);
55}
56//******************************************************************************
57//******************************************************************************
58HRGN WIN32API CreateRectRgn( int nLeftRect, int nTopRect, int nRightRect, int nBottomRect)
59{
60 dprintf(("GDI32: CreateRectRgn (%d,%d)(%d,%d)", nLeftRect, nTopRect, nRightRect, nBottomRect));
61 return O32_CreateRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect);
62}
63//******************************************************************************
64//******************************************************************************
65HRGN WIN32API CreateRectRgnIndirect( const RECT * lpRect)
66{
67 if(lpRect == NULL) {
68 SetLastError(ERROR_INVALID_PARAMETER);
69 return 0;
70 }
71 dprintf(("GDI32: CreateRectRgnIndirect (%d,%d)(%d,%d)", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom));
72 return O32_CreateRectRgnIndirect(lpRect);
73}
74//******************************************************************************
75//******************************************************************************
76HRGN WIN32API CreateRoundRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect,
77 int nWidthEllipse, int nHeightEllipse)
78{
79 dprintf(("GDI32: CreateRoundRectRgn (%d,%d)(%d,%d) (%d,%d)", nLeftRect, nTopRect, nRightRect, nBottomRect, nWidthEllipse, nHeightEllipse));
80 return O32_CreateRoundRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect, nWidthEllipse, nHeightEllipse);
81}
82//******************************************************************************
83//******************************************************************************
84BOOL WIN32API EqualRgn( HRGN arg1, HRGN arg2)
85{
86 dprintf(("GDI32: EqualRgn"));
87 return O32_EqualRgn(arg1, arg2);
88}
89//******************************************************************************
90//******************************************************************************
91HRGN WIN32API ExtCreateRegion( const XFORM * arg1, DWORD arg2, const RGNDATA * arg3)
92{
93 HRGN hRgn;
94
95 hRgn = O32_ExtCreateRegion(arg1, arg2, arg3);
96 dprintf(("GDI32: ExtCreateRegion %x %x %x returned %x", arg1, arg2, arg3, hRgn));
97 return hRgn;
98}
99//******************************************************************************
100//******************************************************************************
101int WIN32API ExtSelectClipRgn( HDC arg1, HRGN arg2, int arg3)
102{
103 dprintf(("GDI32: ExtSelectClipRgn"));
104 return O32_ExtSelectClipRgn(arg1, arg2, arg3);
105}
106//******************************************************************************
107//******************************************************************************
108BOOL WIN32API FillRgn( HDC arg1, HRGN arg2, HBRUSH arg3)
109{
110 dprintf(("GDI32: FillRgn"));
111 return O32_FillRgn(arg1, arg2, arg3);
112}
113//******************************************************************************
114//******************************************************************************
115BOOL WIN32API FrameRgn( HDC arg1, HRGN arg2, HBRUSH arg3, int arg4, int arg5)
116{
117 dprintf(("GDI32: FrameRgn"));
118 return O32_FrameRgn(arg1, arg2, arg3, arg4, arg5);
119}
120//******************************************************************************
121//******************************************************************************
122int WIN32API GetClipRgn( HDC arg1, HRGN arg2)
123{
124 dprintf(("GDI32: GetClipRgn"));
125 return O32_GetClipRgn(arg1, arg2);
126}
127//******************************************************************************
128//******************************************************************************
129DWORD WIN32API GetRegionData( HRGN arg1, DWORD arg2, PRGNDATA arg3)
130{
131 dprintf(("GDI32: GetRegionData"));
132 return O32_GetRegionData(arg1, arg2, arg3);
133}
134//******************************************************************************
135//******************************************************************************
136int WIN32API GetRgnBox(HRGN hRgn, PRECT pRect)
137{
138 dprintf(("GDI32: GetRgnBox %x %x", hRgn, pRect));
139 if(hRgn == 0) {
140//// SetLastError(ERROR_INVALID_PARAMETER);
141 return NULLREGION;
142 }
143 return O32_GetRgnBox(hRgn, pRect);
144}
145//******************************************************************************
146//******************************************************************************
147BOOL WIN32API InvertRgn( HDC arg1, HRGN arg2)
148{
149 dprintf(("GDI32: InvertRgn"));
150 return O32_InvertRgn(arg1, arg2);
151}
152//******************************************************************************
153//******************************************************************************
154int WIN32API OffsetClipRgn( HDC arg1, int arg2, int arg3)
155{
156 dprintf(("GDI32: OffsetClipRgn"));
157 return O32_OffsetClipRgn(arg1, arg2, arg3);
158}
159//******************************************************************************
160//******************************************************************************
161int WIN32API OffsetRgn( HRGN arg1, int arg2, int arg3)
162{
163 dprintf(("GDI32: OffsetRgn"));
164 return O32_OffsetRgn(arg1, arg2, arg3);
165}
166//******************************************************************************
167//******************************************************************************
168BOOL WIN32API PaintRgn( HDC arg1, HRGN arg2)
169{
170 dprintf(("GDI32: PaintRgn"));
171 return O32_PaintRgn(arg1, arg2);
172}
173//******************************************************************************
174//******************************************************************************
175HRGN WIN32API PathToRegion( HDC arg1)
176{
177 dprintf(("GDI32: PathToRegion"));
178 return O32_PathToRegion(arg1);
179}
180//******************************************************************************
181//******************************************************************************
182BOOL WIN32API PtInRegion( HRGN arg1, int arg2, int arg3)
183{
184 dprintf(("GDI32: PtInRegion"));
185 return O32_PtInRegion(arg1, arg2, arg3);
186}
187//******************************************************************************
188//******************************************************************************
189BOOL WIN32API RectInRegion( HRGN arg1, const RECT * arg2)
190{
191 dprintf(("GDI32: RectInRegion"));
192 return O32_RectInRegion(arg1, arg2);
193}
194//******************************************************************************
195//******************************************************************************
196int WIN32API SelectClipRgn( HDC hdc, HRGN hRgn)
197{
198 dprintf(("GDI32: SelectClipRgn %x %x", hdc, hRgn));
199 return O32_SelectClipRgn(hdc, hRgn);
200}
201//******************************************************************************
202//******************************************************************************
203BOOL WIN32API SetRectRgn( HRGN arg1, int arg2, int arg3, int arg4, int arg5)
204{
205 dprintf(("GDI32: SetRectRgn"));
206 return O32_SetRectRgn(arg1, arg2, arg3, arg4, arg5);
207}
208/*****************************************************************************
209 * Name : int GetMetaRgn
210 * Purpose : The GetMetaRgn function retrieves the current metaregion for
211 * the specified device context.
212 * Parameters: HDC hdc handle of device context
213 * HRGN hrgn handle of region
214 * Variables :
215 * Result : 0 / 1
216 * Remark :
217 * Status : UNTESTED STUB
218 *
219 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
220 *****************************************************************************/
221
222int WIN32API GetMetaRgn(HDC hdc,
223 HRGN hrgn)
224{
225 dprintf(("GDI32: GetMetaRgn(%08xh, %08xh) not implemented.\n",
226 hdc,
227 hrgn));
228
229 return (0);
230}
231/*****************************************************************************
232 * Name : int SetMetaRgn
233 * Purpose : The SetMetaRgn function intersects the current clipping region
234 * for the specified device context with the current metaregion
235 * and saves the combined region as the new metaregion for the
236 * specified device context. The clipping region is reset to a null region.
237 * Parameters: HDC hdc handle of device context
238 * Variables :
239 * Result : TRUE / FALSE
240 * Remark :
241 * Status : UNTESTED STUB
242 *
243 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
244 *****************************************************************************/
245
246BOOL WIN32API SetMetaRgn(HDC hdc)
247{
248 dprintf(("GDI32: SetMetaRgn(%08xh) not implemented.\n",
249 hdc));
250
251 return (NULLREGION);
252}
253//******************************************************************************
254//******************************************************************************
Note: See TracBrowser for help on using the repository browser.