summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-10-11 16:26:03 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-10-11 16:26:31 +0100
commitbb84878f96c4321c1ef16dfe1ff91d3d56f3b83e (patch)
tree1abd92f42b4e71ed556f891f40ef11b215031a1f
parent6576311be7a961e60303fcafe9a7fc926382fd4b (diff)
flowers: tweak rendering of petals
-rw-r--r--flowers-demo.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/flowers-demo.c b/flowers-demo.c
index 2730975..9ab07ee 100644
--- a/flowers-demo.c
+++ b/flowers-demo.c
@@ -96,12 +96,6 @@ make_fast_flower (cairo_surface_t *target, flower_t *f, int w, int h)
idx = rand () % ARRAY_LENGTH (colors);
} while (idx == last_idx);
- cairo_set_source_rgba (cr,
- colors[idx].red,
- colors[idx].green,
- colors[idx].blue,
- 0.5);
-
last_idx = idx;
/* some bezier randomness */
@@ -123,6 +117,12 @@ make_fast_flower (cairo_surface_t *target, flower_t *f, int w, int h)
cairo_rotate (cr, 2*M_PI / n_petals);
}
+ cairo_set_source_rgba (cr,
+ colors[idx].red,
+ colors[idx].green,
+ colors[idx].blue,
+ 0.5);
+ cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE);
cairo_fill_preserve (cr);
cairo_set_line_width (cr, 1.);
@@ -130,6 +130,7 @@ make_fast_flower (cairo_surface_t *target, flower_t *f, int w, int h)
colors[idx].red,
colors[idx].green,
colors[idx].blue);
+ cairo_set_antialias (cr, CAIRO_ANTIALIAS_DEFAULT);
cairo_stroke (cr);
petal_size -= rand () % (f->size/8);