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
d26c0ca2
Commit
d26c0ca2
authored
Aug 26, 2016
by
Vincent Povirk
Committed by
Alexandre Julliard
Aug 27, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Copy remap tables when cloning an ImageAttributes.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
25dbca10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
2 deletions
+36
-2
imageattributes.c
dlls/gdiplus/imageattributes.c
+36
-2
No files found.
dlls/gdiplus/imageattributes.c
View file @
d26c0ca2
...
...
@@ -30,18 +30,52 @@ WINE_DEFAULT_DEBUG_CHANNEL(gdiplus);
GpStatus
WINGDIPAPI
GdipCloneImageAttributes
(
GDIPCONST
GpImageAttributes
*
imageattr
,
GpImageAttributes
**
cloneImageattr
)
{
GpStatus
stat
;
GpStatus
stat
=
Ok
;
struct
color_remap_table
remap_tables
[
ColorAdjustTypeCount
]
=
{{
0
}};
int
i
;
TRACE
(
"(%p, %p)
\n
"
,
imageattr
,
cloneImageattr
);
if
(
!
imageattr
||
!
cloneImageattr
)
return
InvalidParameter
;
stat
=
GdipCreateImageAttributes
(
cloneImageattr
);
for
(
i
=
0
;
i
<
ColorAdjustTypeCount
;
i
++
)
{
if
(
imageattr
->
colorremaptables
[
i
].
enabled
)
{
remap_tables
[
i
].
enabled
=
TRUE
;
remap_tables
[
i
].
mapsize
=
imageattr
->
colorremaptables
[
i
].
mapsize
;
remap_tables
[
i
].
colormap
=
heap_alloc
(
sizeof
(
ColorMap
)
*
remap_tables
[
i
].
mapsize
);
if
(
remap_tables
[
i
].
colormap
)
{
memcpy
(
remap_tables
[
i
].
colormap
,
imageattr
->
colorremaptables
[
i
].
colormap
,
sizeof
(
ColorMap
)
*
remap_tables
[
i
].
mapsize
);
}
else
{
stat
=
OutOfMemory
;
break
;
}
}
}
if
(
stat
==
Ok
)
stat
=
GdipCreateImageAttributes
(
cloneImageattr
);
if
(
stat
==
Ok
)
{
**
cloneImageattr
=
*
imageattr
;
memcpy
((
*
cloneImageattr
)
->
colorremaptables
,
remap_tables
,
sizeof
(
remap_tables
));
}
if
(
stat
!=
Ok
)
{
for
(
i
=
0
;
i
<
ColorAdjustTypeCount
;
i
++
)
heap_free
(
remap_tables
[
i
].
colormap
);
}
return
stat
;
}
...
...
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