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
20501e4c
Commit
20501e4c
authored
Jul 05, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implementation of GdipPathIterGetSubpathCount with tests.
parent
0a9937c5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
1 deletion
+62
-1
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+1
-1
pathiterator.c
dlls/gdiplus/pathiterator.c
+16
-0
pathiterator.c
dlls/gdiplus/tests/pathiterator.c
+44
-0
gdiplusflat.h
include/gdiplusflat.h
+1
-0
No files found.
dlls/gdiplus/gdiplus.spec
View file @
20501e4c
...
...
@@ -453,7 +453,7 @@
@ stdcall GdipPathIterCopyData(ptr ptr ptr ptr long long)
@ stdcall GdipPathIterEnumerate(ptr ptr ptr ptr long)
@ stdcall GdipPathIterGetCount(ptr ptr)
@ st
ub GdipPathIterGetSubpathCount
@ st
dcall GdipPathIterGetSubpathCount(ptr ptr)
@ stdcall GdipPathIterHasCurve(ptr ptr)
@ stub GdipPathIterIsValid
@ stdcall GdipPathIterNextMarker(ptr ptr ptr ptr)
...
...
dlls/gdiplus/pathiterator.c
View file @
20501e4c
...
...
@@ -105,6 +105,22 @@ GpStatus WINGDIPAPI GdipPathIterHasCurve(GpPathIterator* iterator, BOOL* hasCurv
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipPathIterGetSubpathCount
(
GpPathIterator
*
iterator
,
INT
*
count
)
{
INT
i
;
if
(
!
iterator
||
!
count
)
return
InvalidParameter
;
*
count
=
0
;
for
(
i
=
0
;
i
<
iterator
->
pathdata
.
Count
;
i
++
){
if
(
iterator
->
pathdata
.
Types
[
i
]
==
PathPointTypeStart
)
(
*
count
)
++
;
}
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipPathIterNextMarker
(
GpPathIterator
*
iterator
,
INT
*
resultCount
,
INT
*
startIndex
,
INT
*
endIndex
)
{
...
...
dlls/gdiplus/tests/pathiterator.c
View file @
20501e4c
...
...
@@ -146,6 +146,49 @@ static void test_nextmarker(void)
GdipDeletePath
(
path
);
}
static
void
test_getsubpathcount
(
void
)
{
GpPath
*
path
;
GpPathIterator
*
iter
;
GpStatus
stat
;
INT
count
;
/* NULL args */
stat
=
GdipPathIterGetSubpathCount
(
NULL
,
NULL
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipPathIterGetSubpathCount
(
NULL
,
&
count
);
expect
(
InvalidParameter
,
stat
);
GdipCreatePath
(
FillModeAlternate
,
&
path
);
/* empty path */
GdipCreatePathIter
(
&
iter
,
path
);
stat
=
GdipPathIterGetSubpathCount
(
iter
,
&
count
);
expect
(
Ok
,
stat
);
expect
(
0
,
count
);
GdipDeletePathIter
(
iter
);
GdipAddPathLine
(
path
,
5
.
0
,
5
.
0
,
100
.
0
,
50
.
0
);
/* open figure */
GdipCreatePathIter
(
&
iter
,
path
);
stat
=
GdipPathIterGetSubpathCount
(
iter
,
&
count
);
expect
(
Ok
,
stat
);
expect
(
1
,
count
);
GdipDeletePathIter
(
iter
);
/* manually start new figure */
GdipStartPathFigure
(
path
);
GdipAddPathLine
(
path
,
50
.
0
,
50
.
0
,
110
.
0
,
40
.
0
);
GdipCreatePathIter
(
&
iter
,
path
);
stat
=
GdipPathIterGetSubpathCount
(
iter
,
&
count
);
expect
(
Ok
,
stat
);
expect
(
2
,
count
);
GdipDeletePathIter
(
iter
);
GdipDeletePath
(
path
);
}
START_TEST
(
pathiterator
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -161,6 +204,7 @@ START_TEST(pathiterator)
test_constructor_destructor
();
test_hascurve
();
test_nextmarker
();
test_getsubpathcount
();
GdiplusShutdown
(
gdiplusToken
);
}
include/gdiplusflat.h
View file @
20501e4c
...
...
@@ -285,6 +285,7 @@ GpStatus WINGDIPAPI GdipPathIterNextMarker(GpPathIterator*,INT*,INT*,INT*);
GpStatus
WINGDIPAPI
GdipPathIterNextSubpath
(
GpPathIterator
*
,
INT
*
,
INT
*
,
INT
*
,
BOOL
*
);
GpStatus
WINGDIPAPI
GdipPathIterRewind
(
GpPathIterator
*
);
GpStatus
WINGDIPAPI
GdipPathIterGetCount
(
GpPathIterator
*
,
INT
*
);
GpStatus
WINGDIPAPI
GdipPathIterGetSubpathCount
(
GpPathIterator
*
,
INT
*
);
GpStatus
WINGDIPAPI
GdipPathIterEnumerate
(
GpPathIterator
*
,
INT
*
,
GpPointF
*
,
BYTE
*
,
INT
);
GpStatus
WINGDIPAPI
GdipPathIterHasCurve
(
GpPathIterator
*
,
BOOL
*
);
...
...
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