Fix the agg headers to be proper C++.

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
This commit is contained in:
Jonathan Schleifer 2013-12-19 01:45:04 +01:00 committed by Axel Dörfler
parent e3e0255008
commit f5a47df37d
2 changed files with 14 additions and 7 deletions

View File

@ -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(); }

View File

@ -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;