#include #include #if 0 #define TRANS pixman_int_to_fixed(10) #else #define TRANS pixman_int_to_fixed(100) #endif int main(void) { pixman_color_t color; pixman_image_t *src; pixman_image_t *dst; pixman_image_t *solid; pixman_transform_t transform = {{{TRANS, 0, 0}, {0, TRANS, 0}, {0, 0, pixman_fixed_1}}}; /* Prepare the src */ color.red = color.green = 0; color.blue = color.alpha = 0xffff; solid = pixman_image_create_solid_fill(&color); src = pixman_image_create_bits(PIXMAN_a8r8g8b8, 800, 800, NULL, -1); pixman_image_composite32(PIXMAN_OP_SRC, solid, NULL, src, 0, 0, 0, 0, 0, 0, 800, 800); pixman_image_set_transform(src, &transform); pixman_image_set_filter(src, PIXMAN_FILTER_BEST, NULL, 0); pixman_image_set_repeat(src, PIXMAN_REPEAT_NORMAL); pixman_image_set_component_alpha(src, 1); /* And do the dst */ dst = pixman_image_create_bits(PIXMAN_a8r8g8b8, 400, 400, NULL, -1); pixman_image_composite32(PIXMAN_OP_SRC, src, NULL, dst, 0, 0, 0, 0, 0, 0, 400, 400); printf("%x\n", pixman_image_get_data(dst)[0]); return 0; }