1 //----------------------------------------------------------------------------
2 // Anti-Grain Geometry - Version 2.3
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 //----------------------------------------------------------------------------
16 #ifndef AGG_SPAN_ALLOCATOR_INCLUDED
17 #define AGG_SPAN_ALLOCATOR_INCLUDED
19 #include "agg_basics.h"
23 //----------------------------------------------------------span_allocator
24 template<class ColorT
> class span_allocator
27 typedef ColorT color_type
;
29 //--------------------------------------------------------------------
35 //--------------------------------------------------------------------
42 //--------------------------------------------------------------------
43 color_type
* allocate(unsigned max_span_len
)
45 if(max_span_len
> m_max_span_len
)
48 m_span
= new color_type
[m_max_span_len
= max_span_len
];
53 //--------------------------------------------------------------------
60 //--------------------------------------------------------------------
61 span_allocator(const span_allocator
<ColorT
>&);
62 const span_allocator
<ColorT
>& operator = (const span_allocator
<ColorT
>&);
64 unsigned m_max_span_len
;