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
5c1edcfa
Commit
5c1edcfa
authored
Aug 29, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Stub for GdipFlattenPath with tests.
parent
f8096d2b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
1 deletion
+90
-1
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+1
-1
graphicspath.c
dlls/gdiplus/graphicspath.c
+13
-0
graphicspath.c
dlls/gdiplus/tests/graphicspath.c
+75
-0
gdiplusflat.h
include/gdiplusflat.h
+1
-0
No files found.
dlls/gdiplus/gdiplus.spec
View file @
5c1edcfa
...
...
@@ -233,7 +233,7 @@
@ stdcall GdipFillRegion(ptr ptr ptr)
@ stdcall GdipFindFirstImageItem(ptr ptr)
@ stub GdipFindNextImageItem
@ st
ub GdipFlattenPath
@ st
dcall GdipFlattenPath(ptr ptr long)
@ stdcall GdipFlush(ptr long)
@ stdcall GdipFree(ptr)
@ stub GdipGetAdjustableArrowCapFillState
...
...
dlls/gdiplus/graphicspath.c
View file @
5c1edcfa
...
...
@@ -816,6 +816,19 @@ GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipFlattenPath
(
GpPath
*
path
,
GpMatrix
*
matrix
,
REAL
flatness
)
{
static
int
calls
;
if
(
!
path
)
return
InvalidParameter
;
if
(
!
(
calls
++
))
FIXME
(
"not implemented
\n
"
);
return
NotImplemented
;
}
GpStatus
WINGDIPAPI
GdipGetPathData
(
GpPath
*
path
,
GpPathData
*
pathData
)
{
TRACE
(
"(%p, %p)
\n
"
,
path
,
pathData
);
...
...
dlls/gdiplus/tests/graphicspath.c
View file @
5c1edcfa
...
...
@@ -886,6 +886,80 @@ static void test_addpie(void)
GdipDeletePath
(
path
);
}
static
path_test_t
flattenellipse_path
[]
=
{
{
100
.
0
,
25
.
0
,
PathPointTypeStart
,
0
,
0
},
/*0*/
{
99
.
0
,
30
.
0
,
PathPointTypeLine
,
0
,
1
},
/*1*/
{
96
.
0
,
34
.
8
,
PathPointTypeLine
,
0
,
1
},
/*2*/
{
91
.
5
,
39
.
0
,
PathPointTypeLine
,
0
,
1
},
/*3*/
{
85
.
5
,
42
.
8
,
PathPointTypeLine
,
0
,
1
},
/*4*/
{
69
.
5
,
48
.
0
,
PathPointTypeLine
,
0
,
1
},
/*5*/
{
50
.
0
,
50
.
0
,
PathPointTypeLine
,
0
,
1
},
/*6*/
{
30
.
5
,
48
.
0
,
PathPointTypeLine
,
0
,
1
},
/*7*/
{
14
.
8
,
42
.
8
,
PathPointTypeLine
,
0
,
1
},
/*8*/
{
8
.
5
,
39
.
0
,
PathPointTypeLine
,
0
,
1
},
/*9*/
{
4
.
0
,
34
.
8
,
PathPointTypeLine
,
0
,
1
},
/*10*/
{
1
.
0
,
30
.
0
,
PathPointTypeLine
,
0
,
1
},
/*11*/
{
0
.
0
,
25
.
0
,
PathPointTypeLine
,
0
,
1
},
/*12*/
{
1
.
0
,
20
.
0
,
PathPointTypeLine
,
0
,
1
},
/*13*/
{
4
.
0
,
15
.
3
,
PathPointTypeLine
,
0
,
1
},
/*14*/
{
8
.
5
,
11
.
0
,
PathPointTypeLine
,
0
,
1
},
/*15*/
{
14
.
8
,
7
.
3
,
PathPointTypeLine
,
0
,
1
},
/*16*/
{
30
.
5
,
2
.
0
,
PathPointTypeLine
,
0
,
1
},
/*17*/
{
50
.
0
,
0
.
0
,
PathPointTypeLine
,
0
,
1
},
/*18*/
{
69
.
5
,
2
.
0
,
PathPointTypeLine
,
0
,
1
},
/*19*/
{
85
.
5
,
7
.
3
,
PathPointTypeLine
,
0
,
1
},
/*20*/
{
91
.
5
,
11
.
0
,
PathPointTypeLine
,
0
,
1
},
/*21*/
{
96
.
0
,
15
.
3
,
PathPointTypeLine
,
0
,
1
},
/*22*/
{
99
.
0
,
20
.
0
,
PathPointTypeLine
,
0
,
1
},
/*23*/
{
100
.
0
,
25
.
0
,
PathPointTypeLine
|
PathPointTypeCloseSubpath
,
0
,
1
}
/*24*/
};
static
path_test_t
flattenarc_path
[]
=
{
{
100
.
0
,
25
.
0
,
PathPointTypeStart
,
0
,
0
},
/*0*/
{
99
.
0
,
30
.
0
,
PathPointTypeLine
,
0
,
1
},
/*1*/
{
96
.
0
,
34
.
8
,
PathPointTypeLine
,
0
,
1
},
/*2*/
{
91
.
5
,
39
.
0
,
PathPointTypeLine
,
0
,
1
},
/*3*/
{
85
.
5
,
42
.
8
,
PathPointTypeLine
,
0
,
1
},
/*4*/
{
69
.
5
,
48
.
0
,
PathPointTypeLine
,
0
,
1
},
/*5*/
{
50
.
0
,
50
.
0
,
PathPointTypeLine
,
0
,
1
}
/*6*/
};
static
void
test_flatten
(
void
)
{
GpStatus
status
;
GpPath
*
path
;
GpMatrix
*
m
;
status
=
GdipCreatePath
(
FillModeAlternate
,
&
path
);
expect
(
Ok
,
status
);
status
=
GdipCreateMatrix
(
&
m
);
expect
(
Ok
,
status
);
/* NULL arguments */
status
=
GdipFlattenPath
(
NULL
,
NULL
,
0
.
0
);
expect
(
InvalidParameter
,
status
);
status
=
GdipFlattenPath
(
NULL
,
m
,
0
.
0
);
expect
(
InvalidParameter
,
status
);
status
=
GdipAddPathEllipse
(
path
,
0
.
0
,
0
.
0
,
100
.
0
,
50
.
0
);
expect
(
Ok
,
status
);
status
=
GdipFlattenPath
(
path
,
NULL
,
1
.
0
);
todo_wine
expect
(
Ok
,
status
);
ok_path
(
path
,
flattenellipse_path
,
sizeof
(
flattenellipse_path
)
/
sizeof
(
path_test_t
),
TRUE
);
status
=
GdipResetPath
(
path
);
expect
(
Ok
,
status
);
status
=
GdipAddPathArc
(
path
,
0
.
0
,
0
.
0
,
100
.
0
,
50
.
0
,
0
.
0
,
90
.
0
);
expect
(
Ok
,
status
);
status
=
GdipFlattenPath
(
path
,
NULL
,
1
.
0
);
todo_wine
expect
(
Ok
,
status
);
ok_path
(
path
,
flattenarc_path
,
sizeof
(
flattenarc_path
)
/
sizeof
(
path_test_t
),
TRUE
);
GdipDeleteMatrix
(
m
);
GdipDeletePath
(
path
);
}
START_TEST
(
graphicspath
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -913,6 +987,7 @@ START_TEST(graphicspath)
test_addclosedcurve
();
test_reverse
();
test_addpie
();
test_flatten
();
GdiplusShutdown
(
gdiplusToken
);
}
include/gdiplusflat.h
View file @
5c1edcfa
...
...
@@ -288,6 +288,7 @@ GpStatus WINGDIPAPI GdipCreatePath2(GDIPCONST GpPointF*,GDIPCONST BYTE*,INT,
GpFillMode
,
GpPath
**
);
GpStatus
WINGDIPAPI
GdipCreatePath2I
(
GDIPCONST
GpPoint
*
,
GDIPCONST
BYTE
*
,
INT
,
GpFillMode
,
GpPath
**
);
GpStatus
WINGDIPAPI
GdipDeletePath
(
GpPath
*
);
GpStatus
WINGDIPAPI
GdipFlattenPath
(
GpPath
*
,
GpMatrix
*
,
REAL
);
GpStatus
WINGDIPAPI
GdipGetPathData
(
GpPath
*
,
GpPathData
*
);
GpStatus
WINGDIPAPI
GdipGetPathFillMode
(
GpPath
*
,
GpFillMode
*
);
GpStatus
WINGDIPAPI
GdipGetPathLastPoint
(
GpPath
*
,
GpPointF
*
);
...
...
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