procedure StretchTransfer(
  Dst: TCustomBitmap32;
  DstRect: TRect;
  DstClip: TRect;
  Src: TCustomBitmap32;
  SrcRect: TRect;
  StretchFilter: TStretchFilter;
  CombineOp: TDrawMode;
  CombineCallBack: TPixelCombineEvent = nil);


StretchTransfer is similar to StretchBlt or StretchDIBits functions from WindowsGDI. This procedure performs copying and, if necessary, stretching of the bitmap fragment specified by SrcRect into location in Dst specified by DstRect. This operation is constrained to the DstClip rectangle specified in the destination bitmap coordinates.

For more information on the stretch filters take a look here.

Unlike in BlockTransfer function, SrcRect must lie inside the Src bitmap boundaries, otherwise function will generate an exception. The result is not specified when transferring data inside the same bitmap (Src=Dst) and if in the same time SrcRect intersects with DstRect. In this case it is recommended to use a temporary bitmap buffer.

This routine used in TCustomBitmap32.Draw and TCustomBitmap32.DrawTo methods.

See Also

TCustomBitmap32, TCustomBitmap32.Draw, TCustomBitmap32.DrawTo, Rectangle Types, TDrawMode, TPixelCombineEvent, TStretchFilter, BlockTransfer