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
f6c104b3
Commit
f6c104b3
authored
Oct 20, 2015
by
Vincent Povirk
Committed by
Alexandre Julliard
Oct 21, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus/tests: Add a test for CompositingModeSourceCopy.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
59cca65c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
image.c
dlls/gdiplus/tests/image.c
+45
-0
No files found.
dlls/gdiplus/tests/image.c
View file @
f6c104b3
...
...
@@ -3999,6 +3999,50 @@ static void test_DrawImage(void)
expect
(
Ok
,
status
);
}
static
void
test_DrawImage_SourceCopy
(
void
)
{
DWORD
dst_pixels
[
4
]
=
{
0xffffffff
,
0xffffffff
,
0xffffffff
,
0xffffffff
};
DWORD
src_pixels
[
4
]
=
{
0
,
0xffff0000
,
0
,
0xff00ff
};
GpStatus
status
;
union
{
GpBitmap
*
bitmap
;
GpImage
*
image
;
}
u1
,
u2
;
GpGraphics
*
graphics
;
status
=
GdipCreateBitmapFromScan0
(
2
,
2
,
8
,
PixelFormat32bppARGB
,
(
BYTE
*
)
dst_pixels
,
&
u1
.
bitmap
);
expect
(
Ok
,
status
);
status
=
GdipCreateBitmapFromScan0
(
2
,
2
,
8
,
PixelFormat32bppARGB
,
(
BYTE
*
)
src_pixels
,
&
u2
.
bitmap
);
expect
(
Ok
,
status
);
status
=
GdipGetImageGraphicsContext
(
u1
.
image
,
&
graphics
);
expect
(
Ok
,
status
);
status
=
GdipSetInterpolationMode
(
graphics
,
InterpolationModeNearestNeighbor
);
expect
(
Ok
,
status
);
status
=
GdipSetCompositingMode
(
graphics
,
CompositingModeSourceCopy
);
expect
(
Ok
,
status
);
status
=
GdipDrawImageI
(
graphics
,
u2
.
image
,
0
,
0
);
expect
(
Ok
,
status
);
todo_wine
expect
(
0
,
dst_pixels
[
0
]);
expect
(
0xffff0000
,
dst_pixels
[
1
]);
todo_wine
expect
(
0
,
dst_pixels
[
2
]);
todo_wine
expect
(
0
,
dst_pixels
[
3
]);
status
=
GdipDeleteGraphics
(
graphics
);
expect
(
Ok
,
status
);
status
=
GdipDisposeImage
(
u1
.
image
);
expect
(
Ok
,
status
);
status
=
GdipDisposeImage
(
u2
.
image
);
expect
(
Ok
,
status
);
}
static
void
test_GdipDrawImagePointRect
(
void
)
{
BYTE
black_1x1
[
4
]
=
{
0
,
0
,
0
,
0
};
...
...
@@ -4689,6 +4733,7 @@ START_TEST(image)
test_DrawImage_scale
();
test_image_format
();
test_DrawImage
();
test_DrawImage_SourceCopy
();
test_GdipDrawImagePointRect
();
test_bitmapbits
();
test_tiff_palette
();
...
...
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