gf_context_set_clipping()

Replace the clipping rectangle

Synopsis:

#include <gf/gf.h>

int gf_context_set_clipping( gf_context_t context,
                             int x1,
                             int y1,
                             int x2,
                             int y2 );

Arguments:

context
The draw context to set the clipping for.
x1, y1, x2, y2
The coordinates of the upper-left corner (x1,y1) and lower-right corner (x2,y2) of the clipping rectangle.

Library:

gf

Description:

This function replaces the clipping region for the specified draw context. Subsequent draw commands are clipped to this region, meaning any part of the command that extends beyond the boundaries of the clipping rectangle doesn't appear on the display.


Note: Clipping rectangles in the QNX Graphics Framework are inclusive. That is, draw operations are clipped to the area within the clipping rectangle, including the values that define the rectangle.

Returns:

GF_ERR_OK
Success.
GF_ERR_PARM
Invalid clip rectangle.

Classification:

QNX Graphics Framework

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

gf_context_disable_clipping()