Fix the agg headers to be proper C++.

Signed-off-by: Axel Dörfler <[email protected]>
This commit is contained in:
Jonathan Schleifer
2013-12-19 02:00:44 +01:00
committed by Axel Dörfler
parent e3e0255008
commit f5a47df37d
2 changed files with 14 additions and 7 deletions
+1 -1
View File
@@ -1365,7 +1365,7 @@ namespace agg
//--------------------------------------------------------------------- //---------------------------------------------------------------------
void profile(const line_profile_aa& prof) { m_profile = &prof; } void profile(const line_profile_aa& prof) { m_profile = &prof; }
const line_profile_aa& profile() const { return *m_profile; } 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(); } int subpixel_width() const { return m_profile->subpixel_width(); }
+13 -6
View File
@@ -464,21 +464,28 @@ namespace agg
typedef base_type::coord_type coord_type; typedef base_type::coord_type coord_type;
scanline32_u8_am() : base_type(), m_alpha_mask(0) {} scanline32_u8_am() : m_alpha_mask(0)
scanline32_u8_am(const AlphaMask& am) : base_type(), m_alpha_mask(&am) {} {
this->base_type();
}
scanline32_u8_am(const AlphaMask& am) : m_alpha_mask(&am)
{
this->base_type();
}
//-------------------------------------------------------------------- //--------------------------------------------------------------------
void finalize(int span_y) void finalize(int span_y)
{ {
base_type::finalize(span_y); this->base_type::finalize(span_y);
if(m_alpha_mask) if(m_alpha_mask)
{ {
typename base_type::iterator span = base_type::begin(); typename base_type::iterator span = this->base_type::begin();
unsigned count = base_type::num_spans(); unsigned count = this->base_type::num_spans();
do do
{ {
m_alpha_mask->combine_hspan(span->x, m_alpha_mask->combine_hspan(span->x,
base_type::y(), this->base_type::y(),
span->covers, span->covers,
span->len); span->len);
++span; ++span;