### Method

# Cogl Framebuffer push_primitive_clip

#### Declaration [src]

    void
    cogl_framebuffer_push_primitive_clip (
      CoglFramebuffer* framebuffer,
      CoglPrimitive* primitive,
      float bounds_x1,
      float bounds_y1,
      float bounds_x2,
      float bounds_y2
    )

#### Description [src]

Sets a new clipping area using a 2D shaped described with a `CoglPrimitive`. The shape must not contain self overlapping geometry and must lie on a single 2D plane. A bounding box of the 2D shape in local coordinates (the same coordinates used to describe the shape) must be given. It is acceptable for the bounds to be larger than the true bounds but behaviour is undefined if the bounds are smaller than the true bounds.

The primitive is transformed by the current model-view matrix and the silhouette is intersected with the previous clipping area. To restore the previous clipping area, call cogl_framebuffer_pop_clip().

This method is not directly available to language bindings.

#### Parameters

`primitive`

  Type: `CoglPrimitive*`

  A `CoglPrimitive` describing a flat 2D shape.

  The data is owned by the caller of the function.

`bounds_x1`

  Type: `float`

  X coordinate for the top-left corner of the primitives bounds.

`bounds_y1`

  Type: `float`

  Y coordinate for the top-left corner of the primitives bounds.

`bounds_x2`

  Type: `float`

  X coordinate for the bottom-right corner of the primitives bounds.

`bounds_y2`

  Type: `float`

  Y coordinate for the bottom-right corner of the primitives bounds.