summaryrefslogtreecommitdiffstatsci
path: root/src
diff options
context:
space:
mode:
authorbryceharrington <b.harrington@samsung.com>2014-05-28 18:22:13 +0900
committerbryceharrington <b.harrington@samsung.com>2014-05-28 18:22:13 +0900
commitfcc5c8a0a55eb29b07451d2d69582a052e4c6b94 (patch)
tree730692e3ecbbdb526a1ac20455d7695f83b9b3d0 /src
parentf65244820182266ee3777c4146d1dc570b931d9d (diff)
parente211070b7f79d48315ecaf1d2fe34ef573e9c49a (diff)
Merge pull request #64 from SRA-SiliconValley/Issue_62
Height value for shapes star and triangle needs to be updated.
Diffstat (limited to 'src')
-rw-r--r--src/cairo-tests/fill.cpp5
-rw-r--r--src/skia-tests/fill.cpp4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/cairo-tests/fill.cpp b/src/cairo-tests/fill.cpp
index 919ee13..2bcc619 100644
--- a/src/cairo-tests/fill.cpp
+++ b/src/cairo-tests/fill.cpp
@@ -46,6 +46,11 @@ ca_test_fill(caskbench_context_t *ctx)
}
if (!shape.radius)
shape.radius = 40;
+
+ /* Height is used for creating patterns, needs to be updated for star and triangle */
+ if (shape.shape_type == CB_SHAPE_STAR || shape.shape_type == CB_SHAPE_TRIANGLE)
+ shape.height = 2*shape.radius;
+
/* Use rectangle as default shape */
shape.shape_type = shape.shape_type ? shape.shape_type:CB_SHAPE_RECTANGLE;
cairoDrawRandomizedShape(ctx, &shape);
diff --git a/src/skia-tests/fill.cpp b/src/skia-tests/fill.cpp
index 859a639..a2cb25a 100644
--- a/src/skia-tests/fill.cpp
+++ b/src/skia-tests/fill.cpp
@@ -54,6 +54,10 @@ sk_test_fill(caskbench_context_t *ctx)
if (!shape.radius)
shape.radius = 40;
+ /* Height is used for creating patterns, needs to be updated for star and triangle */
+ if (shape.shape_type == CB_SHAPE_STAR || shape.shape_type == CB_SHAPE_TRIANGLE)
+ shape.height = 2*shape.radius;
+
/* Use rectangle as default shape */
shape.shape_type = shape.shape_type ? shape.shape_type:CB_SHAPE_RECTANGLE;
skiaDrawRandomizedShape(ctx, &shape);