From d0e30df8cb32550e2075efc2d1fa342fa6d8ca8b Mon Sep 17 00:00:00 2001 From: David Reveman Date: Sat, 11 Sep 2004 19:55:24 +0000 Subject: [PATCH] Added function for setting component alpha --- pixman/AUTHORS | 1 + pixman/ChangeLog | 6 ++++++ pixman/src/icimage.c | 9 +++++++++ pixman/src/icint.h | 1 + pixman/src/pixman.h | 6 +++++- 5 files changed, 22 insertions(+), 1 deletion(-) diff --git a/pixman/AUTHORS b/pixman/AUTHORS index d18a04119..25e3b641a 100644 --- a/pixman/AUTHORS +++ b/pixman/AUTHORS @@ -6,6 +6,7 @@ Anders Carlsson Build fixes. New accessor functions. Richard Henderson "slim" macros for better shared libraries Owen Taylor Support for both transform and repeat Keith Packard The original implementation of the compositing code. +David Reveman Byte-order and clipping fixes. Vladimir Vukicevic Bug fix. Bryan Worth Cleanups to not depend on X header files. Carl Worth General maintenance. Original port from X server code. diff --git a/pixman/ChangeLog b/pixman/ChangeLog index f15e54de7..bbb2715a6 100644 --- a/pixman/ChangeLog +++ b/pixman/ChangeLog @@ -1,8 +1,14 @@ 2004-09-12 David Reveman + * src/icint.h: slim_hidden_proto pixman_image_set_component_alpha. + + * src/pixman.h: Added pixman_image_set_component_alpha, making it + possible to use component alpha. + * src/icimage.c (pixman_image_set_clip_region): Make a copy of the client owned region. (IcComputeCompositeRegion): Intersect possible client region. + Added pixman_image_set_component_alpha. * src/icint.h: Include "../config.h". Define IMAGE_BYTE_ORDER and BITMAP_BIT_ORDER correctly. diff --git a/pixman/src/icimage.c b/pixman/src/icimage.c index 78b875a4c..3055b6e88 100644 --- a/pixman/src/icimage.c +++ b/pixman/src/icimage.c @@ -144,6 +144,15 @@ pixman_image_init (pixman_image_t *image) image->owns_pixels = 0; } +void +pixman_image_set_component_alpha (pixman_image_t *image, + int component_alpha) +{ + if (image) + image->componentAlpha = component_alpha; +} +slim_hidden_def(pixman_image_set_component_alpha); + int pixman_image_set_transform (pixman_image_t *image, pixman_transform_t *transform) diff --git a/pixman/src/icint.h b/pixman/src/icint.h index 1cc8883b3..b200e9e05 100644 --- a/pixman/src/icint.h +++ b/pixman/src/icint.h @@ -819,6 +819,7 @@ slim_hidden_proto(pixman_color_to_pixel) slim_hidden_proto(pixman_format_init) slim_hidden_proto(pixman_image_destroy) slim_hidden_proto(pixman_fill_rectangles) +slim_hidden_proto(pixman_image_set_component_alpha) slim_hidden_proto(pixman_image_set_repeat) slim_hidden_proto(pixman_composite) diff --git a/pixman/src/pixman.h b/pixman/src/pixman.h index 46a9a7754..4420f10df 100644 --- a/pixman/src/pixman.h +++ b/pixman/src/pixman.h @@ -54,7 +54,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $Id: pixman.h,v 1.13 2004-04-16 15:32:53 cworth Exp $ */ +/* $Id: pixman.h,v 1.14 2004-09-12 02:55:24 davidr Exp $ */ /* libic.h */ @@ -323,6 +323,10 @@ typedef enum { PIXMAN_FILTER_BILINEAR } pixman_filter_t; +void +pixman_image_set_component_alpha (pixman_image_t *image, + int component_alpha); + int pixman_image_set_transform (pixman_image_t *image, pixman_transform_t *transform);