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
95f1abc8
Commit
95f1abc8
authored
Aug 23, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Aug 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a copy_rect helper function.
parent
ff307d57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
20 deletions
+31
-20
bitblt.c
dlls/gdi32/dibdrv/bitblt.c
+31
-20
No files found.
dlls/gdi32/dibdrv/bitblt.c
View file @
95f1abc8
...
...
@@ -27,6 +27,35 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dib
);
static
DWORD
copy_rect
(
dib_info
*
dst
,
const
RECT
*
dst_rect
,
const
dib_info
*
src
,
const
RECT
*
src_rect
,
HRGN
clip
,
INT
rop2
)
{
POINT
origin
;
RECT
clipped_rect
;
const
WINEREGION
*
clip_data
;
int
i
;
origin
.
x
=
src_rect
->
left
;
origin
.
y
=
src_rect
->
top
;
if
(
clip
==
NULL
)
dst
->
funcs
->
copy_rect
(
dst
,
dst_rect
,
src
,
&
origin
,
rop2
);
else
{
clip_data
=
get_wine_region
(
clip
);
for
(
i
=
0
;
i
<
clip_data
->
numRects
;
i
++
)
{
if
(
intersect_rect
(
&
clipped_rect
,
dst_rect
,
clip_data
->
rects
+
i
))
{
origin
.
x
=
src_rect
->
left
+
clipped_rect
.
left
-
dst_rect
->
left
;
origin
.
y
=
src_rect
->
top
+
clipped_rect
.
top
-
dst_rect
->
top
;
dst
->
funcs
->
copy_rect
(
dst
,
&
clipped_rect
,
src
,
&
origin
,
rop2
);
}
}
release_wine_region
(
clip
);
}
return
ERROR_SUCCESS
;
}
static
void
set_color_info
(
const
dib_info
*
dib
,
BITMAPINFO
*
info
)
{
DWORD
*
masks
=
(
DWORD
*
)
info
->
bmiColors
;
...
...
@@ -182,8 +211,7 @@ DWORD dibdrv_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info
dib_info
src_dib
;
HRGN
saved_clip
=
NULL
;
dibdrv_physdev
*
pdev
=
NULL
;
const
WINEREGION
*
clip_data
;
int
i
,
rop2
;
int
rop2
;
TRACE
(
"%p %p %p
\n
"
,
dev
,
hbitmap
,
info
);
...
...
@@ -244,24 +272,7 @@ DWORD dibdrv_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info
rop2
=
((
rop
>>
16
)
&
0xf
)
+
1
;
if
(
clip
==
NULL
)
dib
->
funcs
->
copy_rect
(
dib
,
&
dst
->
visrect
,
&
src_dib
,
&
origin
,
rop2
);
else
{
clip_data
=
get_wine_region
(
clip
);
for
(
i
=
0
;
i
<
clip_data
->
numRects
;
i
++
)
{
RECT
clipped_rect
;
if
(
intersect_rect
(
&
clipped_rect
,
&
dst
->
visrect
,
clip_data
->
rects
+
i
))
{
origin
.
x
=
src
->
visrect
.
left
+
clipped_rect
.
left
-
dst
->
visrect
.
left
;
origin
.
y
=
src
->
visrect
.
top
+
clipped_rect
.
top
-
dst
->
visrect
.
top
;
dib
->
funcs
->
copy_rect
(
dib
,
&
clipped_rect
,
&
src_dib
,
&
origin
,
rop2
);
}
}
release_wine_region
(
clip
);
}
ret
=
ERROR_SUCCESS
;
ret
=
copy_rect
(
dib
,
&
dst
->
visrect
,
&
src_dib
,
&
src
->
visrect
,
clip
,
rop2
);
if
(
saved_clip
)
restore_clipping_region
(
pdev
,
saved_clip
);
...
...
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