From 53bae97c7e7bf9b20ddfd400fd0bd11d03431d39 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Sat, 2 May 2009 21:08:12 -0400 Subject: [PATCH] Split conical gradient images into pixman-conical-gradient.c --- pixman/Makefile.am | 1 + pixman/pixman-conical-gradient.c | 52 ++++++++++++++++++++++++++++++++++++++++ pixman/pixman-image.c | 27 --------------------- 3 files changed, 53 insertions(+), 27 deletions(-) create mode 100644 pixman/pixman-conical-gradient.c diff --git a/pixman/Makefile.am b/pixman/Makefile.am index cad1f39..4a0cba0 100644 --- a/pixman/Makefile.am +++ b/pixman/Makefile.am @@ -18,6 +18,7 @@ libpixman_1_la_SOURCES = \ pixman-pict.c \ pixman-source.c \ pixman-solid-fill.c \ + pixman-conical-gradient.c \ pixman-linear-gradient.c \ pixman-radial-gradient.c \ pixman-transformed.c \ diff --git a/pixman/pixman-conical-gradient.c b/pixman/pixman-conical-gradient.c new file mode 100644 index 0000000..0b041f0 --- /dev/null +++ b/pixman/pixman-conical-gradient.c @@ -0,0 +1,52 @@ +/* + * Copyright © 2000 SuSE, Inc. + * Copyright © 2007 Red Hat, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of SuSE not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. SuSE makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include "pixman-private.h" + +PIXMAN_EXPORT pixman_image_t * +pixman_image_create_conical_gradient (pixman_point_fixed_t *center, + pixman_fixed_t angle, + const pixman_gradient_stop_t *stops, + int n_stops) +{ + pixman_image_t *image = _pixman_image_allocate(); + conical_gradient_t *conical; + + if (!image) + return NULL; + + conical = &image->conical; + + if (!_pixman_init_gradient (&conical->common, stops, n_stops)) + { + free (image); + return NULL; + } + + image->type = CONICAL; + conical->center = *center; + conical->angle = angle; + + return image; +} diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c index ce087f3..970ca53 100644 --- a/pixman/pixman-image.c +++ b/pixman/pixman-image.c @@ -299,33 +299,6 @@ pixman_image_unref (pixman_image_t *image) /* Constructors */ -PIXMAN_EXPORT pixman_image_t * -pixman_image_create_conical_gradient (pixman_point_fixed_t *center, - pixman_fixed_t angle, - const pixman_gradient_stop_t *stops, - int n_stops) -{ - pixman_image_t *image = _pixman_image_allocate(); - conical_gradient_t *conical; - - if (!image) - return NULL; - - conical = &image->conical; - - if (!_pixman_init_gradient (&conical->common, stops, n_stops)) - { - free (image); - return NULL; - } - - image->type = CONICAL; - conical->center = *center; - conical->angle = angle; - - return image; -} - static uint32_t * create_bits (pixman_format_code_t format, int width, -- 2.7.4