changed TImageList.Add to use AddCopy instead of AddDirect for Delphi compatibility

git-svn-id: trunk@9336 -
This commit is contained in:
mattias 2006-05-22 08:17:41 +00:00
parent 47a7425d7c
commit f7a735f0f0
2 changed files with 5 additions and 3 deletions

View File

@ -145,7 +145,7 @@ type
procedure BeginUpdate;
procedure EndUpdate;
function Add(Image, Mask: TBitmap): Integer; // currently AddDirect
function Add(Image, Mask: TBitmap): Integer; // using AddCopy for Delphi compatibility
function AddDirect(Image, Mask: TBitmap): Integer;
function AddCopy(SrcImage, SrcMask: TBitmap): Integer;
function AddIcon(Image: TIcon): Integer;

View File

@ -52,14 +52,16 @@ end;
Function: TCustomImageList.Add
Params: Image: a bitmap image
Mask: a bitmap which defines the transparent parts of Image
Returns: The index of the added image, -1 if unsuccesfull.
Returns: The index of the added image, -1 if unsuccesful.
Adds one or more (bitmap width / imagelist width) bitmaps to the list.
If Mask is nil, the image has no transparent parts.
The image is copied. To add it directly use AddDirect.
------------------------------------------------------------------------------}
function TCustomImageList.Add(Image, Mask: TBitmap): Integer;
begin
Result:=AddDirect(Image,Mask);
Result:=AddCopy(Image,Mask);
end;
function TCustomImageList.AddDirect(Image, Mask: TBitmap): Integer;