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
2a75800c
Commit
2a75800c
authored
Sep 21, 2005
by
Huw Davies
Committed by
Alexandre Julliard
Sep 21, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Release the dc before drawing the underline and strikeout lines.
parent
12b2cf4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
font.c
dlls/gdi/font.c
+18
-18
No files found.
dlls/gdi/font.c
View file @
2a75800c
...
...
@@ -1748,7 +1748,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
SIZE
sz
;
RECT
rc
;
BOOL
done_extents
=
FALSE
;
INT
width
,
xwidth
,
ywidth
;
INT
width
,
xwidth
=
0
,
ywidth
=
0
;
DWORD
type
;
DC
*
dc
=
DC_GetDCUpdate
(
hdc
);
...
...
@@ -2042,14 +2042,23 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
glyphs
?
glyphs
:
reordered_str
,
count
,
deltas
);
}
if
(
lf
.
lfUnderline
||
lf
.
lfStrikeOut
)
done:
HeapFree
(
GetProcessHeap
(),
0
,
deltas
);
if
(
glyphs
!=
reordered_str
)
HeapFree
(
GetProcessHeap
(),
0
,
glyphs
);
if
(
reordered_str
!=
str
)
HeapFree
(
GetProcessHeap
(),
0
,
reordered_str
);
GDI_ReleaseObj
(
hdc
);
if
(
ret
&&
(
lf
.
lfUnderline
||
lf
.
lfStrikeOut
))
{
int
underlinePos
,
strikeoutPos
;
int
underlineWidth
,
strikeoutWidth
;
UINT
nMetricsS
ize
=
GetOutlineTextMetricsW
(
hdc
,
0
,
NULL
);
UINT
s
ize
=
GetOutlineTextMetricsW
(
hdc
,
0
,
NULL
);
OUTLINETEXTMETRICW
*
otm
=
NULL
;
if
(
!
nMetricsS
ize
)
if
(
!
s
ize
)
{
TEXTMETRICW
tm
;
GetTextMetricsW
(
hdc
,
&
tm
);
...
...
@@ -2060,20 +2069,19 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
}
else
{
otm
=
HeapAlloc
(
GetProcessHeap
(),
0
,
nMetricsSize
);
if
(
!
otm
)
goto
done
;
GetOutlineTextMetricsW
(
hdc
,
nMetricsSize
,
otm
);
otm
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
GetOutlineTextMetricsW
(
hdc
,
size
,
otm
);
underlinePos
=
otm
->
otmsUnderscorePosition
;
underlineWidth
=
otm
->
otmsUnderscoreSize
;
strikeoutPos
=
otm
->
otmsStrikeoutPosition
;
strikeoutWidth
=
otm
->
otmsStrikeoutSize
;
HeapFree
(
GetProcessHeap
(),
0
,
otm
);
}
if
(
lf
.
lfUnderline
)
{
POINT
pts
[
2
],
oldpt
;
HPEN
hpen
=
CreatePen
(
PS_SOLID
,
underlineWidth
,
dc
->
textColor
);
HPEN
hpen
=
CreatePen
(
PS_SOLID
,
underlineWidth
,
GetTextColor
(
hdc
)
);
hpen
=
SelectObject
(
hdc
,
hpen
);
pts
[
0
].
x
=
x
;
pts
[
0
].
y
=
y
;
...
...
@@ -2089,7 +2097,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
if
(
lf
.
lfStrikeOut
)
{
POINT
pts
[
2
],
oldpt
;
HPEN
hpen
=
CreatePen
(
PS_SOLID
,
strikeoutWidth
,
dc
->
textColor
);
HPEN
hpen
=
CreatePen
(
PS_SOLID
,
strikeoutWidth
,
GetTextColor
(
hdc
)
);
hpen
=
SelectObject
(
hdc
,
hpen
);
pts
[
0
].
x
=
x
;
pts
[
0
].
y
=
y
;
...
...
@@ -2103,14 +2111,6 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
}
}
done:
HeapFree
(
GetProcessHeap
(),
0
,
deltas
);
if
(
glyphs
!=
reordered_str
)
HeapFree
(
GetProcessHeap
(),
0
,
glyphs
);
if
(
reordered_str
!=
str
)
HeapFree
(
GetProcessHeap
(),
0
,
reordered_str
);
GDI_ReleaseObj
(
hdc
);
return
ret
;
}
...
...
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