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
314ec717
Commit
314ec717
authored
Mar 18, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Select the font into the appropriate hdc in GdipMeasureString.
parent
a48ed336
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
graphics.c
dlls/gdiplus/graphics.c
+7
-5
No files found.
dlls/gdiplus/graphics.c
View file @
314ec717
...
...
@@ -4427,7 +4427,7 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics,
{
HFONT
oldfont
;
struct
measure_string_args
args
;
HDC
temp_hdc
=
NULL
;
HDC
temp_hdc
=
NULL
,
hdc
;
TRACE
(
"(%p, %s, %i, %p, %s, %p, %p, %p, %p)
\n
"
,
graphics
,
debugstr_wn
(
string
,
length
),
length
,
font
,
debugstr_rectf
(
rect
),
format
,
...
...
@@ -4438,9 +4438,11 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics,
if
(
!
graphics
->
hdc
)
{
temp_hdc
=
CreateCompatibleDC
(
0
);
hdc
=
temp_hdc
=
CreateCompatibleDC
(
0
);
if
(
!
temp_hdc
)
return
OutOfMemory
;
}
else
hdc
=
graphics
->
hdc
;
if
(
linesfilled
)
*
linesfilled
=
0
;
if
(
codepointsfitted
)
*
codepointsfitted
=
0
;
...
...
@@ -4448,7 +4450,7 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics,
if
(
format
)
TRACE
(
"may be ignoring some format flags: attr %x
\n
"
,
format
->
attr
);
oldfont
=
SelectObject
(
graphics
->
hdc
,
CreateFontIndirectW
(
&
font
->
lfw
));
oldfont
=
SelectObject
(
hdc
,
CreateFontIndirectW
(
&
font
->
lfw
));
bounds
->
X
=
rect
->
X
;
bounds
->
Y
=
rect
->
Y
;
...
...
@@ -4459,10 +4461,10 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics,
args
.
codepointsfitted
=
codepointsfitted
;
args
.
linesfilled
=
linesfilled
;
gdip_format_string
(
graphics
->
hdc
?
graphics
->
hdc
:
temp_
hdc
,
string
,
length
,
font
,
rect
,
format
,
gdip_format_string
(
hdc
,
string
,
length
,
font
,
rect
,
format
,
measure_string_callback
,
&
args
);
DeleteObject
(
SelectObject
(
graphics
->
hdc
,
oldfont
));
DeleteObject
(
SelectObject
(
hdc
,
oldfont
));
if
(
temp_hdc
)
DeleteDC
(
temp_hdc
);
...
...
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