[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]);
|
void cogl_get_viewport (float v[4]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_clip_set:
|
* cogl_clip_push:
|
||||||
* @x_offset: left edge of the clip rectangle
|
* @x_offset: left edge of the clip rectangle
|
||||||
* @y_offset: top edge of the clip rectangle
|
* @y_offset: top edge of the clip rectangle
|
||||||
* @width: width 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.
|
* current model-view matrix.
|
||||||
*
|
*
|
||||||
* The rectangle is intersected with the current clip region. To undo
|
* 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 y_offset,
|
||||||
float width,
|
float width,
|
||||||
float height);
|
float height);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_clip_set_from_path:
|
* cogl_clip_push_from_path:
|
||||||
*
|
*
|
||||||
* Sets a new clipping area using the current path. The current path
|
* Sets a new clipping area using the current path. The current path
|
||||||
* is then cleared. The clipping area is intersected with the previous
|
* is then cleared. The clipping area is intersected with the previous
|
||||||
* clipping area. To restore the previous clipping area, call
|
* clipping area. To restore the previous clipping area, call
|
||||||
* cogl_clip_unset().
|
* cogl_clip_pop().
|
||||||
*
|
*
|
||||||
* Since: 1.0
|
* 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
|
* Sets a new clipping area using the current path. The current path
|
||||||
* is then cleared. The clipping area is intersected with the previous
|
* is then cleared. The clipping area is intersected with the previous
|
||||||
* clipping area. To restore the previous clipping area, call
|
* clipping area. To restore the previous clipping area, call
|
||||||
* cogl_clip_unset().
|
* cogl_clip_pop().
|
||||||
*
|
*
|
||||||
* Since: 1.0
|
* 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
|
* 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:
|
* cogl_clip_ensure:
|
||||||
@ -365,8 +365,8 @@ void cogl_clip_ensure (void);
|
|||||||
*
|
*
|
||||||
* Save the entire state of the clipping stack and then clear all
|
* Save the entire state of the clipping stack and then clear all
|
||||||
* clipping. The previous state can be returned to with
|
* clipping. The previous state can be returned to with
|
||||||
* cogl_clip_stack_restore(). Each call to cogl_clip_set() after this
|
* cogl_clip_stack_restore(). Each call to cogl_clip_push() after this
|
||||||
* must be matched by a call to cogl_clip_unset() before calling
|
* must be matched by a call to cogl_clip_pop() before calling
|
||||||
* cogl_clip_stack_restore().
|
* cogl_clip_stack_restore().
|
||||||
*
|
*
|
||||||
* Since: 0.8.2
|
* Since: 0.8.2
|
||||||
|
@ -99,10 +99,10 @@ struct _CoglClipStackEntryPath
|
|||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_clip_set (float x_offset,
|
cogl_clip_push (float x_offset,
|
||||||
float y_offset,
|
float y_offset,
|
||||||
float width,
|
float width,
|
||||||
float height)
|
float height)
|
||||||
{
|
{
|
||||||
CoglClipStackEntryRect *entry;
|
CoglClipStackEntryRect *entry;
|
||||||
CoglClipStack *stack;
|
CoglClipStack *stack;
|
||||||
@ -129,7 +129,7 @@ cogl_clip_set (float x_offset,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_clip_set_from_path_preserve (void)
|
cogl_clip_push_from_path_preserve (void)
|
||||||
{
|
{
|
||||||
CoglClipStackEntryPath *entry;
|
CoglClipStackEntryPath *entry;
|
||||||
CoglClipStack *stack;
|
CoglClipStack *stack;
|
||||||
@ -157,15 +157,15 @@ cogl_clip_set_from_path_preserve (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 ();
|
cogl_path_new ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_clip_unset (void)
|
cogl_clip_pop (void)
|
||||||
{
|
{
|
||||||
gpointer entry;
|
gpointer entry;
|
||||||
CoglClipStack *stack;
|
CoglClipStack *stack;
|
||||||
@ -319,7 +319,7 @@ cogl_clip_stack_restore (void)
|
|||||||
|
|
||||||
/* Empty the current stack */
|
/* Empty the current stack */
|
||||||
while (stack->stack_top)
|
while (stack->stack_top)
|
||||||
cogl_clip_unset ();
|
cogl_clip_pop ();
|
||||||
|
|
||||||
/* Revert to an old stack */
|
/* Revert to an old stack */
|
||||||
g_slice_free (CoglClipStack, stack);
|
g_slice_free (CoglClipStack, stack);
|
||||||
|
@ -42,10 +42,10 @@ cogl_get_bitmasks
|
|||||||
cogl_paint_init
|
cogl_paint_init
|
||||||
<SUBSECTION>
|
<SUBSECTION>
|
||||||
CoglClipStackState
|
CoglClipStackState
|
||||||
cogl_clip_set
|
cogl_clip_push
|
||||||
cogl_clip_set_from_path
|
cogl_clip_push_from_path
|
||||||
cogl_clip_set_from_path_preserve
|
cogl_clip_push_from_path_preserve
|
||||||
cogl_clip_unset
|
cogl_clip_pop
|
||||||
cogl_clip_stack_save
|
cogl_clip_stack_save
|
||||||
cogl_clip_stack_restore
|
cogl_clip_stack_restore
|
||||||
cogl_clip_ensure
|
cogl_clip_ensure
|
||||||
|
Loading…
x
Reference in New Issue
Block a user