---
name: "set_clip_state"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/set_clip_state/3alleg4"
---

# set\_clip\_state(3alleg4)

Turns on or off the clipping of a bitmap. Allegro game programming library.

## NAME

set\_clip\_state - Turns on or off the clipping of a bitmap. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**void set\_clip\_state(BITMAP \*bitmap, int state)**

## DESCRIPTION

Turns on (if state is non-zero) or off (if state is zero) clipping for the specified bitmap. Turning clipping off may slightly speed up some drawing operations (usually a negligible  difference, although every little helps) but will result in your program dying a horrible death if you try to draw beyond the edges of the bitmap.

## SEE ALSO

**set\_clip\_rect**(3alleg4), **get\_clip\_rect**(3alleg4), **add\_clip\_rect**(3alleg4), **get\_clip\_state**(3alleg4)
