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
f53d73a0
Commit
f53d73a0
authored
Oct 21, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Oct 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a fake 1-entry color table for 1-bpp ddbs.
parent
f1faeb0f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
dib.c
dlls/gdi32/dib.c
+18
-2
No files found.
dlls/gdi32/dib.c
View file @
f53d73a0
...
...
@@ -501,8 +501,24 @@ INT nulldrv_StretchDIBits( PHYSDEV dev, INT xDst, INT yDst, INT widthDst, INT he
err
=
dev
->
funcs
->
pPutImage
(
dev
,
0
,
clip
,
dst_info
,
&
src_bits
,
&
src
,
&
dst
,
rop
);
if
(
err
==
ERROR_BAD_FORMAT
)
{
err
=
convert_bits
(
src_info
,
&
src
,
dst_info
,
&
src_bits
,
FALSE
);
if
(
!
err
)
err
=
dev
->
funcs
->
pPutImage
(
dev
,
0
,
clip
,
dst_info
,
&
src_bits
,
&
src
,
&
dst
,
rop
);
/* 1-bpp destination without a color table requires a fake 1-entry table
* that contains only the background color */
if
(
dst_info
->
bmiHeader
.
biBitCount
==
1
&&
!
dst_info
->
bmiHeader
.
biClrUsed
)
{
COLORREF
color
=
GetBkColor
(
dev
->
hdc
);
dst_info
->
bmiColors
[
0
].
rgbRed
=
GetRValue
(
color
);
dst_info
->
bmiColors
[
0
].
rgbGreen
=
GetGValue
(
color
);
dst_info
->
bmiColors
[
0
].
rgbBlue
=
GetBValue
(
color
);
dst_info
->
bmiColors
[
0
].
rgbReserved
=
0
;
dst_info
->
bmiHeader
.
biClrUsed
=
1
;
}
if
(
!
(
err
=
convert_bits
(
src_info
,
&
src
,
dst_info
,
&
src_bits
,
FALSE
)))
{
/* get rid of the fake 1-bpp table */
if
(
dst_info
->
bmiHeader
.
biClrUsed
==
1
)
dst_info
->
bmiHeader
.
biClrUsed
=
0
;
err
=
dev
->
funcs
->
pPutImage
(
dev
,
0
,
clip
,
dst_info
,
&
src_bits
,
&
src
,
&
dst
,
rop
);
}
}
if
(
err
==
ERROR_TRANSFORM_NOT_SUPPORTED
)
...
...
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