ggiSetGCClipping

Name

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

#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);

Description

ggiSetGCClipping sets the the current clipping rectangle to (left,top)-(right,bottom). right and bottom are the bottom right corner of the rectangle + 1.

Initially the clipping rectangle is the whole virtual screen.

All LibGGI drawing primitives obey the clipping rectangle.

ggiGetGCClipping reads the coordinates of the current clipping rectangle.

Return value

Both functions 0 for OK, otherwise an error code.