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
7cddc579
Commit
7cddc579
authored
Dec 15, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 15, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Added GdipAddPathCurve3/GdipAddPathCurve3I with tests.
parent
48e213b4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
2 deletions
+66
-2
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+2
-2
graphicspath.c
dlls/gdiplus/graphicspath.c
+22
-0
graphicspath.c
dlls/gdiplus/tests/graphicspath.c
+40
-0
gdiplusflat.h
include/gdiplusflat.h
+2
-0
No files found.
dlls/gdiplus/gdiplus.spec
View file @
7cddc579
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
@ stdcall GdipAddPathClosedCurveI(ptr ptr long)
@ stdcall GdipAddPathClosedCurveI(ptr ptr long)
@ stdcall GdipAddPathCurve2(ptr ptr long long)
@ stdcall GdipAddPathCurve2(ptr ptr long long)
@ stdcall GdipAddPathCurve2I(ptr ptr long long)
@ stdcall GdipAddPathCurve2I(ptr ptr long long)
@ st
ub GdipAddPathCurve3
@ st
dcall GdipAddPathCurve3(ptr ptr long long long long)
@ st
ub GdipAddPathCurve3I
@ st
dcall GdipAddPathCurve3I(ptr ptr long long long long)
@ stdcall GdipAddPathCurve(ptr ptr long)
@ stdcall GdipAddPathCurve(ptr ptr long)
@ stdcall GdipAddPathCurveI(ptr ptr long)
@ stdcall GdipAddPathCurveI(ptr ptr long)
@ stdcall GdipAddPathEllipse(ptr long long long long)
@ stdcall GdipAddPathEllipse(ptr long long long long)
...
...
dlls/gdiplus/graphicspath.c
View file @
7cddc579
...
@@ -524,6 +524,28 @@ GpStatus WINGDIPAPI GdipAddPathCurve2I(GpPath *path, GDIPCONST GpPoint *points,
...
@@ -524,6 +524,28 @@ GpStatus WINGDIPAPI GdipAddPathCurve2I(GpPath *path, GDIPCONST GpPoint *points,
return
stat
;
return
stat
;
}
}
GpStatus
WINGDIPAPI
GdipAddPathCurve3
(
GpPath
*
path
,
GDIPCONST
GpPointF
*
points
,
INT
count
,
INT
offset
,
INT
nseg
,
REAL
tension
)
{
TRACE
(
"(%p, %p, %d, %d, %d, %.2f)
\n
"
,
path
,
points
,
count
,
offset
,
nseg
,
tension
);
if
(
!
path
||
!
points
||
offset
+
1
>=
count
||
count
-
offset
<
nseg
+
1
)
return
InvalidParameter
;
return
GdipAddPathCurve2
(
path
,
&
points
[
offset
],
nseg
+
1
,
tension
);
}
GpStatus
WINGDIPAPI
GdipAddPathCurve3I
(
GpPath
*
path
,
GDIPCONST
GpPoint
*
points
,
INT
count
,
INT
offset
,
INT
nseg
,
REAL
tension
)
{
TRACE
(
"(%p, %p, %d, %d, %d, %.2f)
\n
"
,
path
,
points
,
count
,
offset
,
nseg
,
tension
);
if
(
!
path
||
!
points
||
offset
+
1
>=
count
||
count
-
offset
<
nseg
+
1
)
return
InvalidParameter
;
return
GdipAddPathCurve2I
(
path
,
&
points
[
offset
],
nseg
+
1
,
tension
);
}
GpStatus
WINGDIPAPI
GdipAddPathEllipse
(
GpPath
*
path
,
REAL
x
,
REAL
y
,
REAL
width
,
GpStatus
WINGDIPAPI
GdipAddPathEllipse
(
GpPath
*
path
,
REAL
x
,
REAL
y
,
REAL
width
,
REAL
height
)
REAL
height
)
{
{
...
...
dlls/gdiplus/tests/graphicspath.c
View file @
7cddc579
...
@@ -726,6 +726,15 @@ static path_test_t addcurve_path2[] = {
...
@@ -726,6 +726,15 @@ static path_test_t addcurve_path2[] = {
{
23
.
3
,
13
.
3
,
PathPointTypeBezier
,
0
,
0
},
/*10*/
{
23
.
3
,
13
.
3
,
PathPointTypeBezier
,
0
,
0
},
/*10*/
{
30
.
0
,
10
.
0
,
PathPointTypeBezier
,
0
,
0
}
/*11*/
{
30
.
0
,
10
.
0
,
PathPointTypeBezier
,
0
,
0
}
/*11*/
};
};
static
path_test_t
addcurve_path3
[]
=
{
{
10
.
0
,
10
.
0
,
PathPointTypeStart
,
0
,
0
},
/*0*/
{
13
.
3
,
16
.
7
,
PathPointTypeBezier
,
0
,
1
},
/*1*/
{
3
.
3
,
20
.
0
,
PathPointTypeBezier
,
0
,
0
},
/*2*/
{
10
.
0
,
20
.
0
,
PathPointTypeBezier
,
0
,
0
},
/*3*/
{
16
.
7
,
20
.
0
,
PathPointTypeBezier
,
0
,
0
},
/*4*/
{
23
.
3
,
13
.
3
,
PathPointTypeBezier
,
0
,
0
},
/*5*/
{
30
.
0
,
10
.
0
,
PathPointTypeBezier
,
0
,
0
}
/*6*/
};
static
void
test_addcurve
(
void
)
static
void
test_addcurve
(
void
)
{
{
GpStatus
status
;
GpStatus
status
;
...
@@ -765,6 +774,37 @@ static void test_addcurve(void)
...
@@ -765,6 +774,37 @@ static void test_addcurve(void)
status
=
GdipAddPathCurve2
(
path
,
points
,
4
,
1
.
0
);
status
=
GdipAddPathCurve2
(
path
,
points
,
4
,
1
.
0
);
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
ok_path
(
path
,
addcurve_path2
,
sizeof
(
addcurve_path2
)
/
sizeof
(
path_test_t
),
FALSE
);
ok_path
(
path
,
addcurve_path2
,
sizeof
(
addcurve_path2
)
/
sizeof
(
path_test_t
),
FALSE
);
/* NULL args */
GdipResetPath
(
path
);
status
=
GdipAddPathCurve3
(
NULL
,
NULL
,
0
,
0
,
0
,
0
.
0
);
expect
(
InvalidParameter
,
status
);
status
=
GdipAddPathCurve3
(
path
,
NULL
,
0
,
0
,
0
,
0
.
0
);
expect
(
InvalidParameter
,
status
);
/* wrong count, offset.. */
status
=
GdipAddPathCurve3
(
path
,
points
,
0
,
0
,
0
,
0
.
0
);
expect
(
InvalidParameter
,
status
);
status
=
GdipAddPathCurve3
(
path
,
points
,
4
,
0
,
0
,
0
.
0
);
expect
(
InvalidParameter
,
status
);
status
=
GdipAddPathCurve3
(
path
,
points
,
4
,
0
,
4
,
0
.
0
);
expect
(
InvalidParameter
,
status
);
status
=
GdipAddPathCurve3
(
path
,
points
,
4
,
1
,
3
,
0
.
0
);
expect
(
InvalidParameter
,
status
);
status
=
GdipAddPathCurve3
(
path
,
points
,
4
,
1
,
0
,
0
.
0
);
expect
(
InvalidParameter
,
status
);
status
=
GdipAddPathCurve3
(
path
,
points
,
4
,
3
,
1
,
0
.
0
);
expect
(
InvalidParameter
,
status
);
/* use all points */
status
=
GdipAddPathCurve3
(
path
,
points
,
4
,
0
,
3
,
1
.
0
);
expect
(
Ok
,
status
);
ok_path
(
path
,
addcurve_path
,
sizeof
(
addcurve_path
)
/
sizeof
(
path_test_t
),
FALSE
);
GdipResetPath
(
path
);
status
=
GdipAddPathCurve3
(
path
,
points
,
4
,
1
,
2
,
1
.
0
);
expect
(
Ok
,
status
);
ok_path
(
path
,
addcurve_path3
,
sizeof
(
addcurve_path3
)
/
sizeof
(
path_test_t
),
FALSE
);
GdipDeletePath
(
path
);
GdipDeletePath
(
path
);
}
}
...
...
include/gdiplusflat.h
View file @
7cddc579
...
@@ -256,6 +256,8 @@ GpStatus WINGDIPAPI GdipAddPathCurve(GpPath*,GDIPCONST GpPointF*,INT);
...
@@ -256,6 +256,8 @@ GpStatus WINGDIPAPI GdipAddPathCurve(GpPath*,GDIPCONST GpPointF*,INT);
GpStatus
WINGDIPAPI
GdipAddPathCurveI
(
GpPath
*
,
GDIPCONST
GpPoint
*
,
INT
);
GpStatus
WINGDIPAPI
GdipAddPathCurveI
(
GpPath
*
,
GDIPCONST
GpPoint
*
,
INT
);
GpStatus
WINGDIPAPI
GdipAddPathCurve2
(
GpPath
*
,
GDIPCONST
GpPointF
*
,
INT
,
REAL
);
GpStatus
WINGDIPAPI
GdipAddPathCurve2
(
GpPath
*
,
GDIPCONST
GpPointF
*
,
INT
,
REAL
);
GpStatus
WINGDIPAPI
GdipAddPathCurve2I
(
GpPath
*
,
GDIPCONST
GpPoint
*
,
INT
,
REAL
);
GpStatus
WINGDIPAPI
GdipAddPathCurve2I
(
GpPath
*
,
GDIPCONST
GpPoint
*
,
INT
,
REAL
);
GpStatus
WINGDIPAPI
GdipAddPathCurve3
(
GpPath
*
,
GDIPCONST
GpPointF
*
,
INT
,
INT
,
INT
,
REAL
);
GpStatus
WINGDIPAPI
GdipAddPathCurve3I
(
GpPath
*
,
GDIPCONST
GpPoint
*
,
INT
,
INT
,
INT
,
REAL
);
GpStatus
WINGDIPAPI
GdipAddPathEllipse
(
GpPath
*
,
REAL
,
REAL
,
REAL
,
REAL
);
GpStatus
WINGDIPAPI
GdipAddPathEllipse
(
GpPath
*
,
REAL
,
REAL
,
REAL
,
REAL
);
GpStatus
WINGDIPAPI
GdipAddPathEllipseI
(
GpPath
*
,
INT
,
INT
,
INT
,
INT
);
GpStatus
WINGDIPAPI
GdipAddPathEllipseI
(
GpPath
*
,
INT
,
INT
,
INT
,
INT
);
GpStatus
WINGDIPAPI
GdipAddPathLine
(
GpPath
*
,
REAL
,
REAL
,
REAL
,
REAL
);
GpStatus
WINGDIPAPI
GdipAddPathLine
(
GpPath
*
,
REAL
,
REAL
,
REAL
,
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