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
90fb4748
Commit
90fb4748
authored
Jan 24, 2024
by
David Kahurani
Committed by
Alexandre Julliard
Jan 29, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Use GdipCreatePath2 in GdipClonePath.
This seems like a more effective interface and avoids code duplication. Signed-off-by:
David Kahurani
<
k.kahurani@gmail.com
>
parent
ba6a6d57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
16 deletions
+7
-16
graphicspath.c
dlls/gdiplus/graphicspath.c
+7
-16
No files found.
dlls/gdiplus/graphicspath.c
View file @
90fb4748
...
...
@@ -1185,24 +1185,15 @@ GpStatus WINGDIPAPI GdipClonePath(GpPath* path, GpPath **clone)
if
(
!
path
||
!
clone
)
return
InvalidParameter
;
*
clone
=
malloc
(
sizeof
(
GpPath
));
if
(
!*
clone
)
return
OutOfMemory
;
**
clone
=
*
path
;
(
*
clone
)
->
pathdata
.
Points
=
malloc
(
path
->
datalen
*
sizeof
(
PointF
));
(
*
clone
)
->
pathdata
.
Types
=
malloc
(
path
->
datalen
);
if
(
!
(
*
clone
)
->
pathdata
.
Points
||
!
(
*
clone
)
->
pathdata
.
Types
){
free
((
*
clone
)
->
pathdata
.
Points
);
free
((
*
clone
)
->
pathdata
.
Types
);
free
(
*
clone
);
return
OutOfMemory
;
if
(
path
->
pathdata
.
Count
)
return
GdipCreatePath2
(
path
->
pathdata
.
Points
,
path
->
pathdata
.
Types
,
path
->
pathdata
.
Count
,
path
->
fill
,
clone
);
else
{
*
clone
=
calloc
(
1
,
sizeof
(
GpPath
));
if
(
!*
clone
)
return
OutOfMemory
;
}
memcpy
((
*
clone
)
->
pathdata
.
Points
,
path
->
pathdata
.
Points
,
path
->
datalen
*
sizeof
(
PointF
));
memcpy
((
*
clone
)
->
pathdata
.
Types
,
path
->
pathdata
.
Types
,
path
->
datalen
);
return
Ok
;
}
...
...
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