summaryrefslogtreecommitdiffstatsci
path: root/src/cairo-tests/animation.cpp
diff options
context:
space:
mode:
authorsuyambulingamrm <suyambu.rm@samsung.com>2014-06-26 21:27:45 +0530
committersuyambulingamrm <suyambu.rm@samsung.com>2014-06-26 21:27:45 +0530
commit620838be0097fe6db63db103f094560938756064 (patch)
tree104094333c632575c1214c36628a85683ffe625a /src/cairo-tests/animation.cpp
parent82d568a6550bfa606ad1808488c9d4df3141d650 (diff)
Issue #69 Add rotation for animation case.
Diffstat (limited to 'src/cairo-tests/animation.cpp')
-rw-r--r--src/cairo-tests/animation.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cairo-tests/animation.cpp b/src/cairo-tests/animation.cpp
index ed029ac..9fca371 100644
--- a/src/cairo-tests/animation.cpp
+++ b/src/cairo-tests/animation.cpp
@@ -46,6 +46,7 @@ ca_test_animation(caskbench_context_t *ctx)
cairo_rectangle (ctx->cairo_cr, 0, 0, ctx->canvas_width ,ctx->canvas_height);
cairo_fill (ctx->cairo_cr);
+ static int counter = 0;
for (int i = 0; i < ctx->size; i++) {
shapes_t shape;
kinetics_t *particle = &particles[i];
@@ -60,7 +61,13 @@ ca_test_animation(caskbench_context_t *ctx)
if (!shape.radius)
shape.radius = 40;
+ cairo_save(ctx->cairo_cr);
+ cairo_rotate(ctx->cairo_cr, counter/50.0);
+
cairoDrawRandomizedShape(ctx, &shape);
+ cairo_restore(ctx->cairo_cr);
+
+ counter++;
}
return 1;