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
5c316434
Commit
5c316434
authored
Feb 14, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implemented GdipIsVisiblePathPoint with tests.
parent
820981b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
5 deletions
+75
-5
graphicspath.c
dlls/gdiplus/graphicspath.c
+22
-5
graphicspath.c
dlls/gdiplus/tests/graphicspath.c
+53
-0
No files found.
dlls/gdiplus/graphicspath.c
View file @
5c316434
...
...
@@ -1384,16 +1384,33 @@ GpStatus WINGDIPAPI GdipIsVisiblePathPointI(GpPath* path, INT x, INT y, GpGraphi
return
GdipIsVisiblePathPoint
(
path
,
x
,
y
,
graphics
,
result
);
}
/*****************************************************************************
* GdipIsVisiblePathPoint [GDIPLUS.@]
*/
GpStatus
WINGDIPAPI
GdipIsVisiblePathPoint
(
GpPath
*
path
,
REAL
x
,
REAL
y
,
GpGraphics
*
graphics
,
BOOL
*
result
)
{
static
int
calls
;
GpRegion
*
region
;
HRGN
hrgn
;
GpStatus
status
;
if
(
!
path
)
return
InvalidParameter
;
if
(
!
path
||
!
result
)
return
InvalidParameter
;
if
(
!
(
calls
++
))
FIXME
(
"not implemented
\n
"
);
status
=
GdipCreateRegionPath
(
path
,
&
region
);
if
(
status
!=
Ok
)
return
status
;
return
NotImplemented
;
status
=
GdipGetRegionHRgn
(
region
,
graphics
,
&
hrgn
);
if
(
status
!=
Ok
){
GdipDeleteRegion
(
region
);
return
status
;
}
*
result
=
PtInRegion
(
hrgn
,
roundr
(
x
),
roundr
(
y
));
DeleteObject
(
hrgn
);
GdipDeleteRegion
(
region
);
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipStartPathFigure
(
GpPath
*
path
)
...
...
dlls/gdiplus/tests/graphicspath.c
View file @
5c316434
...
...
@@ -1057,6 +1057,58 @@ static void test_flatten(void)
GdipDeletePath
(
path
);
}
static
void
test_isvisible
(
void
)
{
GpPath
*
path
;
GpGraphics
*
graphics
=
NULL
;
HDC
hdc
=
GetDC
(
0
);
BOOL
result
;
GpStatus
status
;
status
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
expect
(
Ok
,
status
);
status
=
GdipCreatePath
(
FillModeAlternate
,
&
path
);
expect
(
Ok
,
status
);
/* NULL */
status
=
GdipIsVisiblePathPoint
(
NULL
,
0
.
0
,
0
.
0
,
NULL
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipIsVisiblePathPoint
(
path
,
0
.
0
,
0
.
0
,
NULL
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipIsVisiblePathPoint
(
path
,
0
.
0
,
0
.
0
,
NULL
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipIsVisiblePathPoint
(
path
,
0
.
0
,
0
.
0
,
graphics
,
NULL
);
expect
(
InvalidParameter
,
status
);
/* empty path */
result
=
TRUE
;
status
=
GdipIsVisiblePathPoint
(
path
,
0
.
0
,
0
.
0
,
NULL
,
&
result
);
expect
(
Ok
,
status
);
expect
(
FALSE
,
result
);
/* rect */
status
=
GdipAddPathRectangle
(
path
,
0
.
0
,
0
.
0
,
10
.
0
,
10
.
0
);
expect
(
Ok
,
status
);
result
=
FALSE
;
status
=
GdipIsVisiblePathPoint
(
path
,
0
.
0
,
0
.
0
,
NULL
,
&
result
);
expect
(
Ok
,
status
);
expect
(
TRUE
,
result
);
result
=
TRUE
;
status
=
GdipIsVisiblePathPoint
(
path
,
11
.
0
,
11
.
0
,
NULL
,
&
result
);
expect
(
Ok
,
status
);
expect
(
FALSE
,
result
);
/* not affected by clipping */
status
=
GdipSetClipRect
(
graphics
,
5
.
0
,
5
.
0
,
5
.
0
,
5
.
0
,
CombineModeReplace
);
expect
(
Ok
,
status
);
result
=
FALSE
;
status
=
GdipIsVisiblePathPoint
(
path
,
0
.
0
,
0
.
0
,
graphics
,
&
result
);
expect
(
Ok
,
status
);
expect
(
TRUE
,
result
);
GdipDeletePath
(
path
);
GdipDeleteGraphics
(
graphics
);
ReleaseDC
(
0
,
hdc
);
}
START_TEST
(
graphicspath
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -1085,6 +1137,7 @@ START_TEST(graphicspath)
test_reverse
();
test_addpie
();
test_flatten
();
test_isvisible
();
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