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
bc56fc1b
Commit
bc56fc1b
authored
Dec 07, 2023
by
Bartosz Kosiorek
Committed by
Alexandre Julliard
Jan 18, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus/tests: Add GdipDrawImageFX tests except effects or attributes.
parent
aa92cabd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
graphics.c
dlls/gdiplus/tests/graphics.c
+58
-0
No files found.
dlls/gdiplus/tests/graphics.c
View file @
bc56fc1b
...
...
@@ -1307,6 +1307,63 @@ static void test_GdipDrawLineI(void)
ReleaseDC
(
hwnd
,
hdc
);
}
static
void
test_GdipDrawImageFX
(
void
)
{
GpGraphics
*
graphics
=
NULL
;
GpMatrix
*
transform
;
GpBitmap
*
bm
=
NULL
;
GpStatus
status
;
GpRectF
source
;
BYTE
buff
[
400
];
HDC
hdc
;
if
(
!
(
hdc
=
GetDC
(
hwnd
)))
return
;
memset
(
buff
,
0
,
sizeof
(
buff
));
status
=
GdipCreateBitmapFromScan0
(
10
,
10
,
40
,
PixelFormat32bppRGB
,
buff
,
&
bm
);
expect
(
Ok
,
status
);
ok
(
NULL
!=
bm
,
"Expected bitmap to be initialized
\n
"
);
status
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
expect
(
Ok
,
status
);
status
=
GdipCreateMatrix2
(
2
.
0
,
0
.
0
,
0
.
0
,
1
.
0
,
10
.
0
,
20
.
0
,
&
transform
);
expect
(
Ok
,
status
);
/* DrawImageFX with source rectangle */
status
=
GdipDrawImageFX
(
graphics
,
NULL
,
&
source
,
NULL
,
NULL
,
NULL
,
UnitPixel
);
todo_wine
expect
(
InvalidParameter
,
status
);
/* DrawImageFX with source bitmap */
status
=
GdipDrawImageFX
(
graphics
,
(
GpImage
*
)
bm
,
NULL
,
NULL
,
NULL
,
NULL
,
UnitPixel
);
todo_wine
expect
(
Ok
,
status
);
/* DrawImageFX with source bitmap and transform */
status
=
GdipDrawImageFX
(
graphics
,
(
GpImage
*
)
bm
,
NULL
,
transform
,
NULL
,
NULL
,
UnitPixel
);
todo_wine
expect
(
Ok
,
status
);
/* DrawImageFX with source bitmap and source rectangle */
source
.
X
=
source
.
Y
=
0
.
0
;
source
.
Height
=
source
.
Width
=
10
.
0
;
status
=
GdipDrawImageFX
(
graphics
,
(
GpImage
*
)
bm
,
&
source
,
NULL
,
NULL
,
NULL
,
UnitPixel
);
todo_wine
expect
(
Ok
,
status
);
/* DrawImageFX with source bitmap, source rectangle, and transform */
status
=
GdipDrawImageFX
(
graphics
,
(
GpImage
*
)
bm
,
&
source
,
transform
,
NULL
,
NULL
,
UnitPixel
);
todo_wine
expect
(
Ok
,
status
);
GdipDeleteMatrix
(
transform
);
GdipDeleteGraphics
(
graphics
);
GdipDisposeImage
((
GpImage
*
)
bm
);
ReleaseDC
(
hwnd
,
hdc
);
}
static
void
test_GdipDrawImagePointsRect
(
void
)
{
GpStatus
status
;
...
...
@@ -7395,6 +7452,7 @@ START_TEST(graphics)
test_GdipDrawCurve3I
();
test_GdipDrawLineI
();
test_GdipDrawLinesI
();
test_GdipDrawImageFX
();
test_GdipDrawImagePointsRect
();
test_GdipFillClosedCurve
();
test_GdipFillClosedCurveI
();
...
...
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