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
1418cd79
Commit
1418cd79
authored
Aug 22, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Aug 22, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: GdipMeasureCharacterRanges shouldn't treat empty layout rectangle as infinite bounds.
parent
32d37c83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
graphics.c
dlls/gdiplus/graphics.c
+6
-3
graphics.c
dlls/gdiplus/tests/graphics.c
+0
-3
No files found.
dlls/gdiplus/graphics.c
View file @
1418cd79
...
...
@@ -4731,9 +4731,6 @@ GpStatus gdip_format_string(HDC hdc,
nwidth
=
rect
->
Width
;
nheight
=
rect
->
Height
;
if
(
rect
->
Width
>=
INT_MAX
||
rect
->
Width
<
0
.
5
)
nwidth
=
INT_MAX
;
if
(
rect
->
Height
>=
INT_MAX
||
rect
->
Height
<
0
.
5
)
nheight
=
INT_MAX
;
if
(
format
)
hkprefix
=
format
->
hkprefix
;
else
...
...
@@ -5064,6 +5061,9 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics,
scaled_rect
.
Width
=
rect
->
Width
*
args
.
rel_width
;
scaled_rect
.
Height
=
rect
->
Height
*
args
.
rel_height
;
if
(
scaled_rect
.
Width
>=
INT_MAX
||
scaled_rect
.
Width
<
0
.
5
)
scaled_rect
.
Width
=
(
REAL
)(
1
<<
23
);
if
(
scaled_rect
.
Height
>=
INT_MAX
||
scaled_rect
.
Height
<
0
.
5
)
scaled_rect
.
Height
=
(
REAL
)(
1
<<
23
);
bounds
->
X
=
rect
->
X
;
bounds
->
Y
=
rect
->
Y
;
bounds
->
Width
=
0
.
0
;
...
...
@@ -5214,6 +5214,9 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
scaled_rect
.
Width
=
rel_width
*
rect
->
Width
;
scaled_rect
.
Height
=
rel_height
*
rect
->
Height
;
if
(
scaled_rect
.
Width
>=
INT_MAX
||
scaled_rect
.
Width
<
0
.
5
)
scaled_rect
.
Width
=
(
REAL
)(
1
<<
23
);
if
(
scaled_rect
.
Height
>=
INT_MAX
||
scaled_rect
.
Height
<
0
.
5
)
scaled_rect
.
Height
=
(
REAL
)(
1
<<
23
);
if
(
gdip_round
(
scaled_rect
.
Width
)
!=
0
&&
gdip_round
(
scaled_rect
.
Height
)
!=
0
)
{
/* FIXME: If only the width or only the height is 0, we should probably still clip */
...
...
dlls/gdiplus/tests/graphics.c
View file @
1418cd79
...
...
@@ -3140,11 +3140,8 @@ static void test_string_functions(void)
expect
(
Ok
,
status
);
}
todo_wine
ok
(
region_isempty
[
0
],
"region should be empty
\n
"
);
todo_wine
ok
(
region_isempty
[
1
],
"region should be empty
\n
"
);
todo_wine
ok
(
region_isempty
[
2
],
"region should be empty
\n
"
);
ok
(
region_isempty
[
3
],
"region should be empty
\n
"
);
...
...
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