Revision: 8465 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8465&view=rev Author: mdboom Date: 2010-06-24 18:25:16 +0000 (Thu, 24 Jun 2010)
Log Message: ----------- [3018198] Fixing the build with clang Typo in agg causes a template instantiation bug on compilers that actually instantiate everything. Modified Paths: -------------- trunk/matplotlib/agg24/include/agg_scanline_u.h Modified: trunk/matplotlib/agg24/include/agg_scanline_u.h =================================================================== --- trunk/matplotlib/agg24/include/agg_scanline_u.h 2010-06-24 17:59:48 UTC (rev 8464) +++ trunk/matplotlib/agg24/include/agg_scanline_u.h 2010-06-24 18:25:16 UTC (rev 8465) @@ -2,8 +2,8 @@ // Anti-Grain Geometry - Version 2.4 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) // -// Permission to copy, use, modify, sell and distribute this software -// is granted provided this copyright notice appears in all copies. +// Permission to copy, use, modify, sell and distribute this software +// is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied // warranty, and with no claim as to its suitability for any purpose. // @@ -13,12 +13,12 @@ // http://www.antigrain.com //---------------------------------------------------------------------------- // -// Adaptation for 32-bit screen coordinates (scanline32_u) has been sponsored by +// Adaptation for 32-bit screen coordinates (scanline32_u) has been sponsored by // Liberty Technology Systems, Inc., visit http://lib-sys.com // // Liberty Technology Systems, Inc. is the provider of // PostScript and PDF technology for software developers. -// +// //---------------------------------------------------------------------------- #ifndef AGG_SCANLINE_U_INCLUDED @@ -32,22 +32,22 @@ // // Unpacked scanline container class // - // This class is used to transfer data from a scanline rasterizer - // to the rendering buffer. It's organized very simple. The class stores - // information of horizontal spans to render it into a pixel-map buffer. - // Each span has staring X, length, and an array of bytes that determine the - // cover-values for each pixel. - // Before using this class you should know the minimal and maximal pixel + // This class is used to transfer data from a scanline rasterizer + // to the rendering buffer. It's organized very simple. The class stores + // information of horizontal spans to render it into a pixel-map buffer. + // Each span has staring X, length, and an array of bytes that determine the + // cover-values for each pixel. + // Before using this class you should know the minimal and maximal pixel // coordinates of your scanline. The protocol of using is: // 1. reset(min_x, max_x) - // 2. add_cell() / add_span() - accumulate scanline. + // 2. add_cell() / add_span() - accumulate scanline. // When forming one scanline the next X coordinate must be always greater // than the last stored one, i.e. it works only with ordered coordinates. // 3. Call finalize(y) and render the scanline. // 3. Call reset_spans() to prepare for the new scanline. - // + // // 4. Rendering: - // + // // Scanline provides an iterator class that allows you to extract // the spans and the cover values for each pixel. Be aware that clipping // has not been done yet, so you should perform it yourself. @@ -61,10 +61,10 @@ // ************************************ // // scanline_u8::const_iterator span = sl.begin(); - // - // unsigned char* row = m_rbuf->row(y); // The the address of the beginning + // + // unsigned char* row = m_rbuf->row(y); // The the address of the beginning // // of the current row - // + // // unsigned num_spans = sl.num_spans(); // Number of spans. It's guaranteed that // // num_spans is always greater than 0. // @@ -75,7 +75,7 @@ // // int num_pix = span->len; // Number of pixels of the span. // // Always greater than 0, still it's - // // better to use "int" instead of + // // better to use "int" instead of // // "unsigned" because it's more // // convenient for clipping // int x = span->x; @@ -86,24 +86,24 @@ // ************************************** // // unsigned char* dst = row + x; // Calculate the start address of the row. - // // In this case we assume a simple + // // In this case we assume a simple // // grayscale image 1-byte per pixel. // do // { - // *dst++ = *covers++; // Hypotetical rendering. + // *dst++ = *covers++; // Hypotetical rendering. // } // while(--num_pix); // // ++span; - // } + // } // while(--num_spans); // num_spans cannot be 0, so this loop is quite safe //------------------------------------------------------------------------ // // The question is: why should we accumulate the whole scanline when we // could render just separate spans when they're ready? - // That's because using the scanline is generally faster. When is consists + // That's because using the scanline is generally faster. When is consists // of more than one span the conditions for the processor cash system - // are better, because switching between two different areas of memory + // are better, because switching between two different areas of memory // (that can be very large) occurs less frequently. //------------------------------------------------------------------------ class scanline_u8 @@ -203,9 +203,9 @@ } //-------------------------------------------------------------------- - void finalize(int y) - { - m_y = y; + void finalize(int y) + { + m_y = y; } //-------------------------------------------------------------------- @@ -238,11 +238,11 @@ //==========================================================scanline_u8_am - // + // // The scanline container with alpha-masking - // + // //------------------------------------------------------------------------ - template<class AlphaMask> + template<class AlphaMask> class scanline_u8_am : public scanline_u8 { public: @@ -264,9 +264,9 @@ unsigned count = base_type::num_spans(); do { - m_alpha_mask->combine_hspan(span->x, - base_type::y(), - span->covers, + m_alpha_mask->combine_hspan(span->x, + base_type::y(), + span->covers, span->len); ++span; } @@ -390,8 +390,8 @@ } else { - m_spans.add(span(coord_type(x + m_min_x), - coord_type(len), + m_spans.add(span(coord_type(x + m_min_x), + coord_type(len), &m_covers[x])); } m_last_x = x + len - 1; @@ -408,17 +408,17 @@ } else { - m_spans.add(span(coord_type(x + m_min_x), - coord_type(len), + m_spans.add(span(coord_type(x + m_min_x), + coord_type(len), &m_covers[x])); } m_last_x = x + len - 1; } //-------------------------------------------------------------------- - void finalize(int y) - { - m_y = y; + void finalize(int y) + { + m_y = y; } //-------------------------------------------------------------------- @@ -450,15 +450,15 @@ //========================================================scanline32_u8_am - // + // // The scanline container with alpha-masking - // + // //------------------------------------------------------------------------ - template<class AlphaMask> + template<class AlphaMask> class scanline32_u8_am : public scanline32_u8 { public: - typedef scanline_u8 base_type; + typedef scanline32_u8 base_type; typedef AlphaMask alpha_mask_type; typedef base_type::cover_type cover_type; typedef base_type::coord_type coord_type; @@ -477,9 +477,9 @@ unsigned count = base_type::num_spans(); do { - m_alpha_mask->combine_hspan(span->x, - base_type::y(), - span->covers, + m_alpha_mask->combine_hspan(span->x, + base_type::y(), + span->covers, span->len); ++span; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins