---
name: "SDL_StretchSurfaceRect"
section: "3"
platform: "linux"
package: "libsdl-stretch-dev"
version: "0.3.1-12"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_StretchSurfaceRect"
---

# SDL\_StretchSurfaceRect(3)

Perform a stretch blit between two surfaces of the same format.

## NAME

SDL\_StretchSurfaceRect - Perform a stretch blit between two surfaces of the same format.

## SYNOPSIS

```
 #include <SDL_stretch.h>
```

**extern DECLSPEC int SDL\_StretchSurfaceRect(SDL\_Surface \*src, SDL\_Rect \*srcrect, SDL\_Surface \*dst, SDL\_Rect \*dstrect);**

## DESCRIPTION

NOTE: **The SDL\_StretchSurfaceRect function** is not safe to call from multiple threads!

**The SDL\_StretchSurfaceRect function** will stretch a srcrect smoothly to the full area of the dst surface. If no srcrect is given then the full area of the src surface is stretched smoothly to the full dst surface. The dstrect is ignored always.

**The SDL\_StretchSurfaceRect function** will also watch for a clip rectangle on the src surface. This may speed up handling in your programs by creating a larger src surface with an associated viewframe, and the srcrect argument needs not be recomputed.
