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
40456271
Commit
40456271
authored
Aug 04, 2008
by
Adam Petaccia
Committed by
Alexandre Julliard
Aug 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipCloneRegion.
parent
cf3d4928
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
3 deletions
+66
-3
region.c
dlls/gdiplus/region.c
+66
-3
No files found.
dlls/gdiplus/region.c
View file @
40456271
...
...
@@ -162,15 +162,78 @@ static inline void delete_element(region_element* element)
}
}
static
inline
GpStatus
clone_element
(
const
region_element
*
element
,
region_element
**
element2
)
{
GpStatus
stat
;
*
element2
=
GdipAlloc
(
sizeof
(
region_element
));
if
(
!*
element2
)
return
OutOfMemory
;
(
*
element2
)
->
type
=
element
->
type
;
switch
(
element
->
type
)
{
case
RegionDataRect
:
(
*
element2
)
->
elementdata
.
rect
=
element
->
elementdata
.
rect
;
break
;
case
RegionDataEmptyRect
:
case
RegionDataInfiniteRect
:
break
;
case
RegionDataPath
:
(
*
element2
)
->
elementdata
.
pathdata
.
pathheader
=
element
->
elementdata
.
pathdata
.
pathheader
;
stat
=
GdipClonePath
(
element
->
elementdata
.
pathdata
.
path
,
&
(
*
element2
)
->
elementdata
.
pathdata
.
path
);
if
(
stat
!=
Ok
)
goto
clone_out
;
break
;
default:
stat
=
clone_element
(
element
->
elementdata
.
combine
.
left
,
&
(
*
element2
)
->
elementdata
.
combine
.
left
);
if
(
stat
!=
Ok
)
goto
clone_out
;
stat
=
clone_element
(
element
->
elementdata
.
combine
.
right
,
&
(
*
element2
)
->
elementdata
.
combine
.
right
);
if
(
stat
!=
Ok
)
goto
clone_out
;
break
;
}
return
Ok
;
clone_out:
delete_element
(
*
element2
);
*
element2
=
NULL
;
return
stat
;
}
/*****************************************************************************
* GdipCloneRegion [GDIPLUS.@]
*
* Creates a deep copy of the region
*
* PARAMS
* region [I] source region
* clone [O] resulting clone
*
* RETURNS
* SUCCESS: Ok
* FAILURE: InvalidParameter or OutOfMemory
*/
GpStatus
WINGDIPAPI
GdipCloneRegion
(
GpRegion
*
region
,
GpRegion
**
clone
)
{
FIXME
(
"(%p %p): stub
\n
"
,
region
,
clone
)
;
region_element
*
element
;
*
clone
=
NULL
;
return
NotImplemented
;
TRACE
(
"%p %p
\n
"
,
region
,
clone
);
if
(
!
(
region
&&
clone
))
return
InvalidParameter
;
*
clone
=
GdipAlloc
(
sizeof
(
GpRegion
));
if
(
!*
clone
)
return
OutOfMemory
;
element
=
&
(
*
clone
)
->
node
;
(
*
clone
)
->
header
=
region
->
header
;
return
clone_element
(
&
region
->
node
,
&
element
);
}
GpStatus
WINGDIPAPI
GdipCombineRegionPath
(
GpRegion
*
region
,
GpPath
*
path
,
CombineMode
mode
)
...
...
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