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
1613e791
Commit
1613e791
authored
Jul 25, 1999
by
Huw D M Davies
Committed by
Alexandre Julliard
Jul 25, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rewrote PSDRV_SetDeviceClipping to use GetRegionData API.
parent
2f4bd661
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
11 deletions
+28
-11
clipping.c
graphics/psdrv/clipping.c
+28
-11
No files found.
graphics/psdrv/clipping.c
View file @
1613e791
...
...
@@ -7,8 +7,8 @@
#include "gdi.h"
#include "psdrv.h"
#include "region.h"
#include "debugtools.h"
#include "winbase.h"
DEFAULT_DEBUG_CHANNEL
(
psdrv
)
...
...
@@ -18,23 +18,38 @@ DEFAULT_DEBUG_CHANNEL(psdrv)
VOID
PSDRV_SetDeviceClipping
(
DC
*
dc
)
{
CHAR
szArrayName
[]
=
"clippath"
;
RGNOBJ
*
obj
=
(
RGNOBJ
*
)
GDI_GetObjPtr
(
dc
->
w
.
hGCClipRgn
,
REGION_MAGIC
);
if
(
!
obj
)
{
ERR_
(
psdrv
)(
"Rgn is 0. Please report this.
\n
"
);
DWORD
size
;
RGNDATA
*
rgndata
;
TRACE
(
"hdc=%04x
\n
"
,
dc
->
hSelf
);
if
(
dc
->
w
.
hGCClipRgn
==
0
)
{
ERR
(
"Rgn is 0. Please report this.
\n
"
);
return
;
}
TRACE_
(
psdrv
)(
"dc=%p"
,
dc
);
if
(
obj
->
rgn
->
numRects
>
0
)
size
=
GetRegionData
(
dc
->
w
.
hGCClipRgn
,
0
,
NULL
);
if
(
!
size
)
{
ERR
(
"Invalid region
\n
"
);
return
;
}
rgndata
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
rgndata
)
{
ERR
(
"Can't allocate buffer
\n
"
);
return
;
}
GetRegionData
(
dc
->
w
.
hGCClipRgn
,
size
,
rgndata
);
if
(
rgndata
->
rdh
.
nCount
>
0
)
{
INT
i
;
RECT
*
pRect
=
obj
->
rgn
->
rects
;
RECT
*
pRect
=
(
RECT
*
)
rgndata
->
Buffer
;
PSDRV_WriteArrayDef
(
dc
,
szArrayName
,
obj
->
rgn
->
numRects
*
4
);
PSDRV_WriteArrayDef
(
dc
,
szArrayName
,
rgndata
->
rdh
.
nCount
*
4
);
for
(
i
=
0
;
i
<
obj
->
rgn
->
numRects
;
i
++
,
pRect
++
)
for
(
i
=
0
;
i
<
rgndata
->
rdh
.
nCount
;
i
++
,
pRect
++
)
{
PSDRV_WriteArrayPut
(
dc
,
szArrayName
,
i
*
4
,
pRect
->
left
);
...
...
@@ -48,4 +63,6 @@ VOID PSDRV_SetDeviceClipping( DC *dc )
}
PSDRV_WriteRectClip
(
dc
,
szArrayName
);
HeapFree
(
GetProcessHeap
(),
0
,
rgndata
);
return
;
}
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