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
|
1365 | 1365 | //--------------------------------------------------------------------- |
1366 | 1366 | void profile(const line_profile_aa& prof) { m_profile = &prof; } |
1367 | 1367 | 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; } |
1369 | 1369 | |
1370 | 1370 | //--------------------------------------------------------------------- |
1371 | 1371 | 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 5a28ed1..b87e81c 100755
a
|
b
|
namespace agg
|
464 | 464 | typedef base_type::coord_type coord_type; |
465 | 465 | |
466 | 466 | |
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 | } |
469 | 476 | |
470 | 477 | //-------------------------------------------------------------------- |
471 | 478 | void finalize(int span_y) |
472 | 479 | { |
473 | | base_type::finalize(span_y); |
| 480 | this->base_type::finalize(span_y); |
474 | 481 | if(m_alpha_mask) |
475 | 482 | { |
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(); |
478 | 485 | do |
479 | 486 | { |
480 | 487 | m_alpha_mask->combine_hspan(span->x, |
481 | | base_type::y(), |
| 488 | this->base_type::y(), |
482 | 489 | span->covers, |
483 | 490 | span->len); |
484 | 491 | ++span; |