mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-21 13:00:01 +02:00
lcl: insert images to imagelist without helper TBitmap - this simplifies, speedups the code and also fixes the problem of black backgrounds of delphi imagelists (by the way they were black because TBitmap.Masked was false for that helper bitmap)
git-svn-id: trunk@29702 -
This commit is contained in:
parent
8ba345107d
commit
c10f325df6
@ -1063,7 +1063,6 @@ var
|
||||
var
|
||||
RawImage, SubRawImage: TRawImage;
|
||||
ImgHandle, MaskHandle: HBitmap;
|
||||
Img: TBitmap;
|
||||
Row: Integer;
|
||||
Col: Integer;
|
||||
ImgRect: TRect;
|
||||
@ -1088,13 +1087,8 @@ var
|
||||
if not Res
|
||||
then raise EInvalidGraphicOperation.Create('TCustomImageList.CreateImagesFromRawImage Create bitmaps');
|
||||
|
||||
Img := TBitmap.Create;
|
||||
Img.SetHandles(ImgHandle, MaskHandle);
|
||||
|
||||
Add(Img, nil);
|
||||
Img.Free;
|
||||
InternalInsert(Count, ImgHandle, MaskHandle, Width, Height);
|
||||
//DebugLn('CreateImagesFromRawImage B ',Img.Width,',',Img.Height,' ',Count);
|
||||
Img := nil;
|
||||
Dec(NewCount);
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user