From: Charlie Brej Date: Sun, 18 Apr 2010 14:47:00 +0000 (+0100) Subject: [pixel-buffer] Add get width and height functions X-Git-Tag: 0.8.3~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28ca40f6d5091179623ea9336f85f97a69bf8dd3;p=thirdparty%2Fplymouth.git [pixel-buffer] Add get width and height functions These were accessible by the get_size function, but individual functions are more convenient. --- diff --git a/src/libply-splash-core/ply-pixel-buffer.c b/src/libply-splash-core/ply-pixel-buffer.c index 57650784..79ff9161 100644 --- a/src/libply-splash-core/ply-pixel-buffer.c +++ b/src/libply-splash-core/ply-pixel-buffer.c @@ -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) { diff --git a/src/libply-splash-core/ply-pixel-buffer.h b/src/libply-splash-core/ply-pixel-buffer.h index 9a0a216b..18ac0946 100644 --- a/src/libply-splash-core/ply-pixel-buffer.h +++ b/src/libply-splash-core/ply-pixel-buffer.h @@ -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,