Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
49dc1570
Commit
49dc1570
authored
Aug 29, 2011
by
Aric Stewart
Committed by
Alexandre Julliard
Aug 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Draw selected glyphs in ScriptStringOut.
parent
f1796a94
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
4 deletions
+42
-4
Makefile.in
dlls/usp10/Makefile.in
+1
-1
usp10.c
dlls/usp10/usp10.c
+41
-3
No files found.
dlls/usp10/Makefile.in
View file @
49dc1570
MODULE
=
usp10.dll
IMPORTLIB
=
usp10
IMPORTS
=
gdi32
IMPORTS
=
user32
gdi32
C_SRCS
=
\
bidi.c
\
...
...
dlls/usp10/usp10.c
View file @
49dc1570
...
...
@@ -1029,16 +1029,20 @@ static HRESULT SS_ItemOut( SCRIPT_STRING_ANALYSIS ssa,
int
cEnd
,
UINT
uOptions
,
const
RECT
*
prc
,
BOOL
fSelected
,
BOOL
fDisabled
)
{
StringAnalysis
*
analysis
;
int
off_x
=
0
;
HRESULT
hr
;
COLORREF
BkColor
=
0x0
;
COLORREF
TextColor
=
0x0
;
INT
BkMode
=
0
;
INT
runStart
,
runEnd
;
INT
iGlyph
,
cGlyphs
;
TRACE
(
"(%p,%d,%d,%d,%d,%d, 0x%1x, %d)
\n
"
,
ssa
,
iX
,
iY
,
iItem
,
cStart
,
cEnd
,
uOptions
,
fDisabled
);
TRACE
(
"(%p,%d,%d,%d,%d,%d, 0x%1x, %d
, %d
)
\n
"
,
ssa
,
iX
,
iY
,
iItem
,
cStart
,
cEnd
,
uOptions
,
f
Selected
,
f
Disabled
);
if
(
!
(
analysis
=
ssa
))
return
E_INVALIDARG
;
...
...
@@ -1049,6 +1053,20 @@ static HRESULT SS_ItemOut( SCRIPT_STRING_ANALYSIS ssa,
uOptions
|=
ETO_GLYPH_INDEX
;
analysis
->
pItem
[
0
].
a
.
fNoGlyphIndex
=
FALSE
;
/* say that we have glyphs */
if
(
fSelected
)
{
BkMode
=
GetBkMode
(
analysis
->
hdc
);
SetBkMode
(
analysis
->
hdc
,
OPAQUE
);
BkColor
=
GetBkColor
(
analysis
->
hdc
);
SetBkColor
(
analysis
->
hdc
,
GetSysColor
(
COLOR_HIGHLIGHT
));
if
(
!
fDisabled
)
{
TextColor
=
GetTextColor
(
analysis
->
hdc
);
SetTextColor
(
analysis
->
hdc
,
GetSysColor
(
COLOR_HIGHLIGHTTEXT
));
}
}
if
(
cStart
>=
0
&&
analysis
->
pItem
[
iItem
+
1
].
iCharPos
>
cStart
&&
analysis
->
pItem
[
iItem
].
iCharPos
<=
cStart
)
runStart
=
cStart
-
analysis
->
pItem
[
iItem
].
iCharPos
;
else
...
...
@@ -1093,6 +1111,14 @@ static HRESULT SS_ItemOut( SCRIPT_STRING_ANALYSIS ssa,
TRACE
(
"ScriptTextOut hr=%08x
\n
"
,
hr
);
if
(
fSelected
)
{
SetBkColor
(
analysis
->
hdc
,
BkColor
);
SetBkMode
(
analysis
->
hdc
,
BkMode
);
if
(
!
fDisabled
)
SetTextColor
(
analysis
->
hdc
,
TextColor
);
}
return
hr
;
}
...
...
@@ -1137,11 +1163,23 @@ HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS ssa,
for
(
item
=
0
;
item
<
analysis
->
numItems
;
item
++
)
{
hr
=
SS_ItemOut
(
ssa
,
iX
,
iY
,
analysis
->
logical2visual
[
item
],
-
1
,
-
1
,
uOptions
,
prc
,
fDisabled
);
hr
=
SS_ItemOut
(
ssa
,
iX
,
iY
,
analysis
->
logical2visual
[
item
],
-
1
,
-
1
,
uOptions
,
prc
,
FALSE
,
fDisabled
);
if
(
FAILED
(
hr
))
return
hr
;
}
if
(
iMinSel
<
iMaxSel
&&
(
iMinSel
>
0
||
iMaxSel
>
0
))
{
if
(
iMaxSel
>
0
&&
iMinSel
<
0
)
iMinSel
=
0
;
for
(
item
=
0
;
item
<
analysis
->
numItems
;
item
++
)
{
hr
=
SS_ItemOut
(
ssa
,
iX
,
iY
,
analysis
->
logical2visual
[
item
],
iMinSel
,
iMaxSel
,
uOptions
,
prc
,
TRUE
,
fDisabled
);
if
(
FAILED
(
hr
))
return
hr
;
}
}
return
S_OK
;
}
...
...
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