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
fb57a663
Commit
fb57a663
authored
Aug 27, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 28, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implemented GdipIsEmptyRegion with tests.
parent
26cb8431
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
2 deletions
+52
-2
region.c
dlls/gdiplus/region.c
+7
-2
region.c
dlls/gdiplus/tests/region.c
+45
-0
No files found.
dlls/gdiplus/region.c
View file @
fb57a663
...
...
@@ -735,9 +735,14 @@ GpStatus WINGDIPAPI GdipGetRegionHRgn(GpRegion *region, GpGraphics *graphics, HR
GpStatus
WINGDIPAPI
GdipIsEmptyRegion
(
GpRegion
*
region
,
GpGraphics
*
graphics
,
BOOL
*
res
)
{
FIXME
(
"(%p, %p, %p): stub
\n
"
,
region
,
graphics
,
res
);
TRACE
(
"(%p, %p, %p)
\n
"
,
region
,
graphics
,
res
);
return
NotImplemented
;
if
(
!
region
||
!
graphics
||
!
res
)
return
InvalidParameter
;
*
res
=
(
region
->
node
.
type
==
RegionDataEmptyRect
);
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipIsEqualRegion
(
GpRegion
*
region
,
GpRegion
*
region2
,
GpGraphics
*
graphics
,
...
...
dlls/gdiplus/tests/region.c
View file @
fb57a663
...
...
@@ -506,6 +506,50 @@ static void test_isinfinite(void)
GdipDeleteMatrix
(
m
);
GdipDeleteRegion
(
region
);
GdipDeleteGraphics
(
graphics
);
ReleaseDC
(
0
,
hdc
);
}
static
void
test_isempty
(
void
)
{
GpStatus
status
;
GpRegion
*
region
;
GpGraphics
*
graphics
=
NULL
;
HDC
hdc
=
GetDC
(
0
);
BOOL
res
;
status
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
expect
(
Ok
,
status
);
GdipCreateRegion
(
&
region
);
/* NULL arguments */
status
=
GdipIsEmptyRegion
(
NULL
,
NULL
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipIsEmptyRegion
(
region
,
NULL
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipIsEmptyRegion
(
NULL
,
graphics
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipIsEmptyRegion
(
NULL
,
NULL
,
&
res
);
expect
(
InvalidParameter
,
status
);
status
=
GdipIsEmptyRegion
(
region
,
NULL
,
&
res
);
expect
(
InvalidParameter
,
status
);
/* default is infinite */
res
=
TRUE
;
status
=
GdipIsEmptyRegion
(
region
,
graphics
,
&
res
);
expect
(
Ok
,
status
);
expect
(
FALSE
,
res
);
status
=
GdipSetEmpty
(
region
);
expect
(
Ok
,
status
);
res
=
FALSE
;
status
=
GdipIsEmptyRegion
(
region
,
graphics
,
&
res
);
expect
(
Ok
,
status
);
expect
(
TRUE
,
res
);
GdipDeleteRegion
(
region
);
GdipDeleteGraphics
(
graphics
);
ReleaseDC
(
0
,
hdc
);
}
...
...
@@ -523,6 +567,7 @@ START_TEST(region)
test_getregiondata
();
test_isinfinite
();
test_isempty
();
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