| OLD | NEW |
| 1 | 1 |
| 2 //---------------------------------------------------------------------------- | 2 //---------------------------------------------------------------------------- |
| 3 // XYQ: 2006-01-22 Copied from AGG project. | 3 // XYQ: 2006-01-22 Copied from AGG project. |
| 4 // This file uses only integer data, so it's suitable for all platforms. | 4 // This file uses only integer data, so it's suitable for all platforms. |
| 5 //---------------------------------------------------------------------------- | 5 //---------------------------------------------------------------------------- |
| 6 //---------------------------------------------------------------------------- | 6 //---------------------------------------------------------------------------- |
| 7 // Anti-Grain Geometry - Version 2.3 | 7 // Anti-Grain Geometry - Version 2.3 |
| 8 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) | 8 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) |
| 9 // | 9 // |
| 10 // Permission to copy, use, modify, sell and distribute this software | 10 // Permission to copy, use, modify, sell and distribute this software |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // created a similar renderer, but still I was far from David's work. | 39 // created a similar renderer, but still I was far from David's work. |
| 40 // I completely redesigned the original code and adapted it for Anti-Grain | 40 // I completely redesigned the original code and adapted it for Anti-Grain |
| 41 // ideas. Two functions - render_line and render_hline are the core of | 41 // ideas. Two functions - render_line and render_hline are the core of |
| 42 // the algorithm - they calculate the exact coverage of each pixel cell | 42 // the algorithm - they calculate the exact coverage of each pixel cell |
| 43 // of the polygon. I left these functions almost as is, because there's | 43 // of the polygon. I left these functions almost as is, because there's |
| 44 // no way to improve the perfection - hats off to David and his group! | 44 // no way to improve the perfection - hats off to David and his group! |
| 45 // | 45 // |
| 46 // All other code is very different from the original. | 46 // All other code is very different from the original. |
| 47 // | 47 // |
| 48 //---------------------------------------------------------------------------- | 48 //---------------------------------------------------------------------------- |
| 49 #include "../../core/include/fxcrt/fx_ext.h" | |
| 50 #include <limits.h> | 49 #include <limits.h> |
| 51 #include "agg_rasterizer_scanline_aa.h" | 50 #include "agg_rasterizer_scanline_aa.h" |
| 52 namespace agg | 51 namespace agg |
| 53 { | 52 { |
| 54 AGG_INLINE void cell_aa::set_cover(int c, int a) | 53 AGG_INLINE void cell_aa::set_cover(int c, int a) |
| 55 { | 54 { |
| 56 cover = c; | 55 cover = c; |
| 57 area = a; | 56 area = a; |
| 58 } | 57 } |
| 59 AGG_INLINE void cell_aa::add_cover(int c, int a) | 58 AGG_INLINE void cell_aa::add_cover(int c, int a) |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 } | 479 } |
| 481 for(i = 0; i < m_sorted_y.size(); i++) { | 480 for(i = 0; i < m_sorted_y.size(); i++) { |
| 482 const sorted_y& cur_y = m_sorted_y[i]; | 481 const sorted_y& cur_y = m_sorted_y[i]; |
| 483 if(cur_y.num) { | 482 if(cur_y.num) { |
| 484 qsort_cells(m_sorted_cells.data() + cur_y.start, cur_y.num); | 483 qsort_cells(m_sorted_cells.data() + cur_y.start, cur_y.num); |
| 485 } | 484 } |
| 486 } | 485 } |
| 487 m_sorted = true; | 486 m_sorted = true; |
| 488 } | 487 } |
| 489 } | 488 } |
| OLD | NEW |