StretchTransfer

Graphics32

StretchTransfer

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

Description

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 TBitmap32.Draw and TBitmap32.DrawTo methods.

See Also

BlockTransfer, TBitmap32.Draw, TBitmap32.DrawTo, TBitmap32, TDrawMode, TPixelCombineEvent, TRect, TStretchFilter