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
a7b5d866
Commit
a7b5d866
authored
Oct 11, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Oct 11, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a helper to retrieve the bounding rectangle.
parent
125529fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
10 deletions
+26
-10
bitblt.c
dlls/gdi32/bitblt.c
+6
-10
gdi_private.h
dlls/gdi32/gdi_private.h
+20
-0
No files found.
dlls/gdi32/bitblt.c
View file @
a7b5d866
...
...
@@ -65,12 +65,10 @@ static BOOL get_vis_rectangles( DC *dc_dst, struct bitblt_coords *dst,
dst
->
height
=
rect
.
bottom
-
rect
.
top
;
if
(
dst
->
layout
&
LAYOUT_RTL
&&
dst
->
layout
&
LAYOUT_BITMAPORIENTATIONPRESERVED
)
{
swap_ints
(
&
rect
.
left
,
&
rect
.
right
);
dst
->
x
=
rect
.
left
;
dst
->
width
=
rect
.
right
-
rect
.
left
;
dst
->
x
+=
dst
->
width
;
dst
->
width
=
-
dst
->
width
;
}
if
(
rect
.
left
>
rect
.
right
)
{
swap_ints
(
&
rect
.
left
,
&
rect
.
right
);
rect
.
left
++
;
rect
.
right
++
;
}
if
(
rect
.
top
>
rect
.
bottom
)
{
swap_ints
(
&
rect
.
top
,
&
rect
.
bottom
);
rect
.
top
++
;
rect
.
bottom
++
;
}
get_bounding_rect
(
&
rect
,
dst
->
x
,
dst
->
y
,
dst
->
width
,
dst
->
height
);
if
(
get_clip_box
(
dc_dst
,
&
clip
))
intersect_rect
(
&
dst
->
visrect
,
&
rect
,
&
clip
);
...
...
@@ -92,12 +90,10 @@ static BOOL get_vis_rectangles( DC *dc_dst, struct bitblt_coords *dst,
src
->
height
=
rect
.
bottom
-
rect
.
top
;
if
(
src
->
layout
&
LAYOUT_RTL
&&
src
->
layout
&
LAYOUT_BITMAPORIENTATIONPRESERVED
)
{
swap_ints
(
&
rect
.
left
,
&
rect
.
right
);
src
->
x
=
rect
.
left
;
src
->
width
=
rect
.
right
-
rect
.
left
;
src
->
x
+=
src
->
width
;
src
->
width
=
-
src
->
width
;
}
if
(
rect
.
left
>
rect
.
right
)
{
swap_ints
(
&
rect
.
left
,
&
rect
.
right
);
rect
.
left
++
;
rect
.
right
++
;
}
if
(
rect
.
top
>
rect
.
bottom
)
{
swap_ints
(
&
rect
.
top
,
&
rect
.
bottom
);
rect
.
top
++
;
rect
.
bottom
++
;
}
get_bounding_rect
(
&
rect
,
src
->
x
,
src
->
y
,
src
->
width
,
src
->
height
);
/* source is not clipped */
if
(
dc_src
->
header
.
type
==
OBJ_MEMDC
)
...
...
dlls/gdi32/gdi_private.h
View file @
a7b5d866
...
...
@@ -469,6 +469,26 @@ static inline void offset_rect( RECT *rect, int offset_x, int offset_y )
rect
->
bottom
+=
offset_y
;
}
static
inline
void
get_bounding_rect
(
RECT
*
rect
,
int
x
,
int
y
,
int
width
,
int
height
)
{
rect
->
left
=
x
;
rect
->
right
=
x
+
width
;
rect
->
top
=
y
;
rect
->
bottom
=
y
+
height
;
if
(
rect
->
left
>
rect
->
right
)
{
int
tmp
=
rect
->
left
;
rect
->
left
=
rect
->
right
+
1
;
rect
->
right
=
tmp
+
1
;
}
if
(
rect
->
top
>
rect
->
bottom
)
{
int
tmp
=
rect
->
top
;
rect
->
top
=
rect
->
bottom
+
1
;
rect
->
bottom
=
tmp
+
1
;
}
}
static
inline
int
get_bitmap_stride
(
int
width
,
int
bpp
)
{
return
((
width
*
bpp
+
15
)
>>
3
)
&
~
1
;
...
...
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