summaryrefslogtreecommitdiffstatsci
path: root/src/cairo-tests/fill.cpp
diff options
context:
space:
mode:
authorBryce Harrington <b.harrington@samsung.com>2014-05-08 10:22:35 -0700
committerBryce Harrington <b.harrington@samsung.com>2014-05-08 18:50:52 -0700
commite4a47f2f5e6a4422c8899cf1858df649f11098ea (patch)
treea27c72a2661f4a0ac671100049074db7223dd94a /src/cairo-tests/fill.cpp
parent6462239c7432142640eaa3cc0f9b80fb102014d2 (diff)
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.
Diffstat (limited to 'src/cairo-tests/fill.cpp')
-rw-r--r--src/cairo-tests/fill.cpp5
1 files changed, 2 insertions, 3 deletions
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;