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
092edd81
Commit
092edd81
authored
Dec 23, 2006
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 24, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Implement ScriptString_pSize.
parent
029d244e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
4 deletions
+52
-4
usp10.c
dlls/usp10/tests/usp10.c
+1
-1
usp10.c
dlls/usp10/usp10.c
+49
-1
usp10.spec
dlls/usp10/usp10.spec
+1
-1
usp10.h
include/usp10.h
+1
-1
No files found.
dlls/usp10/tests/usp10.c
View file @
092edd81
...
@@ -897,7 +897,7 @@ static void test_ScriptCacheGetHeight(HDC hdc)
...
@@ -897,7 +897,7 @@ static void test_ScriptCacheGetHeight(HDC hdc)
{
{
HRESULT
hr
;
HRESULT
hr
;
SCRIPT_CACHE
sc
=
NULL
;
SCRIPT_CACHE
sc
=
NULL
;
long
height
;
LONG
height
;
hr
=
ScriptCacheGetHeight
(
NULL
,
NULL
,
NULL
);
hr
=
ScriptCacheGetHeight
(
NULL
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got 0x%08x
\n
"
,
hr
);
...
...
dlls/usp10/usp10.c
View file @
092edd81
...
@@ -703,6 +703,7 @@ HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa)
...
@@ -703,6 +703,7 @@ HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa)
HeapFree
(
GetProcessHeap
(),
0
,
analysis
->
glyphs
);
HeapFree
(
GetProcessHeap
(),
0
,
analysis
->
glyphs
);
HeapFree
(
GetProcessHeap
(),
0
,
analysis
->
pItem
);
HeapFree
(
GetProcessHeap
(),
0
,
analysis
->
pItem
);
HeapFree
(
GetProcessHeap
(),
0
,
analysis
->
sz
);
HeapFree
(
GetProcessHeap
(),
0
,
analysis
);
HeapFree
(
GetProcessHeap
(),
0
,
analysis
);
if
(
invalid
)
if
(
invalid
)
...
@@ -1248,7 +1249,7 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN
...
@@ -1248,7 +1249,7 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN
* Success: S_OK
* Success: S_OK
* Failure: Non-zero HRESULT value.
* Failure: Non-zero HRESULT value.
*/
*/
HRESULT
WINAPI
ScriptCacheGetHeight
(
HDC
hdc
,
SCRIPT_CACHE
*
psc
,
long
*
height
)
HRESULT
WINAPI
ScriptCacheGetHeight
(
HDC
hdc
,
SCRIPT_CACHE
*
psc
,
LONG
*
height
)
{
{
HDC
phdc
;
HDC
phdc
;
Scriptcache
*
pScriptcache
;
Scriptcache
*
pScriptcache
;
...
@@ -1388,3 +1389,50 @@ HRESULT WINAPI ScriptStringValidate(SCRIPT_STRING_ANALYSIS ssa)
...
@@ -1388,3 +1389,50 @@ HRESULT WINAPI ScriptStringValidate(SCRIPT_STRING_ANALYSIS ssa)
FIXME
(
"(%p): stub
\n
"
,
ssa
);
FIXME
(
"(%p): stub
\n
"
,
ssa
);
return
S_OK
;
return
S_OK
;
}
}
/***********************************************************************
* ScriptString_pSize (USP10.@)
*
* Retrieve width and height of an analysed string.
*
* PARAMS
* ssa [I] string analysis.
*
* RETURNS
* Success: Pointer to a SIZE structure.
* Failure: NULL
*/
const
SIZE
*
WINAPI
ScriptString_pSize
(
SCRIPT_STRING_ANALYSIS
ssa
)
{
unsigned
int
i
,
j
;
StringAnalysis
*
analysis
=
ssa
;
TEXTMETRICW
metric
;
TRACE
(
"(%p)
\n
"
,
ssa
);
if
(
!
analysis
)
return
NULL
;
if
(
!
analysis
->
sz
)
{
if
(
!
(
analysis
->
sz
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
SIZE
))))
return
NULL
;
/* FIXME: These values should be calculated at a more
* appropriate place so that we can just pass cached
* values here.
*/
if
(
!
GetTextMetricsW
(
analysis
->
hdc
,
&
metric
))
{
HeapFree
(
GetProcessHeap
(),
0
,
analysis
->
sz
);
analysis
->
sz
=
NULL
;
return
NULL
;
}
analysis
->
sz
->
cy
=
metric
.
tmHeight
;
analysis
->
sz
->
cx
=
0
;
for
(
i
=
0
;
i
<
analysis
->
numItems
;
i
++
)
for
(
j
=
0
;
j
<
analysis
->
glyphs
[
i
].
numGlyphs
;
j
++
)
analysis
->
sz
->
cx
+=
analysis
->
glyphs
[
i
].
piAdvance
[
j
];
}
return
analysis
->
sz
;
}
dlls/usp10/usp10.spec
View file @
092edd81
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
@ stdcall ScriptStringValidate(ptr)
@ stdcall ScriptStringValidate(ptr)
@ stdcall ScriptStringXtoCP(ptr long ptr ptr)
@ stdcall ScriptStringXtoCP(ptr long ptr ptr)
@ stub ScriptString_pLogAttr
@ stub ScriptString_pLogAttr
@ st
ub ScriptString_pSize
@ st
dcall ScriptString_pSize(ptr)
@ stub ScriptString_pcOutChars
@ stub ScriptString_pcOutChars
@ stdcall ScriptTextOut(ptr ptr long long long ptr ptr ptr long ptr long ptr ptr ptr)
@ stdcall ScriptTextOut(ptr ptr long long long ptr ptr ptr long ptr long ptr ptr ptr)
@ stdcall ScriptXtoCP(long long long ptr ptr ptr ptr ptr ptr)
@ stdcall ScriptXtoCP(long long long ptr ptr ptr ptr ptr ptr)
...
...
include/usp10.h
View file @
092edd81
...
@@ -245,7 +245,7 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, in
...
@@ -245,7 +245,7 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, in
HRESULT
WINAPI
ScriptPlace
(
HDC
hdc
,
SCRIPT_CACHE
*
psc
,
const
WORD
*
pwGlyphs
,
int
cGlyphs
,
const
SCRIPT_VISATTR
*
psva
,
HRESULT
WINAPI
ScriptPlace
(
HDC
hdc
,
SCRIPT_CACHE
*
psc
,
const
WORD
*
pwGlyphs
,
int
cGlyphs
,
const
SCRIPT_VISATTR
*
psva
,
SCRIPT_ANALYSIS
*
psa
,
int
*
piAdvance
,
GOFFSET
*
pGoffset
,
ABC
*
pABC
);
SCRIPT_ANALYSIS
*
psa
,
int
*
piAdvance
,
GOFFSET
*
pGoffset
,
ABC
*
pABC
);
HRESULT
WINAPI
ScriptBreak
(
const
WCHAR
*
pwcChars
,
int
cChars
,
const
SCRIPT_ANALYSIS
*
psa
,
SCRIPT_LOGATTR
*
psla
);
HRESULT
WINAPI
ScriptBreak
(
const
WCHAR
*
pwcChars
,
int
cChars
,
const
SCRIPT_ANALYSIS
*
psa
,
SCRIPT_LOGATTR
*
psla
);
HRESULT
WINAPI
ScriptCacheGetHeight
(
HDC
hdc
,
SCRIPT_CACHE
*
psc
,
long
*
tmHeight
);
HRESULT
WINAPI
ScriptCacheGetHeight
(
HDC
hdc
,
SCRIPT_CACHE
*
psc
,
LONG
*
tmHeight
);
HRESULT
WINAPI
ScriptCPtoX
(
int
iCP
,
BOOL
fTrailing
,
int
cChars
,
int
cGlyphs
,
const
WORD
*
pwLogClust
,
const
SCRIPT_VISATTR
*
psva
,
HRESULT
WINAPI
ScriptCPtoX
(
int
iCP
,
BOOL
fTrailing
,
int
cChars
,
int
cGlyphs
,
const
WORD
*
pwLogClust
,
const
SCRIPT_VISATTR
*
psva
,
const
int
*
piAdvance
,
const
SCRIPT_ANALYSIS
*
psa
,
int
*
piX
);
const
int
*
piAdvance
,
const
SCRIPT_ANALYSIS
*
psa
,
int
*
piX
);
HRESULT
WINAPI
ScriptXtoCP
(
int
iX
,
int
cChars
,
int
cGlyphs
,
const
WORD
*
pwLogClust
,
const
SCRIPT_VISATTR
*
psva
,
HRESULT
WINAPI
ScriptXtoCP
(
int
iX
,
int
cChars
,
int
cGlyphs
,
const
WORD
*
pwLogClust
,
const
SCRIPT_VISATTR
*
psva
,
...
...
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