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

Last change on this file since 3702 was 3677, checked in by sandervl, 25 years ago

moved clip region/rect functions to user32

File size: 9.3 KB
Line 
1/* $Id: region.cpp,v 1.5 2000-06-08 18:07:07 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//******************************************************************************
101BOOL WIN32API FillRgn( HDC arg1, HRGN arg2, HBRUSH arg3)
102{
103 dprintf(("GDI32: FillRgn"));
104 return O32_FillRgn(arg1, arg2, arg3);
105}
106//******************************************************************************
107//******************************************************************************
108BOOL WIN32API FrameRgn( HDC arg1, HRGN arg2, HBRUSH arg3, int arg4, int arg5)
109{
110 dprintf(("GDI32: FrameRgn"));
111 return O32_FrameRgn(arg1, arg2, arg3, arg4, arg5);
112}
113//******************************************************************************
114//******************************************************************************
115DWORD WIN32API GetRegionData( HRGN arg1, DWORD arg2, PRGNDATA arg3)
116{
117 dprintf(("GDI32: GetRegionData"));
118 return O32_GetRegionData(arg1, arg2, arg3);
119}
120//******************************************************************************
121//******************************************************************************
122int WIN32API GetRgnBox(HRGN hRgn, PRECT pRect)
123{
124 dprintf(("GDI32: GetRgnBox %x %x", hRgn, pRect));
125 if(hRgn == 0) {
126//// SetLastError(ERROR_INVALID_PARAMETER);
127 return NULLREGION;
128 }
129 return O32_GetRgnBox(hRgn, pRect);
130}
131//******************************************************************************
132//******************************************************************************
133BOOL WIN32API InvertRgn( HDC arg1, HRGN arg2)
134{
135 dprintf(("GDI32: InvertRgn"));
136 return O32_InvertRgn(arg1, arg2);
137}
138//******************************************************************************
139//******************************************************************************
140int WIN32API OffsetRgn( HRGN arg1, int arg2, int arg3)
141{
142 dprintf(("GDI32: OffsetRgn"));
143 return O32_OffsetRgn(arg1, arg2, arg3);
144}
145//******************************************************************************
146//******************************************************************************
147BOOL WIN32API PaintRgn( HDC arg1, HRGN arg2)
148{
149 dprintf(("GDI32: PaintRgn"));
150 return O32_PaintRgn(arg1, arg2);
151}
152//******************************************************************************
153//******************************************************************************
154HRGN WIN32API PathToRegion( HDC arg1)
155{
156 dprintf(("GDI32: PathToRegion"));
157 return O32_PathToRegion(arg1);
158}
159//******************************************************************************
160//******************************************************************************
161BOOL WIN32API PtInRegion( HRGN arg1, int arg2, int arg3)
162{
163 dprintf(("GDI32: PtInRegion"));
164 return O32_PtInRegion(arg1, arg2, arg3);
165}
166//******************************************************************************
167//******************************************************************************
168BOOL WIN32API RectInRegion( HRGN arg1, const RECT * arg2)
169{
170 dprintf(("GDI32: RectInRegion"));
171 return O32_RectInRegion(arg1, arg2);
172}
173//******************************************************************************
174//******************************************************************************
175BOOL WIN32API SetRectRgn( HRGN arg1, int arg2, int arg3, int arg4, int arg5)
176{
177 dprintf(("GDI32: SetRectRgn"));
178 return O32_SetRectRgn(arg1, arg2, arg3, arg4, arg5);
179}
180/*****************************************************************************
181 * Name : int GetMetaRgn
182 * Purpose : The GetMetaRgn function retrieves the current metaregion for
183 * the specified device context.
184 * Parameters: HDC hdc handle of device context
185 * HRGN hrgn handle of region
186 * Variables :
187 * Result : 0 / 1
188 * Remark :
189 * Status : UNTESTED STUB
190 *
191 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
192 *****************************************************************************/
193
194int WIN32API GetMetaRgn(HDC hdc,
195 HRGN hrgn)
196{
197 dprintf(("GDI32: GetMetaRgn(%08xh, %08xh) not implemented.\n",
198 hdc,
199 hrgn));
200
201 return (0);
202}
203/*****************************************************************************
204 * Name : int SetMetaRgn
205 * Purpose : The SetMetaRgn function intersects the current clipping region
206 * for the specified device context with the current metaregion
207 * and saves the combined region as the new metaregion for the
208 * specified device context. The clipping region is reset to a null region.
209 * Parameters: HDC hdc handle of device context
210 * Variables :
211 * Result : TRUE / FALSE
212 * Remark :
213 * Status : UNTESTED STUB
214 *
215 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
216 *****************************************************************************/
217
218BOOL WIN32API SetMetaRgn(HDC hdc)
219{
220 dprintf(("GDI32: SetMetaRgn(%08xh) not implemented.\n",
221 hdc));
222
223 return (NULLREGION);
224}
225//******************************************************************************
226//******************************************************************************
Note: See TracBrowser for help on using the repository browser.