Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2fd51e94
Commit
2fd51e94
authored
Oct 19, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Some tests for GdipCreateRegionHrgn added.
parent
edd24b61
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
96 additions
and
0 deletions
+96
-0
region.c
dlls/gdiplus/region.c
+3
-0
region.c
dlls/gdiplus/tests/region.c
+93
-0
No files found.
dlls/gdiplus/region.c
View file @
2fd51e94
...
...
@@ -573,6 +573,9 @@ GpStatus WINGDIPAPI GdipCreateRegionHrgn(HRGN hrgn, GpRegion **region)
{
FIXME
(
"(%p, %p): stub
\n
"
,
hrgn
,
region
);
if
(
!
hrgn
||
!
region
)
return
InvalidParameter
;
*
region
=
NULL
;
return
NotImplemented
;
}
...
...
dlls/gdiplus/tests/region.c
View file @
2fd51e94
...
...
@@ -651,6 +651,98 @@ static void test_combinereplace(void)
GdipDeleteRegion
(
region
);
}
static
void
test_fromhrgn
(
void
)
{
GpStatus
status
;
GpRegion
*
region
;
HRGN
hrgn
;
UINT
needed
;
DWORD
buf
[
220
];
RegionDataPoint
*
point
;
/* NULL */
status
=
GdipCreateRegionHrgn
(
NULL
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipCreateRegionHrgn
(
NULL
,
&
region
);
expect
(
InvalidParameter
,
status
);
status
=
GdipCreateRegionHrgn
((
HRGN
)
0xdeadbeef
,
&
region
);
todo_wine
expect
(
InvalidParameter
,
status
);
/* rectangle */
hrgn
=
CreateRectRgn
(
0
,
0
,
100
,
10
);
status
=
GdipCreateRegionHrgn
(
hrgn
,
&
region
);
todo_wine
expect
(
Ok
,
status
);
status
=
GdipGetRegionDataSize
(
region
,
&
needed
);
todo_wine
{
expect
(
Ok
,
status
);
expect
(
56
,
needed
);
}
status
=
GdipGetRegionData
(
region
,
(
BYTE
*
)
buf
,
sizeof
(
buf
),
&
needed
);
todo_wine
expect
(
Ok
,
status
);
if
(
status
==
Ok
){
todo_wine
{
expect
(
56
,
needed
);
expect_dword
(
buf
,
48
);
expect_magic
((
DWORD
*
)(
buf
+
2
));
expect_dword
(
buf
+
3
,
0
);
expect_dword
(
buf
+
4
,
RGNDATA_PATH
);
expect_dword
(
buf
+
5
,
0x00000020
);
expect_magic
((
DWORD
*
)(
buf
+
6
));
expect_dword
(
buf
+
7
,
0x00000004
);
expect_dword
(
buf
+
8
,
0x00006000
);
/* ?? */
}
point
=
(
RegionDataPoint
*
)
buf
+
9
;
expect
(
0
,
point
[
0
].
X
);
expect
(
0
,
point
[
0
].
Y
);
todo_wine
{
expect
(
100
,
point
[
1
].
X
);
/* buf + 10 */
expect
(
0
,
point
[
1
].
Y
);
expect
(
100
,
point
[
2
].
X
);
/* buf + 11 */
expect
(
10
,
point
[
2
].
Y
);
}
expect
(
0
,
point
[
3
].
X
);
/* buf + 12 */
todo_wine
{
expect
(
10
,
point
[
3
].
Y
);
expect_dword
(
buf
+
13
,
0x81010100
);
/* closed */
}
}
GdipDeleteRegion
(
region
);
DeleteObject
((
HGDIOBJ
)
hrgn
);
/* ellipse */
hrgn
=
CreateEllipticRgn
(
0
,
0
,
100
,
10
);
status
=
GdipCreateRegionHrgn
(
hrgn
,
&
region
);
todo_wine
expect
(
Ok
,
status
);
status
=
GdipGetRegionDataSize
(
region
,
&
needed
);
todo_wine
{
expect
(
Ok
,
status
);
expect
(
216
,
needed
);
}
status
=
GdipGetRegionData
(
region
,
(
BYTE
*
)
buf
,
sizeof
(
buf
),
&
needed
);
todo_wine
{
expect
(
Ok
,
status
);
expect
(
216
,
needed
);
expect_dword
(
buf
,
208
);
expect_magic
((
DWORD
*
)(
buf
+
2
));
expect_dword
(
buf
+
3
,
0
);
expect_dword
(
buf
+
4
,
RGNDATA_PATH
);
expect_dword
(
buf
+
5
,
0x000000C0
);
expect_magic
((
DWORD
*
)(
buf
+
6
));
expect_dword
(
buf
+
7
,
0x00000024
);
expect_dword
(
buf
+
8
,
0x00006000
);
/* ?? */
}
GdipDeleteRegion
(
region
);
DeleteObject
((
HGDIOBJ
)
hrgn
);
}
START_TEST
(
region
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -667,6 +759,7 @@ START_TEST(region)
test_isinfinite
();
test_isempty
();
test_combinereplace
();
test_fromhrgn
();
GdiplusShutdown
(
gdiplusToken
);
...
...
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