diff --git a/cogl.h.in b/cogl.h.in index 680be2691..8386a435c 100644 --- a/cogl.h.in +++ b/cogl.h.in @@ -296,7 +296,7 @@ void cogl_get_projection_matrix (float m[16]); void cogl_get_viewport (float v[4]); /** - * cogl_clip_set: + * cogl_clip_push: * @x_offset: left edge of the clip rectangle * @y_offset: top edge of the clip rectangle * @width: width of the clip rectangle @@ -309,44 +309,44 @@ void cogl_get_viewport (float v[4]); * current model-view matrix. * * The rectangle is intersected with the current clip region. To undo - * the effect of this function, call cogl_clip_unset(). + * the effect of this function, call cogl_clip_pop(). */ -void cogl_clip_set (float x_offset, +void cogl_clip_push (float x_offset, float y_offset, float width, float height); /** - * cogl_clip_set_from_path: + * cogl_clip_push_from_path: * * Sets a new clipping area using the current path. The current path * is then cleared. The clipping area is intersected with the previous * clipping area. To restore the previous clipping area, call - * cogl_clip_unset(). + * cogl_clip_pop(). * * Since: 1.0 */ -void cogl_clip_set_from_path (void); +void cogl_clip_push_from_path (void); /** - * cogl_clip_set_from_path_preserve: + * cogl_clip_push_from_path_preserve: * * Sets a new clipping area using the current path. The current path * is then cleared. The clipping area is intersected with the previous * clipping area. To restore the previous clipping area, call - * cogl_clip_unset(). + * cogl_clip_pop(). * * Since: 1.0 */ -void cogl_clip_set_from_path_preserve (void); +void cogl_clip_push_from_path_preserve (void); /** - * cogl_clip_unset: + * cogl_clip_pop: * * Reverts the clipping region to the state before the last call to - * cogl_clip_set(). + * cogl_clip_push(). */ -void cogl_clip_unset (void); +void cogl_clip_pop (void); /** * cogl_clip_ensure: @@ -365,8 +365,8 @@ void cogl_clip_ensure (void); * * 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_set() after this - * must be matched by a call to cogl_clip_unset() before calling + * 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 diff --git a/common/cogl-clip-stack.c b/common/cogl-clip-stack.c index 9d8a623e9..23309202c 100644 --- a/common/cogl-clip-stack.c +++ b/common/cogl-clip-stack.c @@ -99,10 +99,10 @@ struct _CoglClipStackEntryPath }; void -cogl_clip_set (float x_offset, - float y_offset, - float width, - float height) +cogl_clip_push (float x_offset, + float y_offset, + float width, + float height) { CoglClipStackEntryRect *entry; CoglClipStack *stack; @@ -129,7 +129,7 @@ cogl_clip_set (float x_offset, } void -cogl_clip_set_from_path_preserve (void) +cogl_clip_push_from_path_preserve (void) { CoglClipStackEntryPath *entry; CoglClipStack *stack; @@ -157,15 +157,15 @@ cogl_clip_set_from_path_preserve (void) } void -cogl_clip_set_from_path (void) +cogl_clip_push_from_path (void) { - cogl_clip_set_from_path_preserve (); + cogl_clip_push_from_path_preserve (); cogl_path_new (); } void -cogl_clip_unset (void) +cogl_clip_pop (void) { gpointer entry; CoglClipStack *stack; @@ -208,7 +208,7 @@ _cogl_clip_stack_rebuild (void) _cogl_disable_clip_planes (); _cogl_disable_stencil_buffer (); - + /* If the stack is empty then there's nothing else to do */ if (stack->stack_top == NULL) return; @@ -319,7 +319,7 @@ cogl_clip_stack_restore (void) /* Empty the current stack */ while (stack->stack_top) - cogl_clip_unset (); + cogl_clip_pop (); /* Revert to an old stack */ g_slice_free (CoglClipStack, stack); @@ -336,7 +336,7 @@ _cogl_clip_stack_state_init (void) ctx->clip.stacks = NULL; ctx->clip.stack_dirty = TRUE; - + /* Add an intial stack */ cogl_clip_stack_save (); } diff --git a/doc/reference/cogl/cogl-sections.txt b/doc/reference/cogl/cogl-sections.txt index 582e4034e..1a8cd8c6f 100644 --- a/doc/reference/cogl/cogl-sections.txt +++ b/doc/reference/cogl/cogl-sections.txt @@ -42,10 +42,10 @@ cogl_get_bitmasks cogl_paint_init CoglClipStackState -cogl_clip_set -cogl_clip_set_from_path -cogl_clip_set_from_path_preserve -cogl_clip_unset +cogl_clip_push +cogl_clip_push_from_path +cogl_clip_push_from_path_preserve +cogl_clip_pop cogl_clip_stack_save cogl_clip_stack_restore cogl_clip_ensure