Split conical gradient images into pixman-conical-gradient.c
authorSøren Sandmann Pedersen <sandmann@redhat.com>
Sun, 3 May 2009 01:08:12 +0000 (21:08 -0400)
committerSøren Sandmann Pedersen <sandmann@redhat.com>
Sat, 16 May 2009 19:12:35 +0000 (15:12 -0400)
pixman/Makefile.am
pixman/pixman-conical-gradient.c [new file with mode: 0644]
pixman/pixman-image.c

index cad1f39..4a0cba0 100644 (file)
@@ -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 (file)
index 0000000..0b041f0
--- /dev/null
@@ -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 <config.h>
+#include <stdlib.h>
+#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;
+}
index ce087f3..970ca53 100644 (file)
@@ -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,