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
33e7d028
Commit
33e7d028
authored
May 14, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Store an alpha channel present flag for each image in an imagelist.
parent
528722e4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
imagelist.c
dlls/comctl32/imagelist.c
+22
-1
imagelist.h
dlls/comctl32/imagelist.h
+1
-0
No files found.
dlls/comctl32/imagelist.c
View file @
33e7d028
...
@@ -207,6 +207,7 @@ static BOOL add_with_alpha( HIMAGELIST himl, HDC hdc, int pos, int count,
...
@@ -207,6 +207,7 @@ static BOOL add_with_alpha( HIMAGELIST himl, HDC hdc, int pos, int count,
}
}
else
else
{
{
if
(
himl
->
has_alpha
)
himl
->
has_alpha
[
pos
+
n
]
=
1
;
StretchBlt
(
himl
->
hdcImage
,
pt
.
x
,
pt
.
y
,
himl
->
cx
,
himl
->
cy
,
StretchBlt
(
himl
->
hdcImage
,
pt
.
x
,
pt
.
y
,
himl
->
cx
,
himl
->
cy
,
hdc
,
n
*
width
,
0
,
width
,
height
,
SRCCOPY
);
hdc
,
n
*
width
,
0
,
width
,
height
,
SRCCOPY
);
}
}
...
@@ -294,6 +295,18 @@ IMAGELIST_InternalExpandBitmaps(HIMAGELIST himl, INT nImageCount)
...
@@ -294,6 +295,18 @@ IMAGELIST_InternalExpandBitmaps(HIMAGELIST himl, INT nImageCount)
himl
->
hbmMask
=
hbmNewBitmap
;
himl
->
hbmMask
=
hbmNewBitmap
;
}
}
if
(
himl
->
has_alpha
)
{
char
*
new_alpha
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
himl
->
has_alpha
,
himl
->
cMaxImage
);
if
(
new_alpha
)
himl
->
has_alpha
=
new_alpha
;
else
{
HeapFree
(
GetProcessHeap
(),
0
,
himl
->
has_alpha
);
himl
->
has_alpha
=
NULL
;
}
}
himl
->
cMaxImage
=
nNewCount
;
himl
->
cMaxImage
=
nNewCount
;
DeleteDC
(
hdcBitmap
);
DeleteDC
(
hdcBitmap
);
...
@@ -728,6 +741,11 @@ ImageList_Create (INT cx, INT cy, UINT flags,
...
@@ -728,6 +741,11 @@ ImageList_Create (INT cx, INT cy, UINT flags,
else
else
himl
->
hbmMask
=
0
;
himl
->
hbmMask
=
0
;
if
(
himl
->
uBitsPixel
==
32
)
himl
->
has_alpha
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
himl
->
cMaxImage
);
else
himl
->
has_alpha
=
NULL
;
/* create blending brushes */
/* create blending brushes */
hbmTemp
=
CreateBitmap
(
8
,
8
,
1
,
1
,
aBitBlend25
);
hbmTemp
=
CreateBitmap
(
8
,
8
,
1
,
1
,
aBitBlend25
);
himl
->
hbrBlend25
=
CreatePatternBrush
(
hbmTemp
);
himl
->
hbrBlend25
=
CreatePatternBrush
(
hbmTemp
);
...
@@ -1430,7 +1448,7 @@ ImageList_Duplicate (HIMAGELIST himlSrc)
...
@@ -1430,7 +1448,7 @@ ImageList_Duplicate (HIMAGELIST himlSrc)
}
}
himlDst
=
ImageList_Create
(
himlSrc
->
cx
,
himlSrc
->
cy
,
himlSrc
->
flags
,
himlDst
=
ImageList_Create
(
himlSrc
->
cx
,
himlSrc
->
cy
,
himlSrc
->
flags
,
himlSrc
->
c
Initial
,
himlSrc
->
cGrow
);
himlSrc
->
c
CurImage
,
himlSrc
->
cGrow
);
if
(
himlDst
)
if
(
himlDst
)
{
{
...
@@ -1446,6 +1464,8 @@ ImageList_Duplicate (HIMAGELIST himlSrc)
...
@@ -1446,6 +1464,8 @@ ImageList_Duplicate (HIMAGELIST himlSrc)
himlDst
->
cCurImage
=
himlSrc
->
cCurImage
;
himlDst
->
cCurImage
=
himlSrc
->
cCurImage
;
himlDst
->
cMaxImage
=
himlSrc
->
cMaxImage
;
himlDst
->
cMaxImage
=
himlSrc
->
cMaxImage
;
if
(
himlSrc
->
has_alpha
&&
himlDst
->
has_alpha
)
memcpy
(
himlDst
->
has_alpha
,
himlSrc
->
has_alpha
,
himlDst
->
cCurImage
);
}
}
return
himlDst
;
return
himlDst
;
}
}
...
@@ -3132,6 +3152,7 @@ static ULONG WINAPI ImageListImpl_Release(IImageList *iface)
...
@@ -3132,6 +3152,7 @@ static ULONG WINAPI ImageListImpl_Release(IImageList *iface)
if
(
This
->
hbrBlend50
)
DeleteObject
(
This
->
hbrBlend50
);
if
(
This
->
hbrBlend50
)
DeleteObject
(
This
->
hbrBlend50
);
This
->
lpVtbl
=
NULL
;
This
->
lpVtbl
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
has_alpha
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
}
...
...
dlls/comctl32/imagelist.h
View file @
33e7d028
...
@@ -53,6 +53,7 @@ struct _IMAGELIST
...
@@ -53,6 +53,7 @@ struct _IMAGELIST
HBRUSH
hbrBlend50
;
HBRUSH
hbrBlend50
;
INT
cInitial
;
INT
cInitial
;
UINT
uBitsPixel
;
UINT
uBitsPixel
;
char
*
has_alpha
;
LONG
ref
;
/* reference count */
LONG
ref
;
/* reference count */
};
};
...
...
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