## Clipping Clipping — Fuctions for manipulating a stack of clipping regions |

## Functions

void | cogl_clip_push_rectangle ()
void | cogl_clip_push_window_rectangle ()
void | cogl_clip_pop ()

## Description

To support clipping your geometry to rectangles or paths Cogl exposes a stack based API whereby each clip region you push onto the stack is intersected with the previous region.

## Functions

### cogl_clip_push_rectangle ()

    void
    cogl_clip_push_rectangle (float x0,
                              float y0,
                              float x1,
                              float y1);

`cogl_clip_push_rectangle` has been deprecated since version 1.16 and should not be used in newly-written code.

Use `cogl_framebuffer_push_rectangle_clip()` instead

Specifies a rectangular clipping area for all subsequent drawing operations. Any drawing commands that extend outside the rectangle will be clipped so that only the portion inside the rectangle will be displayed. The rectangle dimensions are transformed by the current model-view matrix.

The rectangle is intersected with the current clip region. To undo the effect of this function, call `cogl_clip_pop()`.

#### Parameters

x0 | x coordinate for top left corner of the clip rectangle |
y0 | y coordinate for top left corner of the clip rectangle |
x1 | x coordinate for bottom right corner of the clip rectangle |
y1 | y coordinate for bottom right corner of the clip rectangle |

Since: 1.2

### cogl_clip_push_window_rectangle ()

    void
    cogl_clip_push_window_rectangle (int x_offset,
                                     int y_offset,
                                     int width,
                                     int height);

`cogl_clip_push_window_rectangle` has been deprecated since version 1.16 and should not be used in newly-written code.

Use `cogl_framebuffer_push_scissor_clip()` instead

Specifies a rectangular clipping area for all subsequent drawing operations. Any drawing commands that extend outside the rectangle will be clipped so that only the portion inside the rectangle will be displayed. The rectangle dimensions are not transformed by the current model-view matrix.

The rectangle is intersected with the current clip region. To undo the effect of this function, call `cogl_clip_pop()`.

#### Parameters

x_offset | left edge of the clip rectangle in window coordinates |
y_offset | top edge of the clip rectangle in window coordinates |
width | width of the clip rectangle |
height | height of the clip rectangle |

Since: 1.2

### cogl_clip_pop ()

    void
    cogl_clip_pop (void);

`cogl_clip_pop` has been deprecated since version 1.16 and should not be used in newly-written code.

Use `cogl_framebuffer_pop_clip()` instead

Reverts the clipping region to the state before the last call to `cogl_clip_push()`.

## Types and Values