---
name: "ggiGetGCClipping"
section: "3ggi"
platform: "linux"
package: "libggi2-dev"
version: "1:2.0.1-2"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/ggiSetGCClipping/3ggi"
---

# ggiGetGCClipping(3ggi)

Set or get the clipping rectangle for a visual

Part of [ggiSetGCClipping(3ggi)](/ggiSetGCClipping/3ggi.md).

## NAME

ggiSetGCClipping, ggiGetGCClipping - Set or get the clipping rectangle for a visual

## SYNOPSIS

**#include \<ggi/ggi.h\>**

**int ggiSetGCClipping(ggi\_visual\_t** *vis***,**  **int** *left***, int** *top***,**  **int** *right***, int** *bottom***);**

**int ggiGetGCClipping(ggi\_visual\_t** *vis***,**  **int \****left***, int \****top***,**  **int \****right***, int \****bottom***);** .SH "DESCRIPTION"

**ggiSetGCClipping** sets the the current clipping rectangle to (*left*,*top*)-(*right*-1,*bottom*-1), inclusive.

Initially the clipping rectangle is the whole virtual screen.

All LibGGI drawing primitives obey the clipping rectangle. Negative coordinates given to LibGGI drawing functions will be  clipped correctly.

**ggiGetGCClipping** reads the coordinates of the current clipping rectangle.

## RETURN VALUE

Both functions 0 for OK.
