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
a3e09aa4
Commit
a3e09aa4
authored
Feb 13, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Feb 13, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Use the image size returned by GetImage.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9d0338bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
font.c
dlls/gdi32/font.c
+4
-3
No files found.
dlls/gdi32/font.c
View file @
a3e09aa4
...
...
@@ -2004,6 +2004,7 @@ BOOL nulldrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, const RECT *rect
info
->
bmiHeader
.
biSize
=
sizeof
(
info
->
bmiHeader
);
info
->
bmiHeader
.
biWidth
=
src
.
width
;
info
->
bmiHeader
.
biHeight
=
-
src
.
height
;
info
->
bmiHeader
.
biSizeImage
=
get_dib_image_size
(
info
);
err
=
dst_dev
->
funcs
->
pPutImage
(
dst_dev
,
0
,
info
,
NULL
,
NULL
,
NULL
,
0
);
if
(
!
err
||
err
==
ERROR_BAD_FORMAT
)
{
...
...
@@ -2013,7 +2014,7 @@ BOOL nulldrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, const RECT *rect
src
.
visrect
.
right
=
src
.
width
;
src
.
visrect
.
bottom
=
src
.
height
;
bits
.
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
get_dib_image_size
(
info
)
);
bits
.
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
info
->
bmiHeader
.
biSizeImage
);
if
(
!
bits
.
ptr
)
return
ERROR_OUTOFMEMORY
;
bits
.
is_copy
=
TRUE
;
bits
.
free
=
free_heap_bits
;
...
...
@@ -2026,13 +2027,13 @@ BOOL nulldrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, const RECT *rect
err
=
src_dev
->
funcs
->
pGetImage
(
src_dev
,
info
,
&
bits
,
&
src
);
if
(
!
err
&&
!
bits
.
is_copy
)
{
void
*
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
get_dib_image_size
(
info
)
);
void
*
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
info
->
bmiHeader
.
biSizeImage
);
if
(
!
ptr
)
{
if
(
bits
.
free
)
bits
.
free
(
&
bits
);
return
ERROR_OUTOFMEMORY
;
}
memcpy
(
ptr
,
bits
.
ptr
,
get_dib_image_size
(
info
)
);
memcpy
(
ptr
,
bits
.
ptr
,
info
->
bmiHeader
.
biSizeImage
);
if
(
bits
.
free
)
bits
.
free
(
&
bits
);
bits
.
ptr
=
ptr
;
bits
.
is_copy
=
TRUE
;
...
...
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