diff options
| author | Bryce Harrington <b.harrington@samsung.com> | 2014-05-05 18:25:26 -0700 |
|---|---|---|
| committer | Bryce Harrington <b.harrington@samsung.com> | 2014-05-05 18:25:26 -0700 |
| commit | 4d07d2c6fe9e77f5fecbe19528cb54cc06f0e8bd (patch) | |
| tree | b8fad0a12c1ea7bfa419942f81c6813da13ac115 /src/cairo-shapes.cpp | |
| parent | 398770f6d07eb5916e12545b8d223b34fa69fd6e (diff) | |
Rename centre to center
Diffstat (limited to 'src/cairo-shapes.cpp')
| -rw-r--r-- | src/cairo-shapes.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/cairo-shapes.cpp b/src/cairo-shapes.cpp index 5d8673a..b50d2b4 100644 --- a/src/cairo-shapes.cpp +++ b/src/cairo-shapes.cpp @@ -36,20 +36,20 @@ cairoRandomizeColor(caskbench_context_t *ctx) void cairoDrawCircle(caskbench_context_t *ctx, shapes_t *args) { - cairo_arc (ctx->cairo_cr, args->centre_x, args->centre_y, args->radius, 0, 2*M_PI); + cairo_arc (ctx->cairo_cr, args->center_x, args->center_y, args->radius, 0, 2*M_PI); } void cairoDrawRectangle(caskbench_context_t *ctx, shapes_t *args) { - cairo_rectangle (ctx->cairo_cr, args->centre_x, args->centre_y, args->width, args->height); + cairo_rectangle (ctx->cairo_cr, args->center_x, args->center_y, args->width, args->height); } void cairoDrawTriangle(caskbench_context_t *ctx, shapes_t *args) { - cairo_move_to (ctx->cairo_cr, args->centre_x, args->centre_y+2*args->radius); + cairo_move_to (ctx->cairo_cr, args->center_x, args->center_y+2*args->radius); cairo_rel_line_to (ctx->cairo_cr, 2*args->radius, 0); cairo_rel_line_to (ctx->cairo_cr, -args->radius, -2*args->radius); } @@ -58,13 +58,13 @@ cairoDrawTriangle(caskbench_context_t *ctx, shapes_t *args) void cairoDrawStar(caskbench_context_t *ctx, shapes_t *args) { - int px = args->centre_x + 2*args->radius * star_points[0][0]/200.0; - int py = args->centre_y + 2*args->radius * star_points[0][1]/200.0; + int px = args->center_x + 2*args->radius * star_points[0][0]/200.0; + int py = args->center_y + 2*args->radius * star_points[0][1]/200.0; cairo_move_to (ctx->cairo_cr, px, py); for (int p = 1; p < 10; p++ ) { - px = args->centre_x + 2*args->radius * star_points[p][0]/200.0; - py = args->centre_y + 2*args->radius * star_points[p][1]/200.0; + px = args->center_x + 2*args->radius * star_points[p][0]/200.0; + py = args->center_y + 2*args->radius * star_points[p][1]/200.0; cairo_line_to (ctx->cairo_cr, px, py); } cairo_close_path(ctx->cairo_cr); @@ -76,8 +76,8 @@ cairoDrawRoundedRectangle (caskbench_context_t *ctx, shapes_t *args) { double h = args->height; double w = args->width; - double x = args->centre_x; - double y = args->centre_y; + double x = args->center_x; + double y = args->center_y; double r = args->radius; cairo_move_to (ctx->cairo_cr, x + r, y); cairo_arc (ctx->cairo_cr, x + w - r, y + r, r, M_PI + M_PI / 2, M_PI * 2 ); |