+ /* Clip dest rect against source surface size / source point */
+ if (psoSource->sizlBitmap.cx - ptlSrc.x < rclDest.right - rclDest.left)
+ rclDest.right = rclDest.left + psoSource->sizlBitmap.cx - ptlSrc.x;
+ if (psoSource->sizlBitmap.cy - ptlSrc.y < rclDest.bottom - rclDest.top)
+ rclDest.bottom = rclDest.top + psoSource->sizlBitmap.cy - ptlSrc.y;
+
+ /* Clip dest rect against target surface size */
+ if (rclDest.right > psoDest->sizlBitmap.cx)
+ rclDest.right = psoDest->sizlBitmap.cx;
+ if (rclDest.bottom > psoDest->sizlBitmap.cy)
+ rclDest.bottom = psoDest->sizlBitmap.cy;
+ if (RECTL_bIsEmptyRect(&rclDest)) return TRUE;
+ DestRect = &rclDest;
+