diff options
| author | Bryce Harrington <b.harrington@samsung.com> | 2014-05-07 23:56:26 -0700 |
|---|---|---|
| committer | Bryce Harrington <b.harrington@samsung.com> | 2014-05-08 18:50:52 -0700 |
| commit | 94c9d8dd269acb1eea6e4f053f46171d9bc749a7 (patch) | |
| tree | aba7859bbdc518c0913c742b2ac4b61e7dff73b0 /src/cairo-tests/stroke.cpp | |
| parent | 16c77e3f39c4f55846803c8735a9d101f90fab91 (diff) | |
Draw circles offset by radius
This makes the circle center_x, center_y positioning more consistent
with the other shapes, and indeed we're not tracking the center point
any more, so rename the variable to be less misleading.
Diffstat (limited to 'src/cairo-tests/stroke.cpp')
| -rw-r--r-- | src/cairo-tests/stroke.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cairo-tests/stroke.cpp b/src/cairo-tests/stroke.cpp index 4e62d2c..16c0fa6 100644 --- a/src/cairo-tests/stroke.cpp +++ b/src/cairo-tests/stroke.cpp @@ -54,16 +54,16 @@ static void drawShape(caskbench_context_t *ctx,double x,double y) switch (shape) { case 1: // Circle - ctx->shape_args.center_x = x+r; - ctx->shape_args.center_y = y+r; + ctx->shape_args.x = x+r; + ctx->shape_args.y = y+r; ctx->shape_args.radius = r; cairoShapes[CB_SHAPE_CIRCLE](ctx,&ctx->shape_args); break; case 2: // Rectangle - ctx->shape_args.center_x = x; - ctx->shape_args.center_y = y; + ctx->shape_args.x = x; + ctx->shape_args.y = y; ctx->shape_args.width = (ctx->shape_args.width)?ctx->shape_args.width:2*r; ctx->shape_args.height = (ctx->shape_args.height)?ctx->shape_args.height:2*r; cairoShapes[CB_SHAPE_RECTANGLE](ctx,&ctx->shape_args); @@ -133,7 +133,7 @@ ca_test_stroke(caskbench_context_t *ctx) } else //drawStroke(ctx,NULL); - ctx->shape_args.multi_shapes?drawStroke(ctx,NULL):drawShape(ctx,ctx->shape_args.center_x?ctx->shape_args.center_x:100.0,ctx->shape_args.center_y?ctx->shape_args.center_y:100.0); + ctx->shape_args.multi_shapes?drawStroke(ctx,NULL):drawShape(ctx,ctx->shape_args.x?ctx->shape_args.x:100.0,ctx->shape_args.y?ctx->shape_args.y:100.0); return 1; } |