1 //----------------------------------------------------------------------------
2 // Anti-Grain Geometry - Version 2.4
3 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com)
5 // Permission to copy, use, modify, sell and distribute this software
6 // is granted provided this copyright notice appears in all copies.
7 // This software is provided "as is" without express or implied
8 // warranty, and with no claim as to its suitability for any purpose.
10 //----------------------------------------------------------------------------
11 // Contact: mcseem@antigrain.com
12 // mcseemagg@yahoo.com
13 // http://www.antigrain.com
14 //----------------------------------------------------------------------------
18 //----------------------------------------------------------------------------
20 #ifndef AGG_SPAN_SOLID_INCLUDED
21 #define AGG_SPAN_SOLID_INCLUDED
23 #include "agg_basics.h"
27 //--------------------------------------------------------------span_solid
28 template<class ColorT
> class span_solid
31 typedef ColorT color_type
;
33 //--------------------------------------------------------------------
34 void color(const color_type
& c
) { m_color
= c
; }
35 const color_type
& color() const { return m_color
; }
37 //--------------------------------------------------------------------
40 //--------------------------------------------------------------------
41 void generate(color_type
* span
, int x
, int y
, unsigned len
)
43 do { *span
++ = m_color
; } while(--len
);