All pastes #523709 Raw Edit

Untitled

public text v1 · immutable
#523709 ·published 2007-05-30 21:28 UTC
rendered paste body
function BMPZoom(bitmp: TBitmap;  hi,wi: Integer): Boolean;
var
  TmpBmp: TBitmap;
  ARect: TRect;
begin
  Result := False;
  try
    TmpBmp := TBitmap.Create;
    try
      TmpBmp.Width := wi;
      TmpBmp.Height := hi;
      ARect := Rect(0, 0, wi, hi);
      TmpBmp.Canvas.StretchDraw(ARect, Bitmp);
      bitmp.Assign(TmpBmp);
    finally
      TmpBmp.Free;
    end;
    Result := True;
  except
    Result := False;
  end;
end;