diff options
| author | Bryce Harrington <b.harrington@samsung.com> | 2014-05-08 10:11:39 -0700 |
|---|---|---|
| committer | Bryce Harrington <b.harrington@samsung.com> | 2014-05-08 18:50:52 -0700 |
| commit | 6462239c7432142640eaa3cc0f9b80fb102014d2 (patch) | |
| tree | 3619d15ee8332f54ce5332719a20626fd2798ba0 /src/cairo-tests/fill.cpp | |
| parent | 151f179755bf5e7d8a61d28cc7cfac109e2952d0 (diff) | |
Use shape_type_t in shapes structure
Diffstat (limited to 'src/cairo-tests/fill.cpp')
| -rw-r--r-- | src/cairo-tests/fill.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/cairo-tests/fill.cpp b/src/cairo-tests/fill.cpp index c1a2b3b..e9975c8 100644 --- a/src/cairo-tests/fill.cpp +++ b/src/cairo-tests/fill.cpp @@ -24,7 +24,8 @@ static kinetics_t *cairo_particles; void drawshapes(caskbench_context_t *ctx,kinetics_t *particles) { - int i, j, x, y, r, p, shape; + int i, j, x, y, r, p; + shape_type_t shape; cairo_t *cr = ctx->cairo_cr; r = 0.9 * element_spacing /2; int old_x, old_y,old_width, old_height; @@ -34,16 +35,13 @@ void drawshapes(caskbench_context_t *ctx,kinetics_t *particles) static const double dashed3[] = {1.0}; static const double dashed2[] = {14.0, 6.0}; cairo_path_t *newPath; - shape = ctx->shape_defaults.shape_id; - if(!shape) + shape = ctx->shape_defaults.shape_type; + if(shape == CB_SHAPE_NONE) { - shape = ((4.0 * rand())/RAND_MAX) + 1; + shape = (shape_type_t) (((4.0 * rand())/RAND_MAX) + 1); if(!ctx->shape_defaults.multi_shapes) - shape = 2; - } - - if(shape) - { + shape = CB_SHAPE_RECTANGLE; + } else { if(!(ctx->shape_defaults.x && ctx->shape_defaults.y)) { ctx->shape_defaults.x = x = ctx->canvas_width/2; |