Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
02d81485
Commit
02d81485
authored
Nov 29, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for doing SetBitmapBits on a DIB section.
parent
02b65577
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
bitmap.c
dlls/gdi/bitmap.c
+25
-0
No files found.
dlls/gdi/bitmap.c
View file @
02d81485
...
...
@@ -381,6 +381,31 @@ LONG WINAPI SetBitmapBits(
count
=
-
count
;
}
if
(
bmp
->
dib
)
/* simply copy the bits into the DIB */
{
DIBSECTION
*
dib
=
bmp
->
dib
;
char
*
dest
=
dib
->
dsBm
.
bmBits
;
DWORD
max
=
dib
->
dsBm
.
bmWidthBytes
*
dib
->
dsBm
.
bmHeight
;
if
(
count
>
max
)
count
=
max
;
ret
=
count
;
if
(
bmp
->
dib
->
dsBmih
.
biHeight
>=
0
)
/* not top-down, need to flip contents vertically */
{
dest
+=
dib
->
dsBm
.
bmWidthBytes
*
dib
->
dsBm
.
bmHeight
;
while
(
count
>
0
)
{
dest
-=
dib
->
dsBm
.
bmWidthBytes
;
memcpy
(
dest
,
bits
,
min
(
count
,
dib
->
dsBm
.
bmWidthBytes
)
);
bits
=
(
char
*
)
bits
+
dib
->
dsBm
.
bmWidthBytes
;
count
-=
dib
->
dsBm
.
bmWidthBytes
;
}
}
else
memcpy
(
dest
,
bits
,
count
);
GDI_ReleaseObj
(
hbitmap
);
return
ret
;
}
/* Only get entire lines */
height
=
count
/
bmp
->
bitmap
.
bmWidthBytes
;
if
(
height
>
bmp
->
bitmap
.
bmHeight
)
height
=
bmp
->
bitmap
.
bmHeight
;
...
...
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