From 29c97b886fb6fe4d764568e21f9d45b2b08ec863 Mon Sep 17 00:00:00 2001 From: Bryce Harrington Date: Tue, 24 Jun 2014 16:13:29 -0700 Subject: Enable gradient fill types as random selected fill types Also refactor the fill code from skiaDrawRandomizedShape() into its own routine. --- src/shapes.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/shapes.cpp') diff --git a/src/shapes.cpp b/src/shapes.cpp index b2ae017..d9cd904 100644 --- a/src/shapes.cpp +++ b/src/shapes.cpp @@ -10,6 +10,7 @@ #include "shapes.h" const char *gFillTypes[] = { + "random", "none", "solid", "linear-gradient", @@ -34,6 +35,7 @@ convertToFillType(const char *fill_name) } const char *gShapes[] = { + "random", "circle", "rectangle", "triangle", @@ -98,13 +100,7 @@ generate_random_shape() fill_type_t generate_random_fill_type() { -#if 0 - // TODO: Not all fill styles are implemented yet return (fill_type_t) ((((double)(CB_FILL_END-1) * rand())/RAND_MAX) + 1); -#else - // TODO: So for now only go up to solid fills - return (fill_type_t) ((((double)(CB_FILL_SOLID) * rand())/RAND_MAX) + 1); -#endif } /* -- cgit v1.3.1-4-g156e