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
2ddb3b7d
Commit
2ddb3b7d
authored
Dec 03, 2012
by
Vincent Povirk
Committed by
Alexandre Julliard
Dec 04, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add a test for drawing to HDC's backed by 32-bit alpha dibs.
parent
e8b6701f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
graphics.c
dlls/gdiplus/tests/graphics.c
+50
-0
No files found.
dlls/gdiplus/tests/graphics.c
View file @
2ddb3b7d
...
...
@@ -4083,6 +4083,55 @@ static void test_measured_extra_space(void)
GdipDeleteStringFormat
(
format
);
}
static
void
test_alpha_hdc
(
void
)
{
GpStatus
status
;
HDC
hdc
;
HBITMAP
hbm
,
old_hbm
;
GpGraphics
*
graphics
;
ULONG
*
bits
;
BITMAPINFO
bmi
;
hdc
=
CreateCompatibleDC
(
0
);
ok
(
hdc
!=
NULL
,
"CreateCompatibleDC failed
\n
"
);
bmi
.
bmiHeader
.
biSize
=
sizeof
(
bmi
.
bmiHeader
);
bmi
.
bmiHeader
.
biHeight
=
5
;
bmi
.
bmiHeader
.
biWidth
=
5
;
bmi
.
bmiHeader
.
biBitCount
=
32
;
bmi
.
bmiHeader
.
biPlanes
=
1
;
bmi
.
bmiHeader
.
biCompression
=
BI_RGB
;
bmi
.
bmiHeader
.
biClrUsed
=
0
;
hbm
=
CreateDIBSection
(
hdc
,
&
bmi
,
DIB_RGB_COLORS
,
(
void
**
)
&
bits
,
NULL
,
0
);
ok
(
hbm
!=
NULL
,
"CreateDIBSection failed
\n
"
);
old_hbm
=
SelectObject
(
hdc
,
hbm
);
status
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
expect
(
Ok
,
status
);
bits
[
0
]
=
0xdeadbeef
;
status
=
GdipGraphicsClear
(
graphics
,
0xffaaaaaa
);
expect
(
Ok
,
status
);
todo_wine
expect
(
0xffaaaaaa
,
bits
[
0
]);
SelectObject
(
hdc
,
old_hbm
);
bits
[
0
]
=
0xdeadbeef
;
status
=
GdipGraphicsClear
(
graphics
,
0xffbbbbbb
);
expect
(
Ok
,
status
);
todo_wine
expect
(
0xffbbbbbb
,
bits
[
0
]);
GdipDeleteGraphics
(
graphics
);
DeleteObject
(
hbm
);
DeleteDC
(
hdc
);
}
START_TEST
(
graphics
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -4149,6 +4198,7 @@ START_TEST(graphics)
test_get_set_interpolation
();
test_get_set_textrenderinghint
();
test_getdc_scaled
();
test_alpha_hdc
();
GdiplusShutdown
(
gdiplusToken
);
DestroyWindow
(
hwnd
);
...
...
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