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
5ee28aeb
Commit
5ee28aeb
authored
Aug 23, 2000
by
Francois Methot
Committed by
Alexandre Julliard
Aug 23, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
For the transparency issue, implemented a switch-case for the bitcount
(bit per pixel) of the animation files.
parent
a1c683e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
13 deletions
+33
-13
animate.c
dlls/comctl32/animate.c
+33
-13
No files found.
dlls/comctl32/animate.c
View file @
5ee28aeb
...
...
@@ -236,10 +236,21 @@ static LRESULT ANIMATE_PaintFrame(ANIMATE_INFO* infoPtr, HDC hDC)
SelectObject
(
hdcMem
,
infoPtr
->
bkgFrameb
);
BitBlt
(
hdcMem
,
0
,
0
,
infoPtr
->
inbih
->
biWidth
,
infoPtr
->
inbih
->
biHeight
,
hDC
,
0
,
0
,
SRCCOPY
);
/* Get the transparent color from the first frame*/
if
(
infoPtr
->
inbih
->
biBitCount
<=
8
)
infoPtr
->
bkColor
=
(
LPVOID
)((
LPSTR
)
infoPtr
->
inbih
+
(
WORD
)(((
LPBITMAPINFO
)
infoPtr
->
inbih
)
->
bmiHeader
.
biSize
));
else
infoPtr
->
bkColor
=
(
LPVOID
)
GetPixel
(
hdcSrc
,
0
,
0
);
switch
(
infoPtr
->
inbih
->
biBitCount
)
{
case
1
:
case
4
:
/*FIXME: Not supported Yet.*/
break
;
case
8
:
infoPtr
->
bkColor
=
(
LPVOID
)((
LPSTR
)
infoPtr
->
inbih
+
(
WORD
)(((
LPBITMAPINFO
)
infoPtr
->
inbih
)
->
bmiHeader
.
biSize
));
break
;
case
16
:
case
24
:
case
32
:
infoPtr
->
bkColor
=
(
LPVOID
)
GetPixel
(
hdcSrc
,
0
,
0
);
/*FIXME:Has not been test with more than 8bpp, errors are possible*/
break
;
}
}
/* Need the copy of the original destination HDC*/
...
...
@@ -254,11 +265,20 @@ static LRESULT ANIMATE_PaintFrame(ANIMATE_INFO* infoPtr, HDC hDC)
monochrome. In this situation, all pixels in the color bitmap that are the same color
as the background color become 1s, and all the other pixels are converted to 0s. */
if
(
infoPtr
->
inbih
->
biBitCount
<=
8
)
SetBkColor
(
hdcSrc
,
infoPtr
->
bkColor
[(((
BYTE
*
)
infoPtr
->
indata
)[
0
])]);
else
{
/* has not been tested with more then 8 bpp */
FIXME
(
"Has not been test with more than 8bpp, errors are possible
\n
"
);
SetBkColor
(
hdcSrc
,
(
COLORREF
)
infoPtr
->
bkColor
);
/* Set the transparent color from the first frame*/
switch
(
infoPtr
->
inbih
->
biBitCount
)
{
case
1
:
case
4
:
/*FIXME: Not supported Yet.*/
break
;
case
8
:
SetBkColor
(
hdcSrc
,
infoPtr
->
bkColor
[(((
BYTE
*
)
infoPtr
->
indata
)[
0
])]);
break
;
case
16
:
case
24
:
case
32
:
SetBkColor
(
hdcSrc
,
(
COLORREF
)
infoPtr
->
bkColor
);
break
;
}
BitBlt
(
hdcMask
,
0
,
0
,
infoPtr
->
inbih
->
biWidth
,
infoPtr
->
inbih
->
biHeight
,
hdcSrc
,
0
,
0
,
SRCCOPY
);
...
...
@@ -269,13 +289,13 @@ static LRESULT ANIMATE_PaintFrame(ANIMATE_INFO* infoPtr, HDC hDC)
bitmap are converted to the destination's text (foreground) color, and the 1
(white) pixels are converted to the background color. */
SetBkColor
(
hdcSrc
,
RGB
(
0
,
0
,
0
));
/
/ 1s --> black (0x000000)
SetTextColor
(
hdcSrc
,
RGB
(
255
,
255
,
255
));
/
/ 0s --> white (0xFFFFFF)
SetBkColor
(
hdcSrc
,
RGB
(
0
,
0
,
0
));
/
* 1s --> black (0x000000)*/
SetTextColor
(
hdcSrc
,
RGB
(
255
,
255
,
255
));
/
* 0s --> white (0xFFFFFF)*/
BitBlt
(
hdcSrc
,
0
,
0
,
infoPtr
->
inbih
->
biWidth
,
infoPtr
->
inbih
->
biHeight
,
hdcMask
,
0
,
0
,
SRCAND
);
SetBkColor
(
hdcMem
,
RGB
(
255
,
255
,
255
));
/
/ 0s --> white (0xFFFFFF)
SetTextColor
(
hdcMem
,
RGB
(
0
,
0
,
0
));
/
/ 1s --> black (0x000000)
SetBkColor
(
hdcMem
,
RGB
(
255
,
255
,
255
));
/
* 0s --> white (0xFFFFFF) */
SetTextColor
(
hdcMem
,
RGB
(
0
,
0
,
0
));
/
* 1s --> black (0x000000) */
BitBlt
(
hdcMem
,
0
,
0
,
infoPtr
->
inbih
->
biWidth
,
infoPtr
->
inbih
->
biHeight
,
hdcMask
,
0
,
0
,
SRCAND
);
...
...
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