--- Alistair George <[EMAIL PROTECTED]> wrote:
> What I did was re-assign the bitmap that was passed as the incoming
> function
> paramter.
> eg
> function Tcamform.SizeFunc(BMap: Tbitmap): Tbitmap;
> var
> BMPtmp, BMPtmpB: TFastBMP;
> wsize, hsize: word;
> fval1, fval2: single;
> begin
> //other code here
> BMPtmpB := TfastBMP.CreateFromhBmp(BMap.handle);
> BMPtmp := TfastBMP.Create(wsize, hsize);
> BMap.Width := wsize;
> BMap.Height := hsize;
> BMPtmpB.SmoothResize(BMPtmp);
> BMPtmp.Draw(bmap.canvas.handle, 0, 0);
> result :=bmap;
> //Is that clean and tidy enuff?
Honestly?
No.
I think you need to do some work on your naming conventions :-)
What do bmap, BMPtmp and BMPtmpB represent? What does a 'SizeFunc'
method do? What is the argument for? What does it return?
I can guess at the use of 'wsize' and 'hsize', but what would an
'fval1' and 'fval2' be used for?
It's pretty cryptic (and kinda randomly arranged). I guess you're not
expecting anybody other than yourself to have to work on it :-)
That said, I would *expect* that you need to free BMPtmp and BMPtmpB.
Cheers,
Kerry S
_______________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com.au address at http://mail.yahoo.com.au
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz