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
8a9438d5
Commit
8a9438d5
authored
Jul 24, 2008
by
Adam Petaccia
Committed by
Alexandre Julliard
Jul 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipDeleteRegion.
parent
889bc311
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
3 deletions
+33
-3
region.c
dlls/gdiplus/region.c
+30
-2
region.c
dlls/gdiplus/tests/region.c
+3
-1
No files found.
dlls/gdiplus/region.c
View file @
8a9438d5
...
...
@@ -121,6 +121,27 @@ static inline GpStatus init_region(GpRegion* region, const RegionType type)
return
Ok
;
}
static
inline
void
delete_element
(
region_element
*
element
)
{
switch
(
element
->
type
)
{
case
RegionDataRect
:
break
;
case
RegionDataPath
:
GdipDeletePath
(
element
->
elementdata
.
pathdata
.
path
);
break
;
case
RegionDataEmptyRect
:
case
RegionDataInfiniteRect
:
break
;
default:
delete_element
(
element
->
elementdata
.
combine
.
left
);
delete_element
(
element
->
elementdata
.
combine
.
right
);
GdipFree
(
element
->
elementdata
.
combine
.
left
);
GdipFree
(
element
->
elementdata
.
combine
.
right
);
break
;
}
}
GpStatus
WINGDIPAPI
GdipCloneRegion
(
GpRegion
*
region
,
GpRegion
**
clone
)
{
FIXME
(
"(%p %p): stub
\n
"
,
region
,
clone
);
...
...
@@ -212,8 +233,15 @@ GpStatus WINGDIPAPI GdipCreateRegionHrgn(HRGN hrgn, GpRegion **region)
GpStatus
WINGDIPAPI
GdipDeleteRegion
(
GpRegion
*
region
)
{
FIXME
(
"(%p): stub
\n
"
,
region
);
return
NotImplemented
;
TRACE
(
"%p
\n
"
,
region
);
if
(
!
region
)
return
InvalidParameter
;
delete_element
(
&
region
->
node
);
GdipFree
(
region
);
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipGetRegionBounds
(
GpRegion
*
region
,
GpGraphics
*
graphics
,
GpRectF
*
rect
)
...
...
dlls/gdiplus/tests/region.c
View file @
8a9438d5
...
...
@@ -108,6 +108,7 @@ todo_wine
expect_magic
((
DWORD
*
)(
buf
+
2
));
expect_dword
(
buf
+
3
,
0
);
expect_dword
(
buf
+
4
,
RGNDATA_INFINITE_RECT
);
}
status
=
GdipDeleteRegion
(
region
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
...
...
@@ -116,6 +117,8 @@ todo_wine
rect
.
Y
=
20
;
rect
.
Width
=
100
;
rect
.
Height
=
200
;
todo_wine
{
status
=
GdipCreateRegionRectI
(
&
rect
,
&
region
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
status
=
GdipGetRegionDataSize
(
region
,
&
needed
);
...
...
@@ -216,7 +219,6 @@ todo_wine
expect_float
(
buf
+
37
,
22
.
0
);
expect_float
(
buf
+
38
,
55
.
0
);
status
=
GdipDeleteRegion
(
region2
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
status
=
GdipDeleteRegion
(
region
);
...
...
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