diff options
| author | suyambulingamrm <suyambu.rm@samsung.com> | 2014-06-26 19:46:49 +0530 |
|---|---|---|
| committer | suyambulingamrm <suyambu.rm@samsung.com> | 2014-06-26 19:46:49 +0530 |
| commit | b97546a2c39600d28be46d7a5c9d1b251dd22b04 (patch) | |
| tree | 9586b12163d0d74290c91276766a95e218b55e1d /src/cairo-tests/star.cpp | |
| parent | 440e88a2a69871a8b3b82a8572eade56282dd1b8 (diff) | |
Issue #105. Modify tests to support random fill options.
Diffstat (limited to 'src/cairo-tests/star.cpp')
| -rw-r--r-- | src/cairo-tests/star.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/cairo-tests/star.cpp b/src/cairo-tests/star.cpp index 6b0d81c..9c1d4cb 100644 --- a/src/cairo-tests/star.cpp +++ b/src/cairo-tests/star.cpp @@ -47,18 +47,13 @@ ca_test_star(caskbench_context_t *ctx) shape.x = 0; shape.y = 0; shape.radius = 40; - cairoRandomizeColor(ctx); - cairoDrawStar(ctx, &shape); - switch (ctx->shape_defaults.fill_type) { - case CB_FILL_NONE: - cairo_stroke(ctx->cairo_cr); - break; - case CB_FILL_SOLID: - cairo_fill(ctx->cairo_cr); - break; - default: - break; + if (ctx->shape_defaults.fill_type == CB_FILL_RANDOM) { + shape.fill_type = generate_random_fill_type(); } + ca_set_fill_style(ctx, &shape); + + shape.shape_type = CB_SHAPE_STAR; + cairoDrawRandomizedShape(ctx,&shape); cairo_restore(ctx->cairo_cr); } } |