[draw-buffer] Adds cogl_draw_buffer_get_{width,height} API

Simply adds missing API to query the width and height of any Cogl draw buffer.
This commit is contained in:
Robert Bragg 2009-10-21 23:20:44 +01:00
parent b4770c1e9b
commit e4fe655521
2 changed files with 18 additions and 0 deletions

View File

@ -76,6 +76,10 @@ typedef struct _CoglOnscreen
void void
_cogl_draw_buffer_state_init (void); _cogl_draw_buffer_state_init (void);
int
_cogl_draw_buffer_get_width (CoglHandle handle);
int
_cogl_draw_buffer_get_height (CoglHandle handle);
CoglClipStackState * CoglClipStackState *
_cogl_draw_buffer_get_clip_state (CoglHandle handle); _cogl_draw_buffer_get_clip_state (CoglHandle handle);
void void

View File

@ -130,6 +130,20 @@ _cogl_draw_buffer_free (CoglDrawBuffer *draw_buffer)
draw_buffer->projection_stack = NULL; draw_buffer->projection_stack = NULL;
} }
int
_cogl_draw_buffer_get_width (CoglHandle handle)
{
CoglDrawBuffer *draw_buffer = COGL_DRAW_BUFFER (handle);
return draw_buffer->width;
}
int
_cogl_draw_buffer_get_height (CoglHandle handle)
{
CoglDrawBuffer *draw_buffer = COGL_DRAW_BUFFER (handle);
return draw_buffer->height;
}
CoglClipStackState * CoglClipStackState *
_cogl_draw_buffer_get_clip_state (CoglHandle handle) _cogl_draw_buffer_get_clip_state (CoglHandle handle)
{ {