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
b7a15ae7
Commit
b7a15ae7
authored
Oct 14, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Overlapping rectangles are not allowed in GdiAlphaBlend.
parent
6fd9d774
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
bitblt.c
dlls/gdi32/bitblt.c
+8
-0
bitmap.c
dlls/gdi32/tests/bitmap.c
+19
-0
No files found.
dlls/gdi32/bitblt.c
View file @
b7a15ae7
...
@@ -774,6 +774,14 @@ BOOL WINAPI GdiAlphaBlend(HDC hdcDst, int xDst, int yDst, int widthDst, int heig
...
@@ -774,6 +774,14 @@ BOOL WINAPI GdiAlphaBlend(HDC hdcDst, int xDst, int yDst, int widthDst, int heig
SetLastError
(
ERROR_INVALID_PARAMETER
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
ret
=
FALSE
;
ret
=
FALSE
;
}
}
else
if
(
dcSrc
==
dcDst
&&
src
.
x
+
src
.
width
>
dst
.
x
&&
src
.
x
<
dst
.
x
+
dst
.
width
&&
src
.
y
+
src
.
height
>
dst
.
y
&&
src
.
y
<
dst
.
y
+
dst
.
height
)
{
WARN
(
"Overlapping coords: (%d,%d), %dx%d and (%d,%d), %dx%d
\n
"
,
src
.
x
,
src
.
y
,
src
.
width
,
src
.
height
,
dst
.
x
,
dst
.
y
,
dst
.
width
,
dst
.
height
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
ret
=
FALSE
;
}
else
if
(
!
ret
)
ret
=
dst_dev
->
funcs
->
pAlphaBlend
(
dst_dev
,
&
dst
,
src_dev
,
&
src
,
blendFunction
);
else
if
(
!
ret
)
ret
=
dst_dev
->
funcs
->
pAlphaBlend
(
dst_dev
,
&
dst
,
src_dev
,
&
src
,
blendFunction
);
release_dc_ptr
(
dcDst
);
release_dc_ptr
(
dcDst
);
...
...
dlls/gdi32/tests/bitmap.c
View file @
b7a15ae7
...
@@ -3279,6 +3279,25 @@ static void test_GdiAlphaBlend(void)
...
@@ -3279,6 +3279,25 @@ static void test_GdiAlphaBlend(void)
ok
(
!
ret
,
"GdiAlphaBlend succeeded
\n
"
);
ok
(
!
ret
,
"GdiAlphaBlend succeeded
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"wrong error %u
\n
"
,
GetLastError
()
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"wrong error %u
\n
"
,
GetLastError
()
);
/* overlapping source and dest not allowed */
SetLastError
(
0xdeadbeef
);
ret
=
pGdiAlphaBlend
(
hdcDst
,
0
,
0
,
20
,
20
,
hdcDst
,
19
,
19
,
20
,
20
,
blend
);
ok
(
!
ret
,
"GdiAlphaBlend succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"wrong error %u
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ret
=
pGdiAlphaBlend
(
hdcDst
,
20
,
20
,
20
,
20
,
hdcDst
,
1
,
1
,
20
,
20
,
blend
);
ok
(
!
ret
,
"GdiAlphaBlend succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"wrong error %u
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ret
=
pGdiAlphaBlend
(
hdcDst
,
0
,
0
,
20
,
20
,
hdcDst
,
20
,
10
,
20
,
20
,
blend
);
ok
(
ret
,
"GdiAlphaBlend succeeded
\n
"
);
SetLastError
(
0xdeadbeef
);
ret
=
pGdiAlphaBlend
(
hdcDst
,
0
,
0
,
20
,
20
,
hdcDst
,
10
,
20
,
20
,
20
,
blend
);
ok
(
ret
,
"GdiAlphaBlend succeeded
\n
"
);
/* AC_SRC_ALPHA requires 32-bpp BI_RGB format */
/* AC_SRC_ALPHA requires 32-bpp BI_RGB format */
blend
.
AlphaFormat
=
AC_SRC_ALPHA
;
blend
.
AlphaFormat
=
AC_SRC_ALPHA
;
...
...
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