From 51e554f5d61a3766d1bd00e4440cf9b7cd73b385 Mon Sep 17 00:00:00 2001 From: Dibo Date: Wed, 1 May 2013 20:50:40 +0200 Subject: Added Graeme suggestions --- src/gui/fpg_animation.pas | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gui') diff --git a/src/gui/fpg_animation.pas b/src/gui/fpg_animation.pas index ff58f755..29a80960 100644 --- a/src/gui/fpg_animation.pas +++ b/src/gui/fpg_animation.pas @@ -61,7 +61,7 @@ type constructor Create(AOwner: TComponent); override; destructor Destroy; override; - procedure ImageFromByte(ABmp: Pointer; ASize: longword); + procedure ImageFromByteArray(ABmp: Pointer; ASize: longword; AMaskSample: TPoint); end; @@ -165,7 +165,8 @@ begin Repaint; end; -procedure TfpgBaseImgAnim.ImageFromByte(ABmp: Pointer; ASize: longword); +procedure TfpgBaseImgAnim.ImageFromByteArray(ABmp: Pointer; ASize: longword; + AMaskSample: TPoint); begin if ABmp=nil then Exit; @@ -175,7 +176,7 @@ begin FImage := CreateImage_BMP(ABmp, ASize); if FTransparent then begin - FImage.CreateMaskFromSample(0, 0); + FImage.CreateMaskFromSample(AMaskSample.X, AMaskSample.Y); FImage.UpdateImage; end; FImageFilename := 'byte'; // because handle paint check if file is set -- cgit v1.2.3-70-g09d2