Clipping (Deprecated)

Clipping (Deprecated)

Synopsis

void                cogl_clip_push                      (float x_offset,
                                                         float y_offset,
                                                         float width,
                                                         float height);
void                cogl_clip_push_window_rect          (float x_offset,
                                                         float y_offset,
                                                         float width,
                                                         float height);
void                cogl_clip_ensure                    (void);
void                cogl_clip_stack_save                (void);
void                cogl_clip_stack_restore             (void);

Description

Details

cogl_clip_push ()

void                cogl_clip_push                      (float x_offset,
                                                         float y_offset,
                                                         float width,
                                                         float height);

Warning

cogl_clip_push has been deprecated since version 1.2 and should not be used in newly-written code. The x, y, width, height arguments are inconsistent with other API that specify rectangles in model space, and when used with a coordinate space that puts the origin at the center and y+ extending up, it's awkward to use. Please use cogl_clip_push_rectangle() 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().

x_offset :

left edge of the clip rectangle

y_offset :

top edge of the clip rectangle

width :

width of the clip rectangle

height :

height of the clip rectangle

cogl_clip_push_window_rect ()

void                cogl_clip_push_window_rect          (float x_offset,
                                                         float y_offset,
                                                         float width,
                                                         float height);

Warning

cogl_clip_push_window_rect has been deprecated since version 1.2 and should not be used in newly-written code. Use cogl_clip_push_window_rectangle() 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().

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

cogl_clip_ensure ()

void                cogl_clip_ensure                    (void);

Warning

cogl_clip_ensure has been deprecated since version 1.2 and should not be used in newly-written code. Calling this function has no effect

Ensures that the current clipping region has been set in GL. This will automatically be called before any Cogl primitives but it maybe be neccessary to call if you are using raw GL calls with clipping.

Since 1.0


cogl_clip_stack_save ()

void                cogl_clip_stack_save                (void);

Warning

cogl_clip_stack_save has been deprecated since version 1.2 and should not be used in newly-written code. This was originally added to allow us to save the clip stack when switching to an offscreen framebuffer, but it's not necessary anymore given that framebuffers now own separate clip stacks which will be automatically switched between when a new buffer is set. Calling this function has no effect

Save the entire state of the clipping stack and then clear all clipping. The previous state can be returned to with cogl_clip_stack_restore(). Each call to cogl_clip_push() after this must be matched by a call to cogl_clip_pop() before calling cogl_clip_stack_restore().

Since 0.8.2


cogl_clip_stack_restore ()

void                cogl_clip_stack_restore             (void);

Warning

cogl_clip_stack_restore has been deprecated since version 1.2 and should not be used in newly-written code. This was originally added to allow us to restore the clip stack when switching back from an offscreen framebuffer, but it's not necessary anymore given that framebuffers now own separate clip stacks which will be automatically switched between when a new buffer is set. Calling this function has no effect

Restore the state of the clipping stack that was previously saved by cogl_clip_stack_save().

Since 0.8.2