- increase visibility of CreateCompatibleBitmaps
  - decrease TCustomImageList.GetBitmap argument type from TBitmap to TCustomBitmap

git-svn-id: trunk@16377 -
This commit is contained in:
paul 2008-09-03 06:32:12 +00:00
parent f5d4255ad3
commit 9de410f82a
3 changed files with 7 additions and 5 deletions

View File

@ -1726,6 +1726,8 @@ function CreateBitmapFromLazarusResource(const AName: String; AMinimumClass: TCu
function CreateBitmapFromLazarusResource(AHandle: TLResource): TCustomBitmap;
function CreateBitmapFromLazarusResource(AHandle: TLResource; AMinimumClass: TCustomBitmapClass): TCustomBitmap;
function CreateCompatibleBitmaps(const ARawImage: TRawImage; out ABitmap, AMask: HBitmap; ASkipMask: Boolean = False): Boolean;
var
{ Stores information about the current screen

View File

@ -171,8 +171,8 @@ type
procedure Draw(ACanvas: TCanvas; AX, AY, AIndex: Integer; AEnabled: Boolean = True); overload;
procedure Draw(ACanvas: TCanvas; AX, AY, AIndex: Integer; ADrawEffect: TGraphicsDrawEffect); overload;
procedure FillDescription(out ADesc: TRawImageDescription);
procedure GetBitmap(Index: Integer; Image: TBitmap); overload;
procedure GetBitmap(Index: Integer; Image: TBitmap; AEffect: TGraphicsDrawEffect); overload;
procedure GetBitmap(Index: Integer; Image: TCustomBitmap); overload;
procedure GetBitmap(Index: Integer; Image: TCustomBitmap; AEffect: TGraphicsDrawEffect); overload;
procedure GetRawImage(Index: Integer; out Image: TRawImage);
function GetHotSpot: TPoint; virtual;

View File

@ -529,12 +529,12 @@ end;
Creates a copy of the index'th image.
------------------------------------------------------------------------------}
procedure TCustomImageList.GetBitmap(Index: Integer; Image: TBitmap);
procedure TCustomImageList.GetBitmap(Index: Integer; Image: TCustomBitmap);
begin
GetBitmap(Index, Image, gdeNormal);
end;
procedure TCustomImageList.GetBitmap(Index: Integer; Image: TBitmap;
procedure TCustomImageList.GetBitmap(Index: Integer; Image: TCustomBitmap;
AEffect: TGraphicsDrawEffect);
var
RawImg: TRawImage;
@ -547,7 +547,7 @@ begin
RawImg.PerformEffect(AEffect, True);
if not RawImage_CreateBitmaps(RawImg, ImgHandle, MskHandle, True)
if not CreateCompatibleBitmaps(RawImg, ImgHandle, MskHandle, True)
then begin
// bummer, the widgetset doesn't support our 32bit format, try device
ListImg := TLazIntfImage.Create(RawImg, False);