Clips given source bounds and dest bounds.
procedure ClipStretchBounds(var SrcX: LongInt; var SrcY: LongInt; var SrcWidth: LongInt; var SrcHeight: LongInt; var DstX: LongInt; var DstY: LongInt; var DstWidth: LongInt; var DstHeight: LongInt; SrcImageWidth: LongInt; SrcImageHeight: LongInt; const DstClip: TRect);
ImagingUtility (at line 283)
It is used by various StretchRect functions that stretch rectangle of pixels from one image to another. It handles clipping the same way as Win32 StretchBlt function.