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
078c6a39
Commit
078c6a39
authored
Aug 26, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implemented GdipIsInfiniteRegion with tests.
parent
32ac2d19
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
4 deletions
+61
-4
region.c
dlls/gdiplus/region.c
+8
-2
graphics.c
dlls/gdiplus/tests/graphics.c
+6
-2
region.c
dlls/gdiplus/tests/region.c
+47
-0
No files found.
dlls/gdiplus/region.c
View file @
078c6a39
...
...
@@ -770,11 +770,17 @@ GpStatus WINGDIPAPI GdipIsEqualRegion(GpRegion *region, GpRegion *region2, GpGra
return
NotImplemented
;
}
/* I think graphics is ignored here */
GpStatus
WINGDIPAPI
GdipIsInfiniteRegion
(
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
==
RegionDataInfiniteRect
);
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipSetEmpty
(
GpRegion
*
region
)
...
...
dlls/gdiplus/tests/graphics.c
View file @
078c6a39
...
...
@@ -770,12 +770,16 @@ static void test_getclip(void)
GpGraphics
*
graphics
=
NULL
;
HDC
hdc
=
GetDC
(
0
);
GpRegion
*
clip
;
GpRectF
rect
;
BOOL
res
;
status
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
expect
(
Ok
,
status
);
status
=
GdipCreateRegion
(
&
clip
);
rect
.
X
=
rect
.
Y
=
0
.
0
;
rect
.
Height
=
rect
.
Width
=
100
.
0
;
status
=
GdipCreateRegionRect
(
&
rect
,
&
clip
);
/* NULL arguments */
status
=
GdipGetClip
(
NULL
,
NULL
);
...
...
@@ -789,7 +793,7 @@ static void test_getclip(void)
status
=
GdipGetClip
(
graphics
,
clip
);
todo_wine
expect
(
Ok
,
status
);
status
=
GdipIsInfiniteRegion
(
clip
,
graphics
,
&
res
);
todo_wine
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
todo_wine
expect
(
TRUE
,
res
);
GdipDeleteRegion
(
clip
);
...
...
dlls/gdiplus/tests/region.c
View file @
078c6a39
...
...
@@ -463,6 +463,52 @@ static void test_getregiondata(void)
expect
(
Ok
,
status
);
}
static
void
test_isinfinite
(
void
)
{
GpStatus
status
;
GpRegion
*
region
;
GpGraphics
*
graphics
=
NULL
;
GpMatrix
*
m
;
HDC
hdc
=
GetDC
(
0
);
BOOL
res
;
status
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
expect
(
Ok
,
status
);
GdipCreateRegion
(
&
region
);
GdipCreateMatrix2
(
3
.
0
,
0
.
0
,
0
.
0
,
1
.
0
,
20
.
0
,
30
.
0
,
&
m
);
/* NULL arguments */
status
=
GdipIsInfiniteRegion
(
NULL
,
NULL
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipIsInfiniteRegion
(
region
,
NULL
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipIsInfiniteRegion
(
NULL
,
graphics
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipIsInfiniteRegion
(
NULL
,
NULL
,
&
res
);
expect
(
InvalidParameter
,
status
);
status
=
GdipIsInfiniteRegion
(
region
,
NULL
,
&
res
);
expect
(
InvalidParameter
,
status
);
res
=
FALSE
;
status
=
GdipIsInfiniteRegion
(
region
,
graphics
,
&
res
);
expect
(
Ok
,
status
);
expect
(
TRUE
,
res
);
/* after world transform */
status
=
GdipSetWorldTransform
(
graphics
,
m
);
expect
(
Ok
,
status
);
res
=
FALSE
;
status
=
GdipIsInfiniteRegion
(
region
,
graphics
,
&
res
);
expect
(
Ok
,
status
);
expect
(
TRUE
,
res
);
GdipDeleteMatrix
(
m
);
GdipDeleteRegion
(
region
);
ReleaseDC
(
0
,
hdc
);
}
START_TEST
(
region
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -476,6 +522,7 @@ START_TEST(region)
GdiplusStartup
(
&
gdiplusToken
,
&
gdiplusStartupInput
,
NULL
);
test_getregiondata
();
test_isinfinite
();
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