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
af4562c3
Commit
af4562c3
authored
Aug 19, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implemented GdipPathIterNextMarkerPath with tests.
parent
9c62181a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
110 additions
and
1 deletion
+110
-1
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+1
-1
pathiterator.c
dlls/gdiplus/pathiterator.c
+24
-0
pathiterator.c
dlls/gdiplus/tests/pathiterator.c
+84
-0
gdiplusflat.h
include/gdiplusflat.h
+1
-0
No files found.
dlls/gdiplus/gdiplus.spec
View file @
af4562c3
...
...
@@ -457,7 +457,7 @@
@ stdcall GdipPathIterHasCurve(ptr ptr)
@ stdcall GdipPathIterIsValid(ptr ptr)
@ stdcall GdipPathIterNextMarker(ptr ptr ptr ptr)
@ st
ub GdipPathIterNextMarkerPath
@ st
dcall GdipPathIterNextMarkerPath(ptr ptr ptr)
@ stub GdipPathIterNextPathType
@ stdcall GdipPathIterNextSubpath(ptr ptr ptr ptr ptr)
@ stdcall GdipPathIterNextSubpathPath(ptr ptr ptr ptr)
...
...
dlls/gdiplus/pathiterator.c
View file @
af4562c3
...
...
@@ -153,6 +153,30 @@ GpStatus WINGDIPAPI GdipPathIterNextMarker(GpPathIterator* iterator, INT *result
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipPathIterNextMarkerPath
(
GpPathIterator
*
iterator
,
INT
*
result
,
GpPath
*
path
)
{
INT
start
,
end
;
if
(
!
iterator
||
!
result
)
return
InvalidParameter
;
GdipPathIterNextMarker
(
iterator
,
result
,
&
start
,
&
end
);
/* return path */
if
(((
*
result
)
>
0
)
&&
path
){
GdipResetPath
(
path
);
if
(
!
lengthen_path
(
path
,
*
result
))
return
OutOfMemory
;
memcpy
(
path
->
pathdata
.
Points
,
&
(
iterator
->
pathdata
.
Points
[
start
]),
sizeof
(
GpPointF
)
*
(
*
result
));
memcpy
(
path
->
pathdata
.
Types
,
&
(
iterator
->
pathdata
.
Types
[
start
]),
sizeof
(
BYTE
)
*
(
*
result
));
path
->
pathdata
.
Count
=
*
result
;
}
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipPathIterNextSubpath
(
GpPathIterator
*
iterator
,
INT
*
resultCount
,
INT
*
startIndex
,
INT
*
endIndex
,
BOOL
*
isClosed
)
{
...
...
dlls/gdiplus/tests/pathiterator.c
View file @
af4562c3
...
...
@@ -171,6 +171,89 @@ static void test_nextmarker(void)
GdipDeletePath
(
path
);
}
static
void
test_nextmarkerpath
(
void
)
{
GpPath
*
path
,
*
retpath
;
GpPathIterator
*
iter
;
GpStatus
stat
;
INT
result
,
count
;
GdipCreatePath
(
FillModeAlternate
,
&
path
);
/* NULL */
stat
=
GdipPathIterNextMarkerPath
(
NULL
,
NULL
,
NULL
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipPathIterNextMarkerPath
(
NULL
,
&
result
,
NULL
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipPathIterNextMarkerPath
(
NULL
,
&
result
,
path
);
expect
(
InvalidParameter
,
stat
);
GdipAddPathRectangle
(
path
,
5
.
0
,
5
.
0
,
100
.
0
,
50
.
0
);
/* no markers */
GdipCreatePath
(
FillModeAlternate
,
&
retpath
);
GdipCreatePathIter
(
&
iter
,
path
);
result
=
-
1
;
stat
=
GdipPathIterNextMarkerPath
(
iter
,
&
result
,
retpath
);
expect
(
Ok
,
stat
);
expect
(
4
,
result
);
count
=
-
1
;
GdipGetPointCount
(
retpath
,
&
count
);
expect
(
4
,
count
);
result
=
-
1
;
stat
=
GdipPathIterNextMarkerPath
(
iter
,
&
result
,
retpath
);
expect
(
Ok
,
stat
);
expect
(
0
,
result
);
count
=
-
1
;
GdipGetPointCount
(
retpath
,
&
count
);
expect
(
4
,
count
);
GdipDeletePathIter
(
iter
);
GdipDeletePath
(
retpath
);
/* one marker */
GdipSetPathMarker
(
path
);
GdipCreatePath
(
FillModeAlternate
,
&
retpath
);
GdipCreatePathIter
(
&
iter
,
path
);
result
=
-
1
;
stat
=
GdipPathIterNextMarkerPath
(
iter
,
&
result
,
retpath
);
expect
(
Ok
,
stat
);
expect
(
4
,
result
);
count
=
-
1
;
GdipGetPointCount
(
retpath
,
&
count
);
expect
(
4
,
count
);
result
=
-
1
;
stat
=
GdipPathIterNextMarkerPath
(
iter
,
&
result
,
retpath
);
expect
(
Ok
,
stat
);
expect
(
0
,
result
);
count
=
-
1
;
GdipGetPointCount
(
retpath
,
&
count
);
expect
(
4
,
count
);
GdipDeletePathIter
(
iter
);
GdipDeletePath
(
retpath
);
/* two markers */
GdipAddPathLine
(
path
,
0
.
0
,
0
.
0
,
10
.
0
,
30
.
0
);
GdipSetPathMarker
(
path
);
GdipCreatePath
(
FillModeAlternate
,
&
retpath
);
GdipCreatePathIter
(
&
iter
,
path
);
result
=
-
1
;
stat
=
GdipPathIterNextMarkerPath
(
iter
,
&
result
,
retpath
);
expect
(
Ok
,
stat
);
expect
(
4
,
result
);
result
=
-
1
;
stat
=
GdipPathIterNextMarkerPath
(
iter
,
&
result
,
retpath
);
expect
(
Ok
,
stat
);
expect
(
2
,
result
);
result
=
-
1
;
stat
=
GdipPathIterNextMarkerPath
(
iter
,
&
result
,
retpath
);
expect
(
Ok
,
stat
);
expect
(
0
,
result
);
GdipDeletePathIter
(
iter
);
GdipDeletePath
(
retpath
);
GdipDeletePath
(
path
);
}
static
void
test_getsubpathcount
(
void
)
{
GpPath
*
path
;
...
...
@@ -408,6 +491,7 @@ START_TEST(pathiterator)
test_constructor_destructor
();
test_hascurve
();
test_nextmarker
();
test_nextmarkerpath
();
test_getsubpathcount
();
test_isvalid
();
test_nextsubpathpath
();
...
...
include/gdiplusflat.h
View file @
af4562c3
...
...
@@ -328,6 +328,7 @@ GpStatus WINGDIPAPI GdipDeletePathIter(GpPathIterator*);
GpStatus
WINGDIPAPI
GdipPathIterCopyData
(
GpPathIterator
*
,
INT
*
,
GpPointF
*
,
BYTE
*
,
INT
,
INT
);
GpStatus
WINGDIPAPI
GdipPathIterNextMarker
(
GpPathIterator
*
,
INT
*
,
INT
*
,
INT
*
);
GpStatus
WINGDIPAPI
GdipPathIterNextMarkerPath
(
GpPathIterator
*
,
INT
*
,
GpPath
*
);
GpStatus
WINGDIPAPI
GdipPathIterNextSubpath
(
GpPathIterator
*
,
INT
*
,
INT
*
,
INT
*
,
BOOL
*
);
GpStatus
WINGDIPAPI
GdipPathIterNextSubpathPath
(
GpPathIterator
*
,
INT
*
,
GpPath
*
,
BOOL
*
);
GpStatus
WINGDIPAPI
GdipPathIterRewind
(
GpPathIterator
*
);
...
...
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