From 3c69a2e24d54c655eae99499c7ff5aed36def422 Mon Sep 17 00:00:00 2001 From: John Horigan Date: Wed, 3 Apr 2013 23:05:26 +0000 Subject: [PATCH] Add agg_renderer_base::fill(color&) method for blending a color. Complements the clear(color&) method, which copies the color. Signed-off-by: Augustin Cavalier --- headers/libs/agg/agg_renderer_base.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/headers/libs/agg/agg_renderer_base.h b/headers/libs/agg/agg_renderer_base.h index 6521d7a405..2dc3aa1ae1 100644 --- a/headers/libs/agg/agg_renderer_base.h +++ b/headers/libs/agg/agg_renderer_base.h @@ -132,7 +132,19 @@ namespace agg } } } - + + //-------------------------------------------------------------------- + void fill(const color_type& c) + { + unsigned y; + if(width()) + { + for(y = 0; y < height(); y++) + { + m_ren->blend_hline(0, y, width(), c, cover_mask); + } + } + } //-------------------------------------------------------------------- void copy_pixel(int x, int y, const color_type& c)