Ticket #10325: 0008-Fix-the-agg-headers-to-be-proper-C.patch

File 0008-Fix-the-agg-headers-to-be-proper-C.patch, 2.7 KB (added by js, 10 years ago)
  • headers/libs/agg/agg_renderer_outline_aa.h

    From 4c5379def9176acad5667db133cae4ad5c1bda2f Mon Sep 17 00:00:00 2001
    From: Jonathan Schleifer <js@webkeks.org>
    Date: Thu, 19 Dec 2013 01:45:04 +0100
    Subject: [PATCH] Fix the agg headers to be proper C++.
    
    ---
     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 e3629db..f9c7674 100644
    a b namespace agg  
    13651365        //---------------------------------------------------------------------
    13661366        void profile(const line_profile_aa& prof) { m_profile = &prof; }
    13671367        const line_profile_aa& profile() const { return *m_profile; }
    1368         line_profile_aa& profile() { return *m_profile; }
     1368        line_profile_aa& profile() { return *(line_profile_aa*)m_profile; }
    13691369
    13701370        //---------------------------------------------------------------------
    13711371        int subpixel_width() const { return m_profile->subpixel_width(); }
  • headers/libs/agg/agg_scanline_u.h

    diff --git a/headers/libs/agg/agg_scanline_u.h b/headers/libs/agg/agg_scanline_u.h
    index 5a28ed1..b87e81c 100755
    a b namespace agg  
    464464        typedef base_type::coord_type coord_type;
    465465
    466466
    467         scanline32_u8_am() : base_type(), m_alpha_mask(0) {}
    468         scanline32_u8_am(const AlphaMask& am) : base_type(), m_alpha_mask(&am) {}
     467        scanline32_u8_am() : m_alpha_mask(0)
     468        {
     469            this->base_type();
     470        }
     471
     472        scanline32_u8_am(const AlphaMask& am) : m_alpha_mask(&am)
     473        {
     474            this->base_type();
     475        }
    469476
    470477        //--------------------------------------------------------------------
    471478        void finalize(int span_y)
    472479        {
    473             base_type::finalize(span_y);
     480            this->base_type::finalize(span_y);
    474481            if(m_alpha_mask)
    475482            {
    476                 typename base_type::iterator span = base_type::begin();
    477                 unsigned count = base_type::num_spans();
     483                typename base_type::iterator span = this->base_type::begin();
     484                unsigned count = this->base_type::num_spans();
    478485                do
    479486                {
    480487                    m_alpha_mask->combine_hspan(span->x,
    481                                                 base_type::y(),
     488                                                this->base_type::y(),
    482489                                                span->covers,
    483490                                                span->len);
    484491                    ++span;