Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
22ae3bd1
Commit
22ae3bd1
authored
22 years ago
by
Huw D. M. Davies
Committed by
Alexandre Julliard
22 years ago
Browse files
Options
Downloads
Patches
Plain Diff
psdrv doesn't care about hGCClipRgn, just use GetClipRgn instead.
parent
4aa2c81d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/wineps/clipping.c
+52
-46
52 additions, 46 deletions
dlls/wineps/clipping.c
with
52 additions
and
46 deletions
dlls/wineps/clipping.c
+
52
−
46
View file @
22ae3bd1
...
...
@@ -27,67 +27,73 @@ WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
/***********************************************************************
* PSDRV_SetDeviceClipping
*/
VOID
PSDRV_SetDeviceClipping
(
PSDRV_PDEVICE
*
physDev
,
HRGN
hrgn
)
VOID
PSDRV_SetDeviceClipping
(
PSDRV_PDEVICE
*
physDev
,
HRGN
ignored
)
{
CHAR
szArrayName
[]
=
"clippath"
;
DWORD
size
;
RGNDATA
*
rgndata
;
RGNDATA
*
rgndata
=
NULL
;
HRGN
hrgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
BOOL
empty
;
TRACE
(
"hdc=%04x
\n
"
,
physDev
->
hdc
);
size
=
GetRegionData
(
hrgn
,
0
,
NULL
);
if
(
!
size
)
{
ERR
(
"Invalid region
\n
"
);
return
;
}
rgndata
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
rgndata
)
{
ERR
(
"Can't allocate buffer
\n
"
);
return
;
}
GetRegionData
(
hrgn
,
size
,
rgndata
);
empty
=
!
GetClipRgn
(
physDev
->
hdc
,
hrgn
);
/* We really shouldn't be using initclip */
PSDRV_WriteInitClip
(
physDev
);
/* check for NULL region */
if
(
rgndata
->
rdh
.
nCount
==
0
)
{
/* set an empty clip path. */
PSDRV_WriteRectClip
(
physDev
,
0
,
0
,
0
,
0
);
}
/* optimize when it is a simple region */
else
if
(
rgndata
->
rdh
.
nCount
==
1
)
{
RECT
*
pRect
=
(
RECT
*
)
rgndata
->
Buffer
;
if
(
!
empty
)
{
size
=
GetRegionData
(
hrgn
,
0
,
NULL
);
if
(
!
size
)
{
ERR
(
"Invalid region
\n
"
);
goto
end
;
}
PSDRV_WriteRectClip
(
physDev
,
pRect
->
left
,
pRect
->
top
,
pRect
->
right
-
pRect
->
left
,
pRect
->
bottom
-
pRect
->
top
);
}
else
{
INT
i
;
RECT
*
pRect
=
(
RECT
*
)
rgndata
->
Buffer
;
rgndata
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
rgndata
)
{
ERR
(
"Can't allocate buffer
\n
"
);
goto
end
;
}
PSDRV_WriteArrayDef
(
physDev
,
szArrayName
,
rgndata
->
rdh
.
nCount
*
4
);
GetRegionData
(
hrgn
,
size
,
rgndata
);
for
(
i
=
0
;
i
<
rgndata
->
rdh
.
nCount
;
i
++
,
pRect
++
)
/* check for NULL region */
if
(
rgndata
->
rdh
.
nCount
==
0
)
{
PSDRV_WriteArrayPut
(
physDev
,
szArrayName
,
i
*
4
,
pRect
->
left
);
PSDRV_WriteArrayPut
(
physDev
,
szArrayName
,
i
*
4
+
1
,
pRect
->
top
);
PSDRV_WriteArrayPut
(
physDev
,
szArrayName
,
i
*
4
+
2
,
pRect
->
right
-
pRect
->
left
);
PSDRV_WriteArrayPut
(
physDev
,
szArrayName
,
i
*
4
+
3
,
/* set an empty clip path. */
PSDRV_WriteRectClip
(
physDev
,
0
,
0
,
0
,
0
);
}
/* optimize when it is a simple region */
else
if
(
rgndata
->
rdh
.
nCount
==
1
)
{
RECT
*
pRect
=
(
RECT
*
)
rgndata
->
Buffer
;
PSDRV_WriteRectClip
(
physDev
,
pRect
->
left
,
pRect
->
top
,
pRect
->
right
-
pRect
->
left
,
pRect
->
bottom
-
pRect
->
top
);
}
else
{
INT
i
;
RECT
*
pRect
=
(
RECT
*
)
rgndata
->
Buffer
;
PSDRV_WriteRectClip2
(
physDev
,
szArrayName
);
}
PSDRV_WriteArrayDef
(
physDev
,
szArrayName
,
rgndata
->
rdh
.
nCount
*
4
);
HeapFree
(
GetProcessHeap
(),
0
,
rgndata
);
return
;
for
(
i
=
0
;
i
<
rgndata
->
rdh
.
nCount
;
i
++
,
pRect
++
)
{
PSDRV_WriteArrayPut
(
physDev
,
szArrayName
,
i
*
4
,
pRect
->
left
);
PSDRV_WriteArrayPut
(
physDev
,
szArrayName
,
i
*
4
+
1
,
pRect
->
top
);
PSDRV_WriteArrayPut
(
physDev
,
szArrayName
,
i
*
4
+
2
,
pRect
->
right
-
pRect
->
left
);
PSDRV_WriteArrayPut
(
physDev
,
szArrayName
,
i
*
4
+
3
,
pRect
->
bottom
-
pRect
->
top
);
}
PSDRV_WriteRectClip2
(
physDev
,
szArrayName
);
}
}
end:
if
(
rgndata
)
HeapFree
(
GetProcessHeap
(),
0
,
rgndata
);
DeleteObject
(
hrgn
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment