Cogl.Framebuffer.prototype.push_primitive_clip

function push_primitive_clip(primitive: Cogl.Primitive, bounds_x1: Number(gfloat), bounds_y1: Number(gfloat), bounds_x2: Number(gfloat), bounds_y2: Number(gfloat)): void {
    // Gjs wrapper for cogl_framebuffer_push_primitive_clip()
}
  

Sets a new clipping area using a 2D shaped described with a Cogl.Primitive. 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.prototype.pop_clip.

Since 1.10

primitive

A Cogl.Primitive describing a flat 2D shape

bounds_x1

x coordinate for the top-left corner of the primitives bounds

bounds_y1

y coordinate for the top-left corner of the primitives bounds

bounds_x2

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

bounds_y2

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