From f5a47df37d2dded1879279b69ef813f926f6e1f8 Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Thu, 19 Dec 2013 01:45:04 +0100 Subject: [PATCH] Fix the agg headers to be proper C++. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Axel Dörfler --- headers/libs/agg/agg_renderer_outline_aa.h | 2 +- headers/libs/agg/agg_scanline_u.h | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/headers/libs/agg/agg_renderer_outline_aa.h b/headers/libs/agg/agg_renderer_outline_aa.h index e3629db726..f9c7674cb9 100644 --- a/headers/libs/agg/agg_renderer_outline_aa.h +++ b/headers/libs/agg/agg_renderer_outline_aa.h @@ -1365,7 +1365,7 @@ namespace agg //--------------------------------------------------------------------- void profile(const line_profile_aa& prof) { m_profile = &prof; } const line_profile_aa& profile() const { return *m_profile; } - line_profile_aa& profile() { return *m_profile; } + line_profile_aa& profile() { return *(line_profile_aa*)m_profile; } //--------------------------------------------------------------------- int subpixel_width() const { return m_profile->subpixel_width(); } diff --git a/headers/libs/agg/agg_scanline_u.h b/headers/libs/agg/agg_scanline_u.h index 5a28ed17e1..b87e81c82f 100755 --- a/headers/libs/agg/agg_scanline_u.h +++ b/headers/libs/agg/agg_scanline_u.h @@ -464,21 +464,28 @@ namespace agg typedef base_type::coord_type coord_type; - scanline32_u8_am() : base_type(), m_alpha_mask(0) {} - scanline32_u8_am(const AlphaMask& am) : base_type(), m_alpha_mask(&am) {} + scanline32_u8_am() : m_alpha_mask(0) + { + this->base_type(); + } + + scanline32_u8_am(const AlphaMask& am) : m_alpha_mask(&am) + { + this->base_type(); + } //-------------------------------------------------------------------- void finalize(int span_y) { - base_type::finalize(span_y); + this->base_type::finalize(span_y); if(m_alpha_mask) { - typename base_type::iterator span = base_type::begin(); - unsigned count = base_type::num_spans(); + typename base_type::iterator span = this->base_type::begin(); + unsigned count = this->base_type::num_spans(); do { m_alpha_mask->combine_hspan(span->x, - base_type::y(), + this->base_type::y(), span->covers, span->len); ++span;