mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
[Cogl] cogl_clip_{set*,unset} renamed to cogl_clip_{push*,pop}
This is so they self document the stacking semantics of the cogl clip API
This commit is contained in:
parent
43a5fef73d
commit
145c2eb5f9
28
cogl.h.in
28
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
|
||||
|
@ -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 ();
|
||||
}
|
||||
|
@ -42,10 +42,10 @@ cogl_get_bitmasks
|
||||
cogl_paint_init
|
||||
<SUBSECTION>
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user