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
8a0b57a9
Commit
8a0b57a9
authored
Mar 21, 2012
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Draw hotkey underlines in GdipDrawString.
parent
eef45996
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
4 deletions
+31
-4
graphics.c
dlls/gdiplus/graphics.c
+31
-4
No files found.
dlls/gdiplus/graphics.c
View file @
8a0b57a9
...
...
@@ -5038,16 +5038,43 @@ static GpStatus draw_string_callback(HDC hdc,
{
struct
draw_string_args
*
args
=
user_data
;
PointF
position
;
if
(
underlined_index_count
)
FIXME
(
"hotkey underlines not drawn yet
\n
"
);
GpStatus
stat
;
position
.
X
=
args
->
x
+
bounds
->
X
/
args
->
rel_width
;
position
.
Y
=
args
->
y
+
bounds
->
Y
/
args
->
rel_height
+
args
->
ascent
;
return
GdipDrawDriverString
(
args
->
graphics
,
&
string
[
index
],
length
,
font
,
stat
=
GdipDrawDriverString
(
args
->
graphics
,
&
string
[
index
],
length
,
font
,
args
->
brush
,
&
position
,
DriverStringOptionsCmapLookup
|
DriverStringOptionsRealizedAdvance
,
NULL
);
if
(
stat
==
Ok
&&
underlined_index_count
)
{
OUTLINETEXTMETRICW
otm
;
REAL
underline_y
,
underline_height
;
int
i
;
GetOutlineTextMetricsW
(
hdc
,
sizeof
(
otm
),
&
otm
);
underline_height
=
otm
.
otmsUnderscoreSize
/
args
->
rel_height
;
underline_y
=
position
.
Y
-
otm
.
otmsUnderscorePosition
/
args
->
rel_height
-
underline_height
/
2
;
for
(
i
=
0
;
i
<
underlined_index_count
;
i
++
)
{
REAL
start_x
,
end_x
;
SIZE
text_size
;
INT
ofs
=
underlined_indexes
[
i
]
-
index
;
GetTextExtentExPointW
(
hdc
,
string
+
index
,
ofs
,
INT_MAX
,
NULL
,
NULL
,
&
text_size
);
start_x
=
text_size
.
cx
/
args
->
rel_width
;
GetTextExtentExPointW
(
hdc
,
string
+
index
,
ofs
+
1
,
INT_MAX
,
NULL
,
NULL
,
&
text_size
);
end_x
=
text_size
.
cx
/
args
->
rel_width
;
GdipFillRectangle
(
args
->
graphics
,
(
GpBrush
*
)
args
->
brush
,
position
.
X
+
start_x
,
underline_y
,
end_x
-
start_x
,
underline_height
);
}
}
return
stat
;
}
GpStatus
WINGDIPAPI
GdipDrawString
(
GpGraphics
*
graphics
,
GDIPCONST
WCHAR
*
string
,
...
...
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