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
4e2959ab
Commit
4e2959ab
authored
Aug 24, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Aug 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Make GdipMeasureCharacterRanges use common font transformation code.
parent
7a1ccd8a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
graphics.c
dlls/gdiplus/graphics.c
+5
-5
graphics.c
dlls/gdiplus/tests/graphics.c
+5
-1
No files found.
dlls/gdiplus/graphics.c
View file @
4e2959ab
...
...
@@ -4927,8 +4927,7 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics,
{
GpStatus
stat
;
int
i
;
LOGFONTW
lfw
;
HFONT
oldfont
;
HFONT
gdifont
,
oldfont
;
struct
measure_ranges_args
args
;
HDC
hdc
,
temp_hdc
=
NULL
;
GpPointF
pt
[
3
];
...
...
@@ -4971,8 +4970,8 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics,
scaled_rect
.
Width
=
layoutRect
->
Width
*
args
.
rel_width
;
scaled_rect
.
Height
=
layoutRect
->
Height
*
args
.
rel_height
;
get_
log_fontW
(
font
,
graphics
,
&
lfw
);
oldfont
=
SelectObject
(
hdc
,
CreateFontIndirectW
(
&
lfw
)
);
get_
font_hfont
(
graphics
,
font
,
&
gdifont
);
oldfont
=
SelectObject
(
hdc
,
gdifont
);
for
(
i
=
0
;
i
<
stringFormat
->
range_count
;
i
++
)
{
...
...
@@ -4986,7 +4985,8 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics,
stat
=
gdip_format_string
(
hdc
,
string
,
length
,
font
,
&
scaled_rect
,
stringFormat
,
measure_ranges_callback
,
&
args
);
DeleteObject
(
SelectObject
(
hdc
,
oldfont
));
SelectObject
(
hdc
,
oldfont
);
DeleteObject
(
gdifont
);
if
(
temp_hdc
)
DeleteDC
(
temp_hdc
);
...
...
dlls/gdiplus/tests/graphics.c
View file @
4e2959ab
...
...
@@ -3828,9 +3828,13 @@ static void test_font_height_scaling(void)
win_skip
(
"GdipMeasureCharacterRanges ignores units before Win7
\n
"
);
continue
;
}
/* FIXME: Wine uses integer gdi32 regions and rounding breaks things */
if
(
height
<
1
.
0
)
expectf_
(
height
,
rect
.
Height
,
height
/
15
.
0
);
else
todo_wine
expectf_
(
bounds
.
Width
,
rect
.
Width
+
margin
*
2
.
0
,
bounds
.
Width
/
25
.
0
);
expectf_
(
height
,
rect
.
Height
,
height
/
15
.
0
);
expectf_
(
bounds
.
Width
,
rect
.
Width
+
margin
*
2
.
0
,
bounds
.
Width
/
15
.
0
);
}
}
...
...
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