Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a53b9b95
Commit
a53b9b95
authored
Jul 13, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Fix for GdipPathIterNextMarker to handle path without markers. Fix tests.
parent
dcfbe58e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
5 deletions
+31
-5
pathiterator.c
dlls/gdiplus/pathiterator.c
+2
-1
pathiterator.c
dlls/gdiplus/tests/pathiterator.c
+29
-4
No files found.
dlls/gdiplus/pathiterator.c
View file @
a53b9b95
...
...
@@ -140,7 +140,8 @@ GpStatus WINGDIPAPI GdipPathIterNextMarker(GpPathIterator* iterator, INT *result
/* first call could start with second point as all subsequent, cause
path couldn't contain only one */
for
(
i
=
iterator
->
marker_pos
+
1
;
i
<
iterator
->
pathdata
.
Count
;
i
++
){
if
(
iterator
->
pathdata
.
Types
[
i
]
&
PathPointTypePathMarker
){
if
((
iterator
->
pathdata
.
Types
[
i
]
&
PathPointTypePathMarker
)
||
(
i
==
iterator
->
pathdata
.
Count
-
1
)){
*
startIndex
=
iterator
->
marker_pos
;
if
(
iterator
->
marker_pos
>
0
)
(
*
startIndex
)
++
;
*
endIndex
=
iterator
->
marker_pos
=
i
;
...
...
dlls/gdiplus/tests/pathiterator.c
View file @
a53b9b95
...
...
@@ -95,7 +95,8 @@ static void test_nextmarker(void)
GpPath
*
path
;
GpPathIterator
*
iter
;
GpStatus
stat
;
INT
start
,
end
,
result
;
INT
start
,
end
;
INT
result
;
/* NULL args
BOOL out argument is local in wrapper class method,
...
...
@@ -112,19 +113,34 @@ static void test_nextmarker(void)
/* no markers */
GdipCreatePathIter
(
&
iter
,
path
);
start
=
end
=
result
=
(
INT
)
0xdeadbeef
;
stat
=
GdipPathIterNextMarker
(
iter
,
&
result
,
&
start
,
&
end
);
expect
(
Ok
,
stat
);
expect
(
0
,
start
);
expect
(
3
,
end
);
expect
(
4
,
result
);
start
=
end
=
result
=
(
INT
)
0xdeadbeef
;
stat
=
GdipPathIterNextMarker
(
iter
,
&
result
,
&
start
,
&
end
);
/* start/end remain unchanged */
expect
((
INT
)
0xdeadbeef
,
start
);
expect
((
INT
)
0xdeadbeef
,
end
);
expect
(
0
,
result
);
GdipDeletePathIter
(
iter
);
/* one marker */
GdipSetPathMarker
(
path
);
GdipCreatePathIter
(
&
iter
,
path
);
start
=
end
=
result
=
(
INT
)
0xdeadbeef
;
stat
=
GdipPathIterNextMarker
(
iter
,
&
result
,
&
start
,
&
end
);
expect
(
Ok
,
stat
);
expect
(
TRUE
,
(
start
==
0
)
&&
(
end
==
3
)
&&
(
result
==
4
));
expect
(
0
,
start
);
expect
(
3
,
end
);
expect
(
4
,
result
);
start
=
end
=
result
=
(
INT
)
0xdeadbeef
;
stat
=
GdipPathIterNextMarker
(
iter
,
&
result
,
&
start
,
&
end
);
expect
(
Ok
,
stat
);
expect
((
INT
)
0xdeadbeef
,
start
);
expect
((
INT
)
0xdeadbeef
,
end
);
expect
(
0
,
result
);
GdipDeletePathIter
(
iter
);
...
...
@@ -132,14 +148,23 @@ static void test_nextmarker(void)
GdipAddPathLine
(
path
,
0
.
0
,
0
.
0
,
10
.
0
,
30
.
0
);
GdipSetPathMarker
(
path
);
GdipCreatePathIter
(
&
iter
,
path
);
start
=
end
=
result
=
(
INT
)
0xdeadbeef
;
stat
=
GdipPathIterNextMarker
(
iter
,
&
result
,
&
start
,
&
end
);
expect
(
Ok
,
stat
);
expect
(
TRUE
,
(
start
==
0
)
&&
(
end
==
3
)
&&
(
result
==
4
));
expect
(
0
,
start
);
expect
(
3
,
end
);
expect
(
4
,
result
);
start
=
end
=
result
=
(
INT
)
0xdeadbeef
;
stat
=
GdipPathIterNextMarker
(
iter
,
&
result
,
&
start
,
&
end
);
expect
(
Ok
,
stat
);
expect
(
TRUE
,
(
start
==
4
)
&&
(
end
==
5
)
&&
(
result
==
2
));
expect
(
4
,
start
);
expect
(
5
,
end
);
expect
(
2
,
result
);
start
=
end
=
result
=
(
INT
)
0xdeadbeef
;
stat
=
GdipPathIterNextMarker
(
iter
,
&
result
,
&
start
,
&
end
);
expect
(
Ok
,
stat
);
expect
((
INT
)
0xdeadbeef
,
start
);
expect
((
INT
)
0xdeadbeef
,
end
);
expect
(
0
,
result
);
GdipDeletePathIter
(
iter
);
...
...
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