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
c47b1676
Commit
c47b1676
authored
Jul 03, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implemented GdipPathIterHasCurve with tests.
parent
70218092
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
1 deletion
+60
-1
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+1
-1
pathiterator.c
dlls/gdiplus/pathiterator.c
+18
-0
pathiterator.c
dlls/gdiplus/tests/pathiterator.c
+40
-0
gdiplusflat.h
include/gdiplusflat.h
+1
-0
No files found.
dlls/gdiplus/gdiplus.spec
View file @
c47b1676
...
...
@@ -454,7 +454,7 @@
@ stdcall GdipPathIterEnumerate(ptr ptr ptr ptr long)
@ stdcall GdipPathIterGetCount(ptr ptr)
@ stub GdipPathIterGetSubpathCount
@ st
ub GdipPathIterHasCurve
@ st
dcall GdipPathIterHasCurve(ptr ptr)
@ stub GdipPathIterIsValid
@ stub GdipPathIterNextMarker
@ stub GdipPathIterNextMarkerPath
...
...
dlls/gdiplus/pathiterator.c
View file @
c47b1676
...
...
@@ -87,6 +87,24 @@ GpStatus WINGDIPAPI GdipPathIterCopyData(GpPathIterator* iterator,
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipPathIterHasCurve
(
GpPathIterator
*
iterator
,
BOOL
*
hasCurve
)
{
INT
i
;
if
(
!
iterator
)
return
InvalidParameter
;
*
hasCurve
=
FALSE
;
for
(
i
=
0
;
i
<
iterator
->
pathdata
.
Count
;
i
++
)
if
((
iterator
->
pathdata
.
Types
[
i
]
&
PathPointTypePathTypeMask
)
==
PathPointTypeBezier
){
*
hasCurve
=
TRUE
;
break
;
}
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipPathIterNextSubpath
(
GpPathIterator
*
iterator
,
INT
*
resultCount
,
INT
*
startIndex
,
INT
*
endIndex
,
BOOL
*
isClosed
)
{
...
...
dlls/gdiplus/tests/pathiterator.c
View file @
c47b1676
...
...
@@ -51,6 +51,45 @@ static void test_constructor_destructor(void)
GdipDeletePath
(
path
);
}
static
void
test_hascurve
(
void
)
{
GpPath
*
path
;
GpPathIterator
*
iter
;
GpStatus
stat
;
BOOL
hasCurve
;
GdipCreatePath
(
FillModeAlternate
,
&
path
);
GdipAddPathRectangle
(
path
,
5
.
0
,
5
.
0
,
100
.
0
,
50
.
0
);
stat
=
GdipCreatePathIter
(
&
iter
,
path
);
expect
(
Ok
,
stat
);
/* NULL args
BOOL out argument is local in wrapper class method,
so it always has not-NULL address */
stat
=
GdipPathIterHasCurve
(
NULL
,
&
hasCurve
);
expect
(
InvalidParameter
,
stat
);
/* valid args */
stat
=
GdipPathIterHasCurve
(
iter
,
&
hasCurve
);
expect
(
Ok
,
stat
);
expect
(
FALSE
,
hasCurve
);
GdipDeletePathIter
(
iter
);
GdipAddPathEllipse
(
path
,
0
.
0
,
0
.
0
,
35
.
0
,
70
.
0
);
stat
=
GdipCreatePathIter
(
&
iter
,
path
);
expect
(
Ok
,
stat
);
stat
=
GdipPathIterHasCurve
(
iter
,
&
hasCurve
);
expect
(
Ok
,
stat
);
expect
(
TRUE
,
hasCurve
);
GdipDeletePathIter
(
iter
);
GdipDeletePath
(
path
);
}
START_TEST
(
pathiterator
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -64,6 +103,7 @@ START_TEST(pathiterator)
GdiplusStartup
(
&
gdiplusToken
,
&
gdiplusStartupInput
,
NULL
);
test_constructor_destructor
();
test_hascurve
();
GdiplusShutdown
(
gdiplusToken
);
}
include/gdiplusflat.h
View file @
c47b1676
...
...
@@ -285,6 +285,7 @@ GpStatus WINGDIPAPI GdipPathIterNextSubpath(GpPathIterator*,INT*,INT*,INT*,BOOL*
GpStatus
WINGDIPAPI
GdipPathIterRewind
(
GpPathIterator
*
);
GpStatus
WINGDIPAPI
GdipPathIterGetCount
(
GpPathIterator
*
,
INT
*
);
GpStatus
WINGDIPAPI
GdipPathIterEnumerate
(
GpPathIterator
*
,
INT
*
,
GpPointF
*
,
BYTE
*
,
INT
);
GpStatus
WINGDIPAPI
GdipPathIterHasCurve
(
GpPathIterator
*
,
BOOL
*
);
GpStatus
WINGDIPAPI
GdipCloneCustomLineCap
(
GpCustomLineCap
*
,
GpCustomLineCap
**
);
GpStatus
WINGDIPAPI
GdipCreateCustomLineCap
(
GpPath
*
,
GpPath
*
,
GpLineCap
,
REAL
,
...
...
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