From 0ab81dc6383e843aa3fa78da289820a55f4a08f0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann?= Date: Tue, 12 Jun 2007 15:32:27 -0400 Subject: [PATCH] Add pixman_add_trapezoids() function --- pixman/pixman-trap.c | 20 ++++++++++++++++++++ pixman/pixman.h | 5 +++++ 2 files changed, 25 insertions(+) diff --git a/pixman/pixman-trap.c b/pixman/pixman-trap.c index 3e66e88..fb88d21 100644 --- a/pixman/pixman-trap.c +++ b/pixman/pixman-trap.c @@ -86,6 +86,26 @@ pixman_add_traps (pixman_image_t * image, } void +pixman_add_trapezoids (pixman_image_t *image, + int16_t x_off, + int y_off, + int ntraps, + const pixman_trapezoid_t *traps) +{ + int i; + + for (i = 0; i < ntraps; ++i) + { + const pixman_trapezoid_t *trap = &(traps[i]); + + if (!pixman_trapezoid_valid (trap)) + continue; + + pixman_rasterize_trapezoid (image, trap, x_off, y_off); + } +} + +void pixman_rasterize_trapezoid (pixman_image_t * image, pixman_trapezoid_t *trap, int x_off, diff --git a/pixman/pixman.h b/pixman/pixman.h index 229f76c..bda856c 100644 --- a/pixman/pixman.h +++ b/pixman/pixman.h @@ -591,6 +591,11 @@ void pixman_add_traps (pixman_image_t *image, int16_t y_off, int ntrap, pixman_trap_t *traps); +void pixman_add_trapezoids (pixman_image_t *image, + int16_t x_off, + int y_off, + int ntraps, + const pixman_trapezoid_t *traps); void pixman_rasterize_trapezoid (pixman_image_t *image, pixman_trapezoid_t *trap, int x_off, -- 2.7.4