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
c309883a
Commit
c309883a
authored
Aug 03, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Update the coordinates in convert_bitmapinfo to reflect the position in…
gdi32: Update the coordinates in convert_bitmapinfo to reflect the position in the destination bitmap.
parent
2ba1a437
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
7 deletions
+11
-7
bitblt.c
dlls/gdi32/bitblt.c
+1
-1
dib.c
dlls/gdi32/dib.c
+2
-2
dc.c
dlls/gdi32/dibdrv/dc.c
+7
-3
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-1
No files found.
dlls/gdi32/bitblt.c
View file @
c309883a
...
...
@@ -212,7 +212,7 @@ BOOL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
dst_info
->
bmiHeader
.
biWidth
=
src
->
visrect
.
right
-
src
->
visrect
.
left
;
if
((
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
get_dib_image_size
(
dst_info
))))
{
err
=
convert_bitmapinfo
(
src_info
,
bits
.
ptr
,
&
src
->
visrect
,
dst_info
,
ptr
);
err
=
convert_bitmapinfo
(
src_info
,
bits
.
ptr
,
src
,
dst_info
,
ptr
);
if
(
bits
.
free
)
bits
.
free
(
&
bits
);
bits
.
ptr
=
ptr
;
bits
.
is_copy
=
TRUE
;
...
...
dlls/gdi32/dib.c
View file @
c309883a
...
...
@@ -615,7 +615,7 @@ INT WINAPI SetDIBits( HDC hdc, HBITMAP hbitmap, UINT startscan,
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
get_dib_image_size
(
dst_info
));
if
(
ptr
)
{
err
=
convert_bitmapinfo
(
src_info
,
src_bits
.
ptr
,
&
src
.
visrect
,
dst_info
,
ptr
);
err
=
convert_bitmapinfo
(
src_info
,
src_bits
.
ptr
,
&
src
,
dst_info
,
ptr
);
{
if
(
src_bits
.
free
)
src_bits
.
free
(
&
src_bits
);
src_bits
.
ptr
=
ptr
;
...
...
@@ -1134,7 +1134,7 @@ INT WINAPI GetDIBits(
else
dst_info
->
bmiHeader
.
biHeight
=
-
src
.
height
;
convert_bitmapinfo
(
src_info
,
src_bits
.
ptr
,
&
src
.
visrect
,
dst_info
,
bits
);
convert_bitmapinfo
(
src_info
,
src_bits
.
ptr
,
&
src
,
dst_info
,
bits
);
if
(
src_bits
.
free
)
src_bits
.
free
(
&
src_bits
);
}
else
lines
=
abs
(
height
);
...
...
dlls/gdi32/dibdrv/dc.c
View file @
c309883a
...
...
@@ -260,7 +260,7 @@ void copy_dib_color_info(dib_info *dst, const dib_info *src)
}
}
DWORD
convert_bitmapinfo
(
const
BITMAPINFO
*
src_info
,
void
*
src_bits
,
const
RECT
*
src_rect
,
DWORD
convert_bitmapinfo
(
const
BITMAPINFO
*
src_info
,
void
*
src_bits
,
struct
bitblt_coords
*
src
,
const
BITMAPINFO
*
dst_info
,
void
*
dst_bits
)
{
dib_info
src_dib
,
dst_dib
;
...
...
@@ -271,11 +271,15 @@ DWORD convert_bitmapinfo( const BITMAPINFO *src_info, void *src_bits, const RECT
if
(
!
init_dib_info_from_bitmapinfo
(
&
dst_dib
,
dst_info
,
dst_bits
,
0
)
)
return
ERROR_BAD_FORMAT
;
ret
=
dst_dib
.
funcs
->
convert_to
(
&
dst_dib
,
&
src_dib
,
src_
rect
);
ret
=
dst_dib
.
funcs
->
convert_to
(
&
dst_dib
,
&
src_dib
,
&
src
->
vis
rect
);
/* We shared the color tables, so there's no need to free the dib_infos here */
if
(
!
ret
)
return
ERROR_BAD_FORMAT
;
/* update coordinates, the destination rectangle is always stored at 0,0 */
src
->
x
-=
src
->
visrect
.
left
;
src
->
y
-=
src
->
visrect
.
top
;
offset_rect
(
&
src
->
visrect
,
-
src
->
visrect
.
left
,
-
src
->
visrect
.
top
);
return
ERROR_SUCCESS
;
}
...
...
dlls/gdi32/gdi_private.h
View file @
c309883a
...
...
@@ -340,7 +340,7 @@ extern void DC_UpdateXforms( DC * dc ) DECLSPEC_HIDDEN;
extern
int
bitmap_info_size
(
const
BITMAPINFO
*
info
,
WORD
coloruse
)
DECLSPEC_HIDDEN
;
extern
int
DIB_GetBitmapInfo
(
const
BITMAPINFOHEADER
*
header
,
LONG
*
width
,
LONG
*
height
,
WORD
*
planes
,
WORD
*
bpp
,
DWORD
*
compr
,
DWORD
*
size
)
DECLSPEC_HIDDEN
;
extern
DWORD
convert_bitmapinfo
(
const
BITMAPINFO
*
src_info
,
void
*
src_bits
,
const
RECT
*
src_rect
,
extern
DWORD
convert_bitmapinfo
(
const
BITMAPINFO
*
src_info
,
void
*
src_bits
,
struct
bitblt_coords
*
src
,
const
BITMAPINFO
*
dst_info
,
void
*
dst_bits
)
DECLSPEC_HIDDEN
;
...
...
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