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
5e77c74f
Commit
5e77c74f
authored
Nov 24, 2008
by
Vincent Povirk
Committed by
Alexandre Julliard
Nov 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipGetRegionHRgn for rects.
parent
08aa0cac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
region.c
dlls/gdiplus/region.c
+18
-0
region.c
dlls/gdiplus/tests/region.c
+13
-0
No files found.
dlls/gdiplus/region.c
View file @
5e77c74f
...
...
@@ -823,6 +823,24 @@ static GpStatus get_region_hrgn(struct region_element *element, GpGraphics *grap
return
*
hrgn
?
Ok
:
OutOfMemory
;
case
RegionDataPath
:
return
get_path_hrgn
(
element
->
elementdata
.
pathdata
.
path
,
graphics
,
hrgn
);
case
RegionDataRect
:
{
GpPath
*
path
;
GpStatus
stat
;
GpRectF
*
rc
=
&
element
->
elementdata
.
rect
;
stat
=
GdipCreatePath
(
FillModeAlternate
,
&
path
);
if
(
stat
!=
Ok
)
return
stat
;
stat
=
GdipAddPathRectangle
(
path
,
rc
->
X
,
rc
->
Y
,
rc
->
Width
,
rc
->
Height
);
if
(
stat
==
Ok
)
stat
=
get_path_hrgn
(
path
,
graphics
,
hrgn
);
GdipDeletePath
(
path
);
return
stat
;
}
default:
FIXME
(
"GdipGetRegionHRgn unimplemented for region type=%x
\n
"
,
element
->
type
);
*
hrgn
=
NULL
;
...
...
dlls/gdiplus/tests/region.c
View file @
5e77c74f
...
...
@@ -804,6 +804,7 @@ static void test_gethrgn(void)
HDC
hdc
=
GetDC
(
0
);
static
const
RECT
empty_rect
=
{
0
,
0
,
0
,
0
};
static
const
RECT
test_rect
=
{
10
,
11
,
20
,
21
};
static
const
GpRectF
test_rectF
=
{
10
.
0
,
11
.
0
,
10
.
0
,
10
.
0
};
static
const
RECT
scaled_rect
=
{
20
,
22
,
40
,
42
};
status
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
...
...
@@ -854,6 +855,18 @@ static void test_gethrgn(void)
verify_region
(
hrgn
,
&
scaled_rect
);
DeleteObject
(
hrgn
);
status
=
GdipCombineRegionRect
(
region2
,
&
test_rectF
,
CombineModeReplace
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
status
=
GdipGetRegionHRgn
(
region2
,
NULL
,
&
hrgn
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
verify_region
(
hrgn
,
&
test_rect
);
DeleteObject
(
hrgn
);
status
=
GdipGetRegionHRgn
(
region2
,
graphics
,
&
hrgn
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
verify_region
(
hrgn
,
&
scaled_rect
);
DeleteObject
(
hrgn
);
status
=
GdipDeletePath
(
path
);
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