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
1202e9af
Commit
1202e9af
authored
Oct 30, 2013
by
Vincent Povirk
Committed by
Alexandre Julliard
Nov 18, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Allow excluding from infinite regions.
parent
c20167db
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
4 deletions
+55
-4
region.c
dlls/gdiplus/region.c
+4
-4
region.c
dlls/gdiplus/tests/region.c
+51
-0
No files found.
dlls/gdiplus/region.c
View file @
1202e9af
...
...
@@ -988,8 +988,8 @@ static GpStatus get_region_hrgn(struct region_element *element, GpGraphics *grap
case
CombineModeIntersect
:
return
get_region_hrgn
(
element
->
elementdata
.
combine
.
right
,
graphics
,
hrgn
);
case
CombineModeXor
:
case
CombineModeExclude
:
FIXME
(
"cannot exclude from an infinite region
\n
"
);
/* fall-through */
left
=
CreateRectRgn
(
-
4194304
,
-
4194304
,
4194304
,
4194304
);
break
;
case
CombineModeUnion
:
case
CombineModeComplement
:
*
hrgn
=
NULL
;
return
Ok
;
...
...
@@ -1013,8 +1013,8 @@ static GpStatus get_region_hrgn(struct region_element *element, GpGraphics *grap
*
hrgn
=
left
;
return
Ok
;
case
CombineModeXor
:
case
CombineModeComplement
:
FIXME
(
"cannot exclude from an infinite region
\n
"
);
/* fall-through */
right
=
CreateRectRgn
(
-
4194304
,
-
4194304
,
4194304
,
4194304
);
break
;
case
CombineModeUnion
:
case
CombineModeExclude
:
DeleteObject
(
left
);
*
hrgn
=
NULL
;
...
...
dlls/gdiplus/tests/region.c
View file @
1202e9af
...
...
@@ -2082,6 +2082,56 @@ static void test_isvisiblerect(void)
ReleaseDC
(
0
,
hdc
);
}
static
void
test_excludeinfinite
(
void
)
{
GpStatus
status
;
GpRegion
*
region
;
UINT
count
=
0xdeadbeef
;
GpRectF
scans
[
4
];
GpMatrix
*
identity
;
static
const
RectF
rect_exclude
=
{
0
.
0
,
0
.
0
,
1
.
0
,
1
.
0
};
status
=
GdipCreateMatrix
(
&
identity
);
expect
(
Ok
,
status
);
status
=
GdipCreateRegion
(
&
region
);
expect
(
Ok
,
status
);
status
=
GdipCombineRegionRect
(
region
,
&
rect_exclude
,
CombineModeExclude
);
expect
(
Ok
,
status
);
status
=
GdipGetRegionScansCount
(
region
,
&
count
,
identity
);
expect
(
Ok
,
status
);
expect
(
4
,
count
);
count
=
4
;
status
=
GdipGetRegionScans
(
region
,
scans
,
(
INT
*
)
&
count
,
identity
);
expect
(
Ok
,
status
);
expectf
(
-
4194304
.
0
,
scans
[
0
].
X
);
expectf
(
-
4194304
.
0
,
scans
[
0
].
Y
);
expectf
(
8388608
.
0
,
scans
[
0
].
Width
);
expectf
(
4194304
.
0
,
scans
[
0
].
Height
);
expectf
(
-
4194304
.
0
,
scans
[
1
].
X
);
expectf
(
0
.
0
,
scans
[
1
].
Y
);
expectf
(
4194304
.
0
,
scans
[
1
].
Width
);
expectf
(
1
.
0
,
scans
[
1
].
Height
);
expectf
(
1
.
0
,
scans
[
2
].
X
);
expectf
(
0
.
0
,
scans
[
2
].
Y
);
expectf
(
4194303
.
0
,
scans
[
2
].
Width
);
expectf
(
1
.
0
,
scans
[
2
].
Height
);
expectf
(
-
4194304
.
0
,
scans
[
3
].
X
);
expectf
(
1
.
0
,
scans
[
3
].
Y
);
expectf
(
8388608
.
0
,
scans
[
3
].
Width
);
expectf
(
4194303
.
0
,
scans
[
3
].
Height
);
GdipDeleteRegion
(
region
);
GdipDeleteMatrix
(
identity
);
}
START_TEST
(
region
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -2107,6 +2157,7 @@ START_TEST(region)
test_getbounds
();
test_isvisiblepoint
();
test_isvisiblerect
();
test_excludeinfinite
();
GdiplusShutdown
(
gdiplusToken
);
}
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