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
11d17faf
Commit
11d17faf
authored
Nov 04, 2008
by
Sergey Khodych
Committed by
Alexandre Julliard
Nov 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: BitBlt returns TRUE when drawing outside of the clipping or visible region.
parent
e21cbfe7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
+49
-0
bitmap.c
dlls/gdi32/tests/bitmap.c
+46
-0
bitblt.c
dlls/winex11.drv/bitblt.c
+3
-0
No files found.
dlls/gdi32/tests/bitmap.c
View file @
11d17faf
...
...
@@ -2189,6 +2189,51 @@ void test_GdiAlphaBlend()
}
static
void
test_clipping
(
void
)
{
HBITMAP
bmpDst
;
HBITMAP
oldDst
;
HBITMAP
bmpSrc
;
HBITMAP
oldSrc
;
HRGN
hRgn
;
LPVOID
bits
;
BOOL
result
;
HDC
hdcDst
=
CreateCompatibleDC
(
NULL
);
HDC
hdcSrc
=
CreateCompatibleDC
(
NULL
);
BITMAPINFO
bmpinfo
=
{{
0
}};
bmpinfo
.
bmiHeader
.
biSize
=
sizeof
(
BITMAPINFOHEADER
);
bmpinfo
.
bmiHeader
.
biWidth
=
100
;
bmpinfo
.
bmiHeader
.
biHeight
=
100
;
bmpinfo
.
bmiHeader
.
biPlanes
=
1
;
bmpinfo
.
bmiHeader
.
biBitCount
=
GetDeviceCaps
(
hdcDst
,
BITSPIXEL
);
bmpinfo
.
bmiHeader
.
biCompression
=
BI_RGB
;
bmpDst
=
CreateDIBSection
(
hdcDst
,
&
bmpinfo
,
DIB_RGB_COLORS
,
&
bits
,
NULL
,
0
);
ok
(
bmpDst
!=
NULL
,
"Couldn't create destination bitmap
\n
"
);
oldDst
=
(
HBITMAP
)
SelectObject
(
hdcDst
,
bmpDst
);
bmpSrc
=
CreateDIBSection
(
hdcSrc
,
&
bmpinfo
,
DIB_RGB_COLORS
,
&
bits
,
NULL
,
0
);
ok
(
bmpSrc
!=
NULL
,
"Couldn't create source bitmap
\n
"
);
oldSrc
=
(
HBITMAP
)
SelectObject
(
hdcSrc
,
bmpSrc
);
result
=
BitBlt
(
hdcDst
,
0
,
0
,
100
,
100
,
hdcSrc
,
100
,
100
,
SRCCOPY
);
ok
(
result
,
"BitBlt failed
\n
"
);
hRgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
SelectClipRgn
(
hdcDst
,
hRgn
);
result
=
BitBlt
(
hdcDst
,
0
,
0
,
100
,
100
,
hdcSrc
,
0
,
0
,
SRCCOPY
);
ok
(
result
,
"BitBlt failed
\n
"
);
DeleteObject
(
bmpDst
);
DeleteObject
(
bmpSrc
);
DeleteObject
(
hRgn
);
DeleteDC
(
hdcDst
);
DeleteDC
(
hdcSrc
);
}
START_TEST
(
bitmap
)
{
HMODULE
hdll
;
...
...
@@ -2214,4 +2259,5 @@ START_TEST(bitmap)
test_GdiAlphaBlend
();
test_bitmapinfoheadersize
();
test_get16dibits
();
test_clipping
();
}
dlls/winex11.drv/bitblt.c
View file @
11d17faf
...
...
@@ -1686,7 +1686,10 @@ BOOL X11DRV_BitBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst,
if
(
!
BITBLT_GetVisRectangles
(
physDevDst
,
xDst
,
yDst
,
width
,
height
,
physDevSrc
,
xSrc
,
ySrc
,
width
,
height
,
&
visRectSrc
,
&
visRectDst
))
{
result
=
TRUE
;
goto
END
;
}
xSrc
=
visRectSrc
.
left
;
ySrc
=
visRectSrc
.
top
;
...
...
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