diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2010-04-21 09:59:29 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2010-04-21 09:59:29 -0400 |
commit | 8f7cc5e4388e83eb1b77aea978f3c58338232320 (patch) | |
tree | 9695a47d91348299097bff27224540ee117bb5ef | |
parent | 2b1cae1ef62289288ef00ea7cc1dfef8e01750e6 (diff) |
Add pixman_image_get_format() accessor
-rw-r--r-- | pixman/pixman-image.c | 9 | ||||
-rw-r--r-- | pixman/pixman.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c index 9b44aa9..9604bfe 100644 --- a/pixman/pixman-image.c +++ b/pixman/pixman-image.c @@ -739,6 +739,15 @@ pixman_image_get_depth (pixman_image_t *image) return 0; } +PIXMAN_EXPORT pixman_format_code_t +pixman_image_get_format (pixman_image_t *image) +{ + if (image->type == BITS) + return image->bits.format; + + return 0; +} + uint32_t _pixman_image_get_solid (pixman_image_t * image, pixman_format_code_t format) diff --git a/pixman/pixman.h b/pixman/pixman.h index 964d04a..7b95fed 100644 --- a/pixman/pixman.h +++ b/pixman/pixman.h @@ -778,6 +778,7 @@ int pixman_image_get_width (pixman_image_t *image); int pixman_image_get_height (pixman_image_t *image); int pixman_image_get_stride (pixman_image_t *image); /* in bytes */ int pixman_image_get_depth (pixman_image_t *image); +pixman_format_code_t pixman_image_get_format (pixman_image_t *image); pixman_bool_t pixman_image_fill_rectangles (pixman_op_t op, pixman_image_t *image, pixman_color_t *color, |