示例#1
0
 private void realloc_span(int len)
 {
     if (len > m_span.Size())
     {
         m_span.Resize(len + (int)span_extra_tail_e.span_extra_tail);
     }
 }
示例#2
0
 void ReAllocSpan(int len)
 {
     if (len > m_span.Size())
     {
         m_span.Resize(len + (int)SpanExtraTail.span_extra_tail);
     }
 }
 private void ReallocateSpan(int len)
 {
     if (len > _span.Size)
     {
         _span.Resize(len + (int)ESpanExtraTail.SpanExtraTail);
     }
 }
示例#4
0
        //--------------------------------------------------------------------
        public void reset(int min_x, int max_x)
        {
            int max_len = max_x - min_x + 3;

            if (max_len > m_spans.Size())
            {
                m_spans.Resize(max_len);
            }
            m_last_x     = 0x7FFFFFF0;
            m_span_index = 0;
        }
示例#5
0
 //------------------------------------------------------------------------
 public void init(int max)
 {
     if (max > 2 && max > m_max)
     {
         m_am.Resize(max * 3);
         m_max     = max;
         m_xOffset = m_max;
         m_yOffset = m_max * 2;
     }
     m_num      = 0;
     m_last_idx = -1;
 }
示例#6
0
 //--------------------------------------------------------------------
 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);
 }
示例#7
0
        private void ReAllocLut(T radius)
        {
            m_radius   = radius;
            m_diameter = Basics.CeilingUint(radius) * 2;
            m_start    = -(int)(m_diameter / 2 - 1);
            int size = (int)m_diameter << (int)SubPixelScale.Shift;

            if (size > m_weight_array.Size())
            {
                m_weight_array.Resize(size);
            }
        }
        //--------------------------------------------------------------------
        public void Reset(int min_x, int max_x)
        {
            int max_len = max_x - min_x + 2;

            if (max_len > m_spans.Size)
            {
                m_spans.Resize(max_len);
                m_covers.Resize(max_len);
            }
            m_last_x     = 0x7FFFFFF0;
            m_min_x      = min_x;
            m_span_index = 0;
        }
示例#9
0
        //--------------------------------------------------------------------
        public void Reset(int min_x, int max_x)
        {
            int max_len = max_x - min_x + 3;

            if (max_len > m_spans.Size())
            {
                m_spans.Resize(max_len);
                m_covers.Resize(max_len);
            }
            m_last_x      = 0x7FFFFFF0;
            m_cover_index = 0;
            m_span_index  = 0;
            m_spans.Array[m_span_index].Len = 0;
        }