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
0da8c0d9
Commit
0da8c0d9
authored
Dec 20, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Compute the extents of the whole string at once in ExtTextOut.
parent
718e2f25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
22 deletions
+25
-22
font.c
dlls/gdi32/font.c
+25
-22
No files found.
dlls/gdi32/font.c
View file @
0da8c0d9
...
...
@@ -2232,46 +2232,49 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
if
(
char_extra
||
dc
->
breakExtra
||
breakRem
||
lpDx
||
lf
.
lfEscapement
!=
0
)
{
UINT
i
;
SIZE
tmpsz
;
POINT
total
=
{
0
,
0
},
desired
[
2
];
deltas
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
*
deltas
));
for
(
i
=
0
;
i
<
count
;
i
++
)
if
(
lpDx
)
{
if
(
lpDx
)
if
(
flags
&
ETO_PDY
)
{
if
(
flags
&
ETO_PDY
)
for
(
i
=
0
;
i
<
count
;
i
++
)
{
deltas
[
i
].
x
=
lpDx
[
i
*
2
]
+
char_extra
;
deltas
[
i
].
y
=
-
lpDx
[
i
*
2
+
1
];
}
else
}
else
{
for
(
i
=
0
;
i
<
count
;
i
++
)
{
deltas
[
i
].
x
=
lpDx
[
i
]
+
char_extra
;
deltas
[
i
].
y
=
0
;
}
}
}
else
{
INT
*
dx
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
*
dx
)
);
if
(
flags
&
ETO_GLYPH_INDEX
)
GetTextExtentExPointI
(
hdc
,
glyphs
,
count
,
-
1
,
NULL
,
dx
,
&
sz
);
else
{
if
(
flags
&
ETO_GLYPH_INDEX
)
GetTextExtentPointI
(
hdc
,
glyphs
+
i
,
1
,
&
tmpsz
);
else
GetTextExtentPointW
(
hdc
,
reordered_str
+
i
,
1
,
&
tmpsz
);
GetTextExtentExPointW
(
hdc
,
reordered_str
,
count
,
-
1
,
NULL
,
dx
,
&
sz
);
deltas
[
i
].
x
=
tmpsz
.
cx
;
deltas
[
i
].
y
=
0
;
}
if
(
!
(
flags
&
ETO_GLYPH_INDEX
)
&&
(
dc
->
breakExtra
||
breakRem
)
&&
reordered_str
[
i
]
==
tm
.
tmBreakChar
)
deltas
[
0
].
x
=
dx
[
0
];
deltas
[
0
].
y
=
0
;
for
(
i
=
1
;
i
<
count
;
i
++
)
{
deltas
[
i
].
x
=
deltas
[
i
].
x
+
dc
->
breakExtra
;
if
(
breakRem
>
0
)
{
breakRem
--
;
deltas
[
i
].
x
++
;
}
deltas
[
i
].
x
=
dx
[
i
]
-
dx
[
i
-
1
];
deltas
[
i
].
y
=
0
;
}
HeapFree
(
GetProcessHeap
(),
0
,
dx
);
}
for
(
i
=
0
;
i
<
count
;
i
++
)
{
total
.
x
+=
deltas
[
i
].
x
;
total
.
y
+=
deltas
[
i
].
y
;
...
...
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