NewTOAPIA.Drawing.span_allocator.allocate C# (CSharp) Method

allocate() public method

public allocate ( int span_len ) : ArrayPOD
span_len int
return ArrayPOD
        public ArrayPOD<RGBA_Bytes> allocate(int span_len)
        {
            if (span_len > m_span.size())
            {
                // To reduce the number of reallocs we align the 
                // span_len to 256 color elements. 
                // Well, I just like this number and it looks reasonable.
                //-----------------------
                m_span.resize((((int)span_len + 255) >> 8) << 8);
            }
            return m_span;
        }