From 86d5e7704ba3ee6faffa2dff9fa26149f7e06bed Mon Sep 17 00:00:00 2001 From: suyambulingamrm Date: Tue, 1 Jul 2014 18:01:16 +0530 Subject: Issue #104. Fix scale bug in cairo image scale, Add alternate method to draw image using cairo_fill(). --- src/cairo-tests/image.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/cairo-tests/image.cpp') diff --git a/src/cairo-tests/image.cpp b/src/cairo-tests/image.cpp index cbf4c78..cdb5348 100644 --- a/src/cairo-tests/image.cpp +++ b/src/cairo-tests/image.cpp @@ -62,7 +62,14 @@ ca_test_image(caskbench_context_t* ctx) double x = (double)rand()/RAND_MAX * pw; double y = (double)rand()/RAND_MAX * ph; cairo_set_source_surface (cr, image, x, y); +#if 1 cairo_paint (cr); +#else + // Fill Method + cairo_rectangle(cr, x, y, iw, ih); + cairo_fill(cr); +#endif + } return 1; } -- cgit v1.3.1-4-g156e