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
3bacdaf6
Commit
3bacdaf6
authored
Jun 18, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implemented GdipGetPathData with test.
parent
f620b663
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
1 deletion
+47
-1
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+1
-1
graphicspath.c
dlls/gdiplus/graphicspath.c
+22
-0
graphicspath.c
dlls/gdiplus/tests/graphicspath.c
+23
-0
gdiplusflat.h
include/gdiplusflat.h
+1
-0
No files found.
dlls/gdiplus/gdiplus.spec
View file @
3bacdaf6
...
...
@@ -323,7 +323,7 @@
@ stub GdipGetNearestColor
@ stdcall GdipGetPageScale(ptr ptr)
@ stdcall GdipGetPageUnit(ptr ptr)
@ st
ub GdipGetPathData
@ st
dcall GdipGetPathData(ptr ptr)
@ stdcall GdipGetPathFillMode(ptr ptr)
@ stub GdipGetPathGradientBlend
@ stub GdipGetPathGradientBlendCount
...
...
dlls/gdiplus/graphicspath.c
View file @
3bacdaf6
...
...
@@ -479,6 +479,28 @@ GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipGetPathData
(
GpPath
*
path
,
GpPathData
*
pathData
)
{
if
(
!
path
||
!
pathData
)
return
InvalidParameter
;
pathData
->
Count
=
path
->
pathdata
.
Count
;
pathData
->
Points
=
GdipAlloc
(
sizeof
(
PointF
)
*
pathData
->
Count
);
if
(
!
pathData
->
Points
)
return
OutOfMemory
;
pathData
->
Types
=
GdipAlloc
(
pathData
->
Count
);
if
(
!
pathData
->
Points
)
return
OutOfMemory
;
/* copy data */
memcpy
(
pathData
->
Points
,
path
->
pathdata
.
Points
,
sizeof
(
PointF
)
*
pathData
->
Count
);
memcpy
(
pathData
->
Types
,
path
->
pathdata
.
Types
,
pathData
->
Count
);
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipGetPathFillMode
(
GpPath
*
path
,
GpFillMode
*
fillmode
)
{
if
(
!
path
||
!
fillmode
)
...
...
dlls/gdiplus/tests/graphicspath.c
View file @
3bacdaf6
...
...
@@ -149,6 +149,28 @@ static void test_constructor_destructor(void)
expect
(
Ok
,
status
);
}
static
void
test_getpathdata
(
void
)
{
GpPath
*
path
;
GpPathData
data
;
GpStatus
status
;
GdipCreatePath
(
FillModeAlternate
,
&
path
);
status
=
GdipAddPathLine
(
path
,
5
.
0
,
5
.
0
,
100
.
0
,
50
.
0
);
expect
(
Ok
,
status
);
status
=
GdipGetPathData
(
path
,
&
data
);
expect
(
Ok
,
status
);
expect
((
data
.
Count
==
2
),
TRUE
);
expect
((
data
.
Points
[
0
].
X
==
5
.
0
)
&&
(
data
.
Points
[
0
].
Y
==
5
.
0
)
&&
(
data
.
Points
[
1
].
X
==
100
.
0
)
&&
(
data
.
Points
[
1
].
Y
==
50
.
0
),
TRUE
);
expect
((
data
.
Types
[
0
]
==
PathPointTypeStart
)
&&
(
data
.
Types
[
1
]
==
PathPointTypeLine
),
TRUE
);
GdipFree
(
data
.
Points
);
GdipFree
(
data
.
Types
);
GdipDeletePath
(
path
);
}
static
path_test_t
line2_path
[]
=
{
{
0
.
0
,
50
.
0
,
PathPointTypeStart
,
0
,
0
},
/*0*/
{
5
.
0
,
45
.
0
,
PathPointTypeLine
,
0
,
0
},
/*1*/
...
...
@@ -605,6 +627,7 @@ START_TEST(graphicspath)
GdiplusStartup
(
&
gdiplusToken
,
&
gdiplusStartupInput
,
NULL
);
test_constructor_destructor
();
test_getpathdata
();
test_line2
();
test_arc
();
test_worldbounds
();
...
...
include/gdiplusflat.h
View file @
3bacdaf6
...
...
@@ -225,6 +225,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
GdipGetPathData
(
GpPath
*
,
GpPathData
*
);
GpStatus
WINGDIPAPI
GdipGetPathFillMode
(
GpPath
*
,
GpFillMode
*
);
GpStatus
WINGDIPAPI
GdipGetPathPoints
(
GpPath
*
,
GpPointF
*
,
INT
);
GpStatus
WINGDIPAPI
GdipGetPathPointsI
(
GpPath
*
,
GpPoint
*
,
INT
);
...
...
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