From e211070b7f79d48315ecaf1d2fe34ef573e9c49a Mon Sep 17 00:00:00 2001 From: suyambulingamrm Date: Wed, 28 May 2014 10:21:55 +0530 Subject: Height value for shapes star and triangle needs to be updated. Causes incorrect outputs for gradients. --- src/cairo-tests/fill.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/cairo-tests/fill.cpp') 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); -- cgit v1.3.1-4-g156e