---
name: "set_clip_state"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/set_clip_state"
---

# set\_clip\_state(3alleg)

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**(3alleg)](/set_clip_rect/3alleg.md), [**get\_clip\_rect**(3alleg)](/get_clip_rect/3alleg.md), [**add\_clip\_rect**(3alleg)](/add_clip_rect/3alleg.md), [**get\_clip\_state**(3alleg)](/get_clip_state/3alleg.md)
