[pixel-buffer] Add get width and height functions

These were accessible by the get_size function, but individual functions are
more convenient.
This commit is contained in:
Charlie Brej 2010-04-18 15:47:00 +01:00
parent 9f79d59d51
commit 28ca40f6d5
2 changed files with 18 additions and 0 deletions

View file

@ -287,6 +287,20 @@ ply_pixel_buffer_get_size (ply_pixel_buffer_t *buffer,
*size = buffer->area;
}
unsigned long
ply_pixel_buffer_get_width (ply_pixel_buffer_t *buffer)
{
assert (buffer != NULL);
return buffer->area.width;
}
unsigned long
ply_pixel_buffer_get_height (ply_pixel_buffer_t *buffer)
{
assert (buffer != NULL);
return buffer->area.height;
}
ply_region_t *
ply_pixel_buffer_get_updated_areas (ply_pixel_buffer_t *buffer)
{

View file

@ -43,6 +43,10 @@ ply_pixel_buffer_t *ply_pixel_buffer_new (unsigned long width,
void ply_pixel_buffer_free (ply_pixel_buffer_t *buffer);
void ply_pixel_buffer_get_size (ply_pixel_buffer_t *buffer,
ply_rectangle_t *size);
unsigned long ply_pixel_buffer_get_width (ply_pixel_buffer_t *buffer);
unsigned long ply_pixel_buffer_get_height (ply_pixel_buffer_t *buffer);
ply_region_t *ply_pixel_buffer_get_updated_areas (ply_pixel_buffer_t *buffer);
void ply_pixel_buffer_fill_with_color (ply_pixel_buffer_t *buffer,