From 6462239c7432142640eaa3cc0f9b80fb102014d2 Mon Sep 17 00:00:00 2001 From: Bryce Harrington Date: Thu, 8 May 2014 10:11:39 -0700 Subject: Use shape_type_t in shapes structure --- src/cairo-tests/stroke.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/cairo-tests/stroke.cpp') diff --git a/src/cairo-tests/stroke.cpp b/src/cairo-tests/stroke.cpp index b32fa8f..fb8961c 100644 --- a/src/cairo-tests/stroke.cpp +++ b/src/cairo-tests/stroke.cpp @@ -45,12 +45,13 @@ ca_teardown_stroke(void) static void drawShape(caskbench_context_t *ctx,double x,double y) { cairo_t *cr = ctx->cairo_cr; - int i, r,shape,p; + int i, r, p; + shape_type_t shape; r = 0.9 * element_spacing /2; - if(!ctx->shape_defaults.shape_id) - shape = ((4.0 * rand())/RAND_MAX) +1; + if(ctx->shape_defaults.shape_type == CB_SHAPE_NONE) + shape = (shape_type_t) (((4.0 * rand())/RAND_MAX) + 1); else - shape = ctx->shape_defaults.shape_id ; + shape = ctx->shape_defaults.shape_type; switch (shape) { case 1: // Circle -- cgit v1.3.1-4-g156e