From e4a47f2f5e6a4422c8899cf1858df649f11098ea Mon Sep 17 00:00:00 2001 From: Bryce Harrington Date: Thu, 8 May 2014 10:22:35 -0700 Subject: Track the image path as part of the cairo context, not a shape default We aren't randomizing the image or varying it from shape to shape, so it doesn't really belong in the shapes structure. --- src/cairo-tests/fill.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/cairo-tests/fill.cpp') diff --git a/src/cairo-tests/fill.cpp b/src/cairo-tests/fill.cpp index e9975c8..69bfc55 100644 --- a/src/cairo-tests/fill.cpp +++ b/src/cairo-tests/fill.cpp @@ -102,18 +102,17 @@ void drawshapes(caskbench_context_t *ctx,kinetics_t *particles) } else if(ctx->shape_defaults.fill_type == CB_FILL_HERRINGBONE_PATTERN){} - else if(ctx->shape_defaults.fill_type == CB_FILL_IMAGE_PATTERN && (ctx->shape_defaults.image_path)) + else if(ctx->shape_defaults.fill_type == CB_FILL_IMAGE_PATTERN && (ctx->stock_image_path)) { cairo_matrix_t matrix; - image = cairo_image_surface_create_from_png (ctx->shape_defaults.image_path); + image = cairo_image_surface_create_from_png (ctx->stock_image_path); int w = cairo_image_surface_get_width (image); int h = cairo_image_surface_get_height (image); pattern = cairo_pattern_create_for_surface (image); cairo_set_source (cr, pattern); } - if (!ctx->shape_defaults.multi_shapes && !ctx->shape_defaults.animation) { x = ctx->shape_defaults.x; y = ctx->shape_defaults.y; -- cgit v1.3.1-4-g156e