Clips given source bounds and dest position.
procedure ClipCopyBounds(var SrcX: LongInt; var SrcY: LongInt; var Width: LongInt; var Height: LongInt; var DstX: LongInt; var DstY: LongInt; SrcImageWidth: LongInt; SrcImageHeight: LongInt; const DstClip: TRect);
ImagingUtility (at line 278)
It is used by various CopyRect functions that copy rect from one image to another. It handles clipping the same way as Win32 BitBlt function.