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
bc7df7ad
Commit
bc7df7ad
authored
Oct 22, 2006
by
Eric Pouech
Committed by
Alexandre Julliard
Oct 24, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Better error handling in enhanced metafile.
parent
54ac76a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
graphics.c
dlls/gdi32/enhmfdrv/graphics.c
+9
-7
No files found.
dlls/gdi32/enhmfdrv/graphics.c
View file @
bc7df7ad
...
...
@@ -756,18 +756,19 @@ BOOL EMFDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
for
(
i
=
0
;
i
<
count
;
i
++
)
{
textWidth
+=
lpDx
[
i
];
}
GetTextExtentPoint32W
(
physDev
->
hdc
,
str
,
count
,
&
strSize
);
textHeight
=
strSize
.
cy
;
if
(
GetTextExtentPoint32W
(
physDev
->
hdc
,
str
,
count
,
&
strSize
))
textHeight
=
strSize
.
cy
;
}
else
{
UINT
i
;
INT
*
dx
=
(
INT
*
)((
char
*
)
pemr
+
pemr
->
emrtext
.
offDx
);
SIZE
charSize
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
GetTextExtentPoint32W
(
physDev
->
hdc
,
str
+
i
,
1
,
&
charSize
);
dx
[
i
]
=
charSize
.
cx
;
textWidth
+=
charSize
.
cx
;
textHeight
=
max
(
textHeight
,
charSize
.
cy
);
if
(
GetTextExtentPoint32W
(
physDev
->
hdc
,
str
+
i
,
1
,
&
charSize
))
{
dx
[
i
]
=
charSize
.
cx
;
textWidth
+=
charSize
.
cx
;
textHeight
=
max
(
textHeight
,
charSize
.
cy
);
}
}
}
...
...
@@ -791,7 +792,8 @@ BOOL EMFDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
switch
(
textAlign
&
(
TA_TOP
|
TA_BOTTOM
|
TA_BASELINE
))
{
case
TA_BASELINE
:
{
TEXTMETRICW
tm
;
GetTextMetricsW
(
physDev
->
hdc
,
&
tm
);
if
(
!
GetTextMetricsW
(
physDev
->
hdc
,
&
tm
))
tm
.
tmDescent
=
0
;
/* Play safe here... it's better to have a bounding box */
/* that is too big than too small. */
pemr
->
rclBounds
.
top
=
y
-
textHeight
-
1
;
...
...
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