Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
fa28b5ea
Commit
fa28b5ea
authored
May 19, 2003
by
Huw Davies
Committed by
Alexandre Julliard
May 19, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GetRandomRgn(...,1) returns the current clipping rgn.
Moved GetRandomRgn and the MetaRgn functions to objects/clipping.c.
parent
040b3e1d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
69 deletions
+80
-69
wingdi.h
include/wingdi.h
+3
-0
clipping.c
objects/clipping.c
+74
-0
region.c
objects/region.c
+3
-69
No files found.
include/wingdi.h
View file @
fa28b5ea
...
...
@@ -1479,6 +1479,9 @@ typedef struct tagEXTLOGPEN
#define RGN_COPY 5
#define RGN_MIN RGN_AND
#define RGN_MAX RGN_COPY
#define SYSRGN 4
/* Device contexts */
/* Polygon modes */
...
...
objects/clipping.c
View file @
fa28b5ea
...
...
@@ -497,3 +497,77 @@ INT16 WINAPI RestoreVisRgn16( HDC16 hdc16 )
GDI_ReleaseObj
(
hdc
);
return
ret
;
}
/***********************************************************************
* GetRandomRgn [GDI32.@]
*
* NOTES
* This function is documented in MSDN online for the case of
* dwCode == SYSRGN (4).
*
* For dwCode == 1 it should return the clip region
* 2 " " " the meta region
* 3 " " " the intersection of the clip with
* the meta region (== 'Rao' region).
*
* See http://www.codeproject.com/gdi/cliprgnguide.asp
*/
INT
WINAPI
GetRandomRgn
(
HDC
hDC
,
HRGN
hRgn
,
DWORD
dwCode
)
{
switch
(
dwCode
)
{
case
SYSRGN
:
/* == 4 */
{
DC
*
dc
=
DC_GetDCPtr
(
hDC
);
if
(
!
dc
)
return
-
1
;
CombineRgn
(
hRgn
,
dc
->
hVisRgn
,
0
,
RGN_COPY
);
GDI_ReleaseObj
(
hDC
);
/*
* On Windows NT/2000,
* the region returned is in screen coordinates.
* On Windows 95/98,
* the region returned is in window coordinates
*/
if
(
!
(
GetVersion
()
&
0x80000000
))
{
POINT
org
;
GetDCOrgEx
(
hDC
,
&
org
);
OffsetRgn
(
hRgn
,
org
.
x
,
org
.
y
);
}
return
1
;
}
case
1
:
/* clip region */
return
GetClipRgn
(
hDC
,
hRgn
);
default:
WARN
(
"Unknown dwCode %ld
\n
"
,
dwCode
);
return
-
1
;
}
return
-
1
;
}
/***********************************************************************
* GetMetaRgn (GDI32.@)
*/
INT
WINAPI
GetMetaRgn
(
HDC
hdc
,
HRGN
hRgn
)
{
FIXME
(
"stub
\n
"
);
return
0
;
}
/***********************************************************************
* SetMetaRgn (GDI32.@)
*/
INT
WINAPI
SetMetaRgn
(
HDC
hdc
)
{
FIXME
(
"stub
\n
"
);
return
ERROR
;
}
objects/region.c
View file @
fa28b5ea
...
...
@@ -600,11 +600,12 @@ INT WINAPI GetRgnBox( HRGN hrgn, LPRECT rect )
if
(
obj
)
{
INT
ret
;
TRACE
(
" %p
\n
"
,
hrgn
);
rect
->
left
=
obj
->
rgn
->
extents
.
left
;
rect
->
top
=
obj
->
rgn
->
extents
.
top
;
rect
->
right
=
obj
->
rgn
->
extents
.
right
;
rect
->
bottom
=
obj
->
rgn
->
extents
.
bottom
;
TRACE
(
"%p (%ld,%ld-%ld,%ld)
\n
"
,
hrgn
,
rect
->
left
,
rect
->
top
,
rect
->
right
,
rect
->
bottom
);
ret
=
get_region_type
(
obj
);
GDI_ReleaseObj
(
hrgn
);
return
ret
;
...
...
@@ -624,7 +625,7 @@ HRGN WINAPI CreateRectRgn(INT left, INT top, INT right, INT bottom)
if
(
!
(
hrgn
=
REGION_CreateRegion
(
RGN_DEFAULT_RECTS
)))
return
0
;
TRACE
(
"
\n
"
);
TRACE
(
"
%d,%d-%d,%d
\n
"
,
left
,
top
,
right
,
bottom
);
SetRectRgn
(
hrgn
,
left
,
top
,
right
,
bottom
);
return
hrgn
;
}
...
...
@@ -2706,70 +2707,3 @@ HRGN WINAPI CreatePolygonRgn( const POINT *points, INT count,
{
return
CreatePolyPolygonRgn
(
points
,
&
count
,
1
,
mode
);
}
/***********************************************************************
* GetRandomRgn [GDI32.@]
*
* NOTES
* This function is documented in MSDN online
*/
INT
WINAPI
GetRandomRgn
(
HDC
hDC
,
HRGN
hRgn
,
DWORD
dwCode
)
{
switch
(
dwCode
)
{
case
4
:
/* == SYSRGN ? */
{
DC
*
dc
=
DC_GetDCPtr
(
hDC
);
OSVERSIONINFOA
vi
;
POINT
org
;
if
(
!
dc
)
return
-
1
;
CombineRgn
(
hRgn
,
dc
->
hVisRgn
,
0
,
RGN_COPY
);
/*
* On Windows NT/2000,
* the region returned is in screen coordinates.
* On Windows 95/98,
* the region returned is in window coordinates
*/
vi
.
dwOSVersionInfoSize
=
sizeof
(
vi
);
if
(
GetVersionExA
(
&
vi
)
&&
vi
.
dwPlatformId
==
VER_PLATFORM_WIN32_NT
)
GetDCOrgEx
(
hDC
,
&
org
);
else
org
.
x
=
org
.
y
=
0
;
OffsetRgn
(
hRgn
,
org
.
x
,
org
.
y
);
GDI_ReleaseObj
(
hDC
);
return
1
;
}
/* case 1:
return GetClipRgn (hDC, hRgn);
*/
default:
WARN
(
"Unknown dwCode %ld
\n
"
,
dwCode
);
return
-
1
;
}
return
-
1
;
}
/***********************************************************************
* GetMetaRgn (GDI32.@)
*/
INT
WINAPI
GetMetaRgn
(
HDC
hdc
,
HRGN
hRgn
)
{
FIXME
(
"stub
\n
"
);
return
0
;
}
/***********************************************************************
* SetMetaRgn (GDI32.@)
*/
INT
WINAPI
SetMetaRgn
(
HDC
hdc
)
{
FIXME
(
"stub
\n
"
);
return
ERROR
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment