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
21109a40
Commit
21109a40
authored
Mar 30, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 31, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Fix the linesfilled calculation in GdipMeasureString.
parent
2cde94a8
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
+1
-1
graphics.c
dlls/gdiplus/tests/graphics.c
+5
-5
No files found.
dlls/gdiplus/graphics.c
View file @
21109a40
...
...
@@ -3516,7 +3516,7 @@ static GpStatus measure_string_callback(GpGraphics *graphics,
*
args
->
codepointsfitted
=
index
+
length
;
if
(
args
->
linesfilled
)
*
args
->
linesfilled
+=
bounds
->
Height
;
(
*
args
->
linesfilled
)
++
;
return
Ok
;
}
...
...
dlls/gdiplus/tests/graphics.c
View file @
21109a40
...
...
@@ -2490,7 +2490,7 @@ static void test_string_functions(void)
ok
(
char_bounds
.
Width
>
0
,
"got %0.2f
\n
"
,
bounds
.
Width
);
ok
(
char_bounds
.
Height
>
0
,
"got %0.2f
\n
"
,
bounds
.
Height
);
expect
(
1
,
codepointsfitted
);
todo_wine
expect
(
1
,
linesfilled
);
expect
(
1
,
linesfilled
);
status
=
GdipMeasureString
(
graphics
,
teststring
,
2
,
font
,
&
rc
,
NULL
,
&
bounds
,
&
codepointsfitted
,
&
linesfilled
);
expect
(
Ok
,
status
);
...
...
@@ -2499,7 +2499,7 @@ static void test_string_functions(void)
ok
(
bounds
.
Width
>
char_bounds
.
Width
,
"got %0.2f, expected at least %0.2f
\n
"
,
bounds
.
Width
,
char_bounds
.
Width
);
expectf
(
char_bounds
.
Height
,
bounds
.
Height
);
expect
(
2
,
codepointsfitted
);
todo_wine
expect
(
1
,
linesfilled
);
expect
(
1
,
linesfilled
);
char_width
=
bounds
.
Width
-
char_bounds
.
Width
;
status
=
GdipMeasureString
(
graphics
,
teststring
,
6
,
font
,
&
rc
,
NULL
,
&
bounds
,
&
codepointsfitted
,
&
linesfilled
);
...
...
@@ -2509,7 +2509,7 @@ static void test_string_functions(void)
expectf_
(
char_bounds
.
Width
+
char_width
*
3
,
bounds
.
Width
,
0
.
01
);
ok
(
bounds
.
Height
>
char_bounds
.
Height
,
"got %0.2f, expected at least %0.2f
\n
"
,
bounds
.
Height
,
char_bounds
.
Height
);
expect
(
6
,
codepointsfitted
);
todo_wine
expect
(
2
,
linesfilled
);
expect
(
2
,
linesfilled
);
char_height
=
bounds
.
Height
-
char_bounds
.
Height
;
/* Cut off everything after the first space. */
...
...
@@ -2522,7 +2522,7 @@ static void test_string_functions(void)
expectf_
(
char_bounds
.
Width
+
char_width
,
bounds
.
Width
,
0
.
01
);
expectf_
(
char_bounds
.
Height
+
char_height
*
2
,
bounds
.
Height
,
0
.
01
);
expect
(
6
,
codepointsfitted
);
todo_wine
expect
(
3
,
linesfilled
);
expect
(
3
,
linesfilled
);
/* Cut off everything including the first space. */
rc
.
Width
=
char_bounds
.
Width
+
char_width
*
1
.
5
;
...
...
@@ -2534,7 +2534,7 @@ static void test_string_functions(void)
expectf_
(
char_bounds
.
Width
+
char_width
,
bounds
.
Width
,
0
.
01
);
expectf_
(
char_bounds
.
Height
+
char_height
*
2
,
bounds
.
Height
,
0
.
01
);
expect
(
6
,
codepointsfitted
);
todo_wine
expect
(
3
,
linesfilled
);
expect
(
3
,
linesfilled
);
/* Cut off everything after the first character. */
rc
.
Width
=
char_bounds
.
Width
+
char_width
*
0
.
5
;
...
...
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