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
c2680edc
Commit
c2680edc
authored
Dec 29, 2006
by
Jeff Latimer
Committed by
Alexandre Julliard
Jan 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Implement ScriptStringOut.
parent
794dbe4f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
8 deletions
+77
-8
usp10.c
dlls/usp10/tests/usp10.c
+1
-1
usp10.c
dlls/usp10/usp10.c
+76
-7
No files found.
dlls/usp10/tests/usp10.c
View file @
c2680edc
...
...
@@ -672,7 +672,7 @@ static void test_ScriptString(HDC hdc)
if
(
hr
==
0
)
{
hr
=
ScriptStringOut
(
ssa
,
X
,
Y
,
Options
,
&
rc
,
MinSel
,
MaxSel
,
Disabled
);
todo_wine
ok
(
hr
==
S_OK
,
"ScriptStringOut should return S_OK not %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ScriptStringOut should return S_OK not %08x
\n
"
,
hr
);
hr
=
ScriptStringFree
(
&
ssa
);
ok
(
hr
==
S_OK
,
"ScriptStringFree should return S_OK not %08x
\n
"
,
hr
);
}
...
...
dlls/usp10/usp10.c
View file @
c2680edc
...
...
@@ -582,23 +582,92 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc,
/***********************************************************************
* ScriptStringOut (USP10.@)
*
* This function takes the output of ScriptStringAnalyse and joins the segments
* of glyphs and passes the resulting string to ScriptTextOut. ScriptStringOut
* only processes glyphs.
*
* Parameters:
* ssa [I] buffer to hold the analysed string components
* iX [I] X axis displacement for output
* iY [I] Y axis displacement for output
* uOptions [I] flags controling output processing
* prc [I] rectangle coordinates
* iMinSel [I] starting pos for substringing output string
* iMaxSel [I] ending pos for substringing output string
* fDisabled [I] controls text highlighting
*
* RETURNS
* Success: S_OK
* Failure: is the value returned by ScriptTextOut
*/
HRESULT
WINAPI
ScriptStringOut
(
SCRIPT_STRING_ANALYSIS
ssa
,
int
iX
,
HRESULT
WINAPI
ScriptStringOut
(
SCRIPT_STRING_ANALYSIS
ssa
,
int
iX
,
int
iY
,
UINT
uOptions
,
const
RECT
*
prc
,
int
iMinSel
,
int
iMaxSel
,
int
iMaxSel
,
BOOL
fDisabled
)
{
FIXME
(
"(%p,%d,%d,0x%1x,%p,%d,%d,%d): stub
\n
"
,
StringAnalysis
*
analysis
;
WORD
*
glyphs
;
int
item
,
cnt
,
x
;
HRESULT
hr
;
SCRIPT_CACHE
sc
=
0
;
TRACE
(
"(%p,%d,%d,0x%1x,%p,%d,%d,%d)
\n
"
,
ssa
,
iX
,
iY
,
uOptions
,
prc
,
iMinSel
,
iMaxSel
,
fDisabled
);
if
(
!
ssa
)
{
return
E_INVALIDARG
;
analysis
=
ssa
;
/* map ptr to string_analysis struct */
/*
* Get storage for the output buffer for the consolidated strings
*/
cnt
=
0
;
for
(
item
=
0
;
item
<
analysis
->
numItems
;
item
++
)
{
cnt
+=
analysis
->
glyphs
[
item
].
numGlyphs
;
}
glyphs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
cnt
);
/*
* ScriptStringOut only processes glyphs hence set ETO_GLYPH_INDEX
*/
uOptions
|=
ETO_GLYPH_INDEX
;
analysis
->
pItem
[
0
].
a
.
fNoGlyphIndex
=
FALSE
;
/* say that we have glyphs */
/*
* Copy the string items into the output buffer
*/
TRACE
(
"numItems %d
\n
"
,
analysis
->
numItems
);
cnt
=
0
;
for
(
item
=
0
;
item
<
analysis
->
numItems
;
item
++
)
{
memcpy
(
&
glyphs
[
cnt
],
analysis
->
glyphs
[
item
].
glyphs
,
sizeof
(
WCHAR
)
*
analysis
->
glyphs
[
item
].
numGlyphs
);
TRACE
(
"Item %d, Glyphs %d "
,
item
,
analysis
->
glyphs
[
item
].
numGlyphs
);
for
(
x
=
cnt
;
x
<
analysis
->
glyphs
[
item
].
numGlyphs
+
cnt
;
x
++
)
TRACE
(
"%04x"
,
glyphs
[
x
]);
TRACE
(
"
\n
"
);
cnt
+=
analysis
->
glyphs
[
item
].
numGlyphs
;
/* point to the end of the copied text */
}
hr
=
ScriptTextOut
(
analysis
->
hdc
,
&
sc
,
iX
,
iY
,
uOptions
,
prc
,
&
analysis
->
pItem
->
a
,
NULL
,
0
,
glyphs
,
cnt
,
analysis
->
glyphs
->
piAdvance
,
NULL
,
analysis
->
glyphs
->
pGoffset
);
TRACE
(
"ScriptTextOut hr=%08x
\n
"
,
hr
);
/*
* Free the output buffer and script cache
*/
HeapFree
(
GetProcessHeap
(),
0
,
glyphs
);
ScriptFreeCache
(
&
sc
);
return
E_NOTIMPL
;
return
hr
;
}
/***********************************************************************
...
...
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