On Thu, 16 Aug 2007 15:53:39 +0400
skywriter <[EMAIL PROTECTED]> wrote:
> I decided to extend class TLazIntfImage to make it possible to export
> picture to TBitmap for displaying on screen:
>
> TLazIntfImageExtended = class(TLazIntfImage)
> private
> itsThreshold : TFPColor;
> itsGrayScale : Boolean;
> public
> constructor Create( _Width, _Height : Longword );
> constructor CreateFromBitmap( _BMP : TBitmap );
> procedure TurnToGrayScale;
> procedure ThresholdFilter;
> function GetBitmap : TBitmap;
> property GrayScale : Boolean read itsGrayScale write
> itsGrayScale; end;
>
> function TLazIntfImageExtended.GetBitmap : TBitmap;
> var
> OutBMP : TBitmap;
> ImgHandle,
> ImgMaskHandle : HBitmap;
> begin
> OutBMP := TBitmap.Create;
> Self.CreateBitmap( ImgHandle, ImgMaskHandle, false );
> OutBMP.SetHandles( ImgHandle, ImgMaskHandle );
> Result := OutBMP;
> end;
>
> But on "OutBMP.SetHandles( ImgHandle, ImgMaskHandle );" execution
> stops.
> Also i tried to assign property OutBMP.Handle := ImgHandle. Result is
> the same.
> I don't understand why FadeIn example works, but this method - not?
Please provide a complete example.
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives